chore: sync upstream Archon #1506 — stop sweeping scratch artifacts#18
Merged
Conversation
… site (coleam00#1506) * fix(simplify): stage only edited files, forbid scratch artifacts The simplify command used `git add -A`, which sweeps untracked review/ report files (e.g. `review/scope.md` left by upstream review nodes) into the simplification commit. Replace it with explicit per-file staging using the list of paths edited in Phase 2, plus a forbidden-paths list so review artifacts, PR-body scratch files, and anything under `$ARTIFACTS_DIR` cannot leak into the commit. * fix(fix-github-issue): forbid scratch artifacts in create-pr step The inline create-pr prompt told the agent to "stage and commit" any uncommitted changes, which lets transient artifacts from upstream nodes (`.pr-body.md`, `review/scope.md`, scratch reports) land in the implementation commit and PR diff. Replace the loose instruction with explicit per-file staging, a forbidden-paths list, and a rule that any PR body file written for `--body-file` must live at `$ARTIFACTS_DIR/pr-body.md` or `/tmp/` — never inside the worktree. Applied to both the default and experimental variants. * fix(workflows): purge remaining git add -A in worktree-context steps Same class of bug as the simplify and create-pr fixes: every worktree-facing default that used `git add -A` could sweep transient review/scratch artifacts (`.pr-body.md`, `review/scope.md`, `*-report.md`, anything left under `$ARTIFACTS_DIR`) into the commit. Replace with explicit per-file staging plus a forbidden-paths list and a `git status --porcelain` verification step. Touched: - commands: archon-create-pr, archon-finalize-pr, archon-fix-issue, archon-implement-issue, archon-implement-review-fixes - workflows: archon-piv-loop (3 sites), archon-ralph-dag, archon-refactor-safely Intentionally left as `git add -A`: - archon-release.yaml: working tree validated clean before this step; comment already explains why. - archon-adversarial-dev.yaml: operates inside `$ARTIFACTS_DIR/app/`, a dedicated scratch repo, not the user's worktree.
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
Cherry-picks coleam00/Archon PR coleam00#1506 onto our fork's main. The upstream commit replaces
git add -Awith explicit per-file staging in every workflow/command that operates inside the user's worktree, preventing transient review/scratch artifacts (.pr-body.md,review/scope.md,*-report.md, anything under$ARTIFACTS_DIR) from leaking into implementation commits and PRs.Touched defaults:
archon-create-pr,archon-finalize-pr,archon-fix-issue,archon-implement-issue,archon-implement-review-fixes,archon-simplify-changes,archon-fix-github-issue,archon-piv-loop,archon-ralph-dag,archon-refactor-safely, and the experimentalarchon-fix-github-issue-experimental.Intentionally left as
git add -Aupstream (carried through here):archon-release.yaml— working tree validated clean before this steparchon-adversarial-dev.yaml— operates inside a dedicated scratch repo, not the user's worktreeConflict resolution
Only
packages/workflows/src/defaults/bundled-defaults.generated.tsconflicted (our recent epic-decompose splice and the upstream sweep-fix touched overlapping bundled entries). Regenerated from the merged source files viabun run generate:bundled.Validation
bun run cli validate workflows— all affected workflows ok; same pre-existingarchon-smart-pr-reviewMCP config issue and pythonuvwarnings as before, unrelatedbun run validatestill recommended on the merge commit)Test plan
archon-fix-github-issueor thetask-implementchain'screate-prstep) and confirm scratch artifacts do not appear in the resulting commit🤖 Generated with Claude Code