fix(unic-archon-dlc): explicit staging and host-agnostic repo pinning in the Archon Boxes - #306
Closed
orioltf wants to merge 7 commits into
Closed
Conversation
release: sync develop → main
fix: remove implementation report for ADR-0010 provider folder bundle
release: sync develop → main
release: sync develop → main
… in the Archon Boxes Two defects Archon 0.7.0 already fixed in its own bundled defaults were live here. Blind staging: /explore's preserve-spike ran `git add -A` and /build's open-pr said "stage everything changed by the build". A Box runs in an isolated worktree with fresh context, so "everything" sweeps in scratch files and build-state.json rewrites. Unpinned host CLI calls: no `gh` or `az` invocation passed a repository, so on a fork clone the CLI resolves to the upstream parent and the PR opens against the wrong repo. Changes: - Stage named paths in every committing node, each verified with `git status --porcelain`, with the deny list stated inline (pr-body.md, *.tmp.md, *.scratch.md, *-report.md, and Archon's per-run $ARTIFACTS_DIR — distinguished from the in-repo artifacts_dir). - Commit build-state.json exactly once, at open-pr, never in a loop iteration (ADR-0012). - Add optional `project.repo_ref` to the config schema, defaulting to null, with tests. - Read repo_ref in all four Box bootstraps, emit it, and pin every PR-touching call host-agnostically: `gh --repo` for github, `az repos … --repository` for ado. - Add a `guard-no-repo-ref` node per Box that CANCELS with an actionable message when the key is absent or blank (ADR-0011), never fails. - Apply both rules to commands/specs.md and commands/tickets.md gates. - Record the doctrine in AGENTS.md for maintainers. Fixes #289 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
…epo_ref Closing a PR is destructive and `gh pr close` was unpinned, so on a fork clone it would close a PR in the upstream parent. The category is now skipped outright when project.repo_ref is unset — an off-line janitor warns, it never guesses a repository. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
orioltf
deleted the
archon/task-feature-unic-archon-dlc-289-stage-explicitly-pin-r
branch
August 5, 2026 17:37
orioltf
added a commit
that referenced
this pull request
Aug 5, 2026
Archon auto-detects `baseBranch` when the key is absent and picked `main`. `main` last moved at the #283 release merge, so every worktree forked 44 commits behind `develop` — the issue #289 run branched off pre-#281 code and its PR (#306) conflicted in 9 files without a single CI run. Gitflow says feature work forks from `develop`; state it explicitly so no future rollout inherits a stale base. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MgKAGuqw6tnVZqHzPa3xC3
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.
Why
Archon 0.7.0 removed
git add -Afrom its own bundled command defaults (coleam00/Archon#1506) and pinned everyghcall to the origin repo (#2361, issue #2229). Both defects were live in this plugin's Boxes.Blind staging.
/explore'spreserve-spikerangit add -A, and/build'sopen-prsaid "stage everything changed by the build". A Box runs in an isolated worktree with fresh context, so "everything changed" sweeps in whatever else is on disk — scratch files, andbuild-state.jsonas the loop rewrites it on every one of up to 60 iterations.Unpinned host CLI calls. No
ghorazinvocation passed a repository.ghresolves the base repo by its own remote precedence (upstream>github>origin), so on a fork clone a PR opens — or is read, merged, or commented on — against the upstream parent.What changed
unic-dlc-explore.yamlpreserve-spikestages named paths, then verifies withgit status --porcelainunic-dlc-build.yamlopen-prgains an explicit stage listunic-dlc-qa.yamlverify-pr-baseandmergepin the repositoryunic-dlc-pr-review.yamlprepandpostpin the repositorybootstrapreadsproject.repo_ref; newguard-no-repo-refnode cancels when it is missinglib/config-schema.mjsproject.repo_ref, defaulting tonull(+ 4 tests)commands/specs.md,tickets.mdcommands/cleanup.mdrepo_refis unsetAGENTS.mdBoth rules are stated inline in every prompt, not only as doctrine: a Box node is self-contained and imports nothing from the plugin (ADR-0023 §5), so a doctrine document is invisible to a running node.
Design notes
build-state.jsonis committed exactly once, atopen-pr. Every loop phase writes it to disk and is told explicitly not to stage it. It is ADR-0012's anti-cheat proof (red_exit,red_unexpected_pass, per-slice phase order), which previously died when/cleanuppruned the worktree.repo_refstays optional. It is not inMANDATORY_PATHSand/setupis untouched — promoting the key belongs with the 0.7.0 adoption (AC7). Each Box instead cancels with an actionable message naming the key and/unic-archon-dlc:setup(ADR-0011: expected precondition failures cancel, they do not fail).gh pr list --repo ""exits 0 and silently falls back to the host's own resolution, so a blank value has to be caught by the guard rather than by the CLI.git remote get-url origin. This plugin readsproject.repo_refinstead, because it must stay host-agnostic across GitHub and Azure DevOps. Every prompt says so inline, so a future reader does not "fix" it back to match upstream.$ARTIFACTS_DIRmeanings are disambiguated in every deny list: Archon's per-run environment variable (outside the repo, never staged) versus the in-repoartifacts_dirconfig value (whose session files are committed).Out of scope
Promoting
project.repo_refto mandatory, and the rest of the 0.7.0 surface (version floor,evidence_policy,always_run) — per the issue's own scope note.Verification
pnpm --filter unic-archon-dlc test(104 pass),pnpm --filter unic-archon-dlc typecheck,pnpm ci:check, andverify:changelogall pass. Version bumped to 0.12.1 with a dated changelog entry.Fixes #289
🤖 Generated with Claude Code