-
Notifications
You must be signed in to change notification settings - Fork 1
Add Go rewrite of autosolve actions #8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
fantapop
wants to merge
3
commits into
CNSL-1944-generic-autosolve-git-hub-workflow-for-automated-issue-resolution
Choose a base branch
from
autosolve-go-rewrite
base: CNSL-1944-generic-autosolve-git-hub-workflow-for-automated-issue-resolution
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| # Built binary (lives at repo root of autosolve-go/) | ||
| /autosolve |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| .PHONY: build test clean | ||
|
|
||
| build: | ||
| go build -o autosolve ./cmd/autosolve | ||
|
|
||
| test: | ||
| go test ./... -count=1 | ||
|
|
||
| clean: | ||
| rm -f autosolve |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,64 @@ | ||
| name: Autosolve Assess (Go) | ||
| description: Run Claude in read-only mode to assess whether a task is suitable for automated resolution. | ||
|
|
||
| # Prerequisites: | ||
| # The calling workflow must install the Claude CLI BEFORE authenticating | ||
| # to any cloud provider. npm post-install scripts run with the job's | ||
| # full environment, so installing after auth would expose credentials | ||
| # (e.g. the OIDC bearer token in gha-creds-*.json) to arbitrary code. | ||
|
|
||
| inputs: | ||
| prompt: | ||
| description: The task to assess. Plain text instructions describing what needs to be done. | ||
| required: false | ||
| default: "" | ||
| skill: | ||
| description: Path to a skill/prompt file relative to the repo root. | ||
| required: false | ||
| default: "" | ||
| additional_instructions: | ||
| description: Extra context appended after the task prompt but before the assessment footer. | ||
| required: false | ||
| default: "" | ||
| assessment_criteria: | ||
| description: Custom criteria for the assessment. If not provided, uses default criteria. | ||
| required: false | ||
| default: "" | ||
| model: | ||
| description: Claude model ID. | ||
| required: false | ||
| default: "claude-opus-4-6" | ||
| blocked_paths: | ||
| description: Comma-separated path prefixes that cannot be modified (injected into security preamble). | ||
| required: false | ||
| default: ".github/workflows/" | ||
|
|
||
| outputs: | ||
| assessment: | ||
| description: PROCEED or SKIP | ||
| value: ${{ steps.assess.outputs.assessment }} | ||
| summary: | ||
| description: Human-readable assessment reasoning. | ||
| value: ${{ steps.assess.outputs.summary }} | ||
| result: | ||
| description: Full Claude result text. | ||
| value: ${{ steps.assess.outputs.result }} | ||
|
|
||
| runs: | ||
| using: "composite" | ||
| steps: | ||
| - name: Build autosolve | ||
| shell: bash | ||
| run: cd "${{ github.action_path }}/.." && go build -o /tmp/autosolve ./cmd/autosolve | ||
|
|
||
| - name: Run assessment | ||
| id: assess | ||
| shell: bash | ||
| run: /tmp/autosolve assess | ||
| env: | ||
| INPUT_PROMPT: ${{ inputs.prompt }} | ||
| INPUT_SKILL: ${{ inputs.skill }} | ||
| INPUT_ADDITIONAL_INSTRUCTIONS: ${{ inputs.additional_instructions }} | ||
| INPUT_ASSESSMENT_CRITERIA: ${{ inputs.assessment_criteria }} | ||
| INPUT_MODEL: ${{ inputs.model }} | ||
| INPUT_BLOCKED_PATHS: ${{ inputs.blocked_paths }} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 [actionlint] reported by reviewdog 🐶
shellcheck reported issue in this script: SC2129:style:6:3: Consider using { cmd1; cmd2; } >> file instead of individual redirects [shellcheck]