v0.6.4: workspace-push + prs --head — close the edit-and-PR loop#10
Merged
Conversation
In v0.6.3 the agent could clone a workspace, browse it, and edit
files. But the loop ended there: `shell-exec git push` is auto-denied
by merlin's Tier 1.5 gate, and `prs create -R OWNER/NAME` failed
because gh couldn't infer the head branch from the wrong cwd. Agents
got 90% of the way and stalled at "give me push permissions."
Two missing primitives, one PR:
1. `repo workspace-push <DIR> [-b BRANCH] [-m MSG]`
- Same /tmp/fledge-gh-* safety guard as workspace + workspace-clean.
- With -b: checks out the branch (creating from HEAD if new), so
agents can name a feature branch in one call.
- With -m: stages everything and commits if the tree is dirty.
Skips the commit on a clean tree so re-runs are idempotent.
- Always: `git push -u origin <current-branch>`.
- --json emits {branch, repo, path} so the agent can chain straight
into `prs create -R … -H …`.
2. `prs create --head <BRANCH>` — passes gh's --head through. Required
for the post-workspace-push case where the agent's cwd is the
merlin tree, not the cloned repo, so gh has no local context to
guess from.
Plugin / arg descriptions in plugin.toml updated with the full
five-step loop as an example so agents see the chain on the first
attempt.
No real-remote smoke test in CI — would push a junk branch to a
shared repo. Verified locally: syntax + shellcheck clean, safety
guards reject non-/tmp paths, --help text correct.
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Closes the agent edit-and-PR loop. After v0.6.3 the corvidagent could
repo workspace+ browse +files-editfiles in another repo, but couldn't finish:shell-exec git pushis auto-denied by merlin's Tier 1.5 gate, andprs create -R OWNER/NAMEfailed because gh couldn't infer the head branch from the wrong cwd.Two missing primitives:
repo workspace-push <DIR> [-b BRANCH] [-m MSG]/tmp/fledge-gh-*safety guard as workspace + workspace-clean.-b: checks out / creates the branch.-m: stages and commits dirty changes (skips when clean — re-runs are idempotent).git push -u origin <current-branch>.--jsonemits{branch, repo, path}so the agent can chain straight intoprs create -R … -H ….prs create --head <BRANCH>— passes gh's--headthrough. Required for the post-workspace-pushcase where the agent's cwd is the merlin tree, not the cloned repo.Plugin / arg descriptions surface the full five-step loop (workspace → edit → workspace-push → prs create → workspace-clean) so agents see the chain on the first attempt.
Test plan
bash -ncleanshellcheck --severity=warningcleanworkspace-pusherrors clearly with missing DIRworkspace-pushrefuses non-/tmp/fledge-gh-*paths (safety guard)--helpincludes the new actions + flagscorvid-verify.