Repository navigation
Description
Lane: xfactory-2 (xFactory-2)
Governing record for a defect in update-shape.py: apply refuses a both row before it consults --accept-local, so the exit AGENTS.md documents for both — "merge by hand, commit, then re-run with --accept-local <path> on the file you merged" — cannot be taken. Found 2026-09-10 running S4 of #77 on the two adopted roots InkRouter/IRRS and InkRouter/IRSS (their #13s), on Brett Heap's word "apply the shape update to the holder and both roots".
Reproduction (both roots, identical)
update-shape.py check at target 3abeb8a: AGENTS-shape.md upstream-changed, Makefile BOTH — upstream changed the template in #80 (make park/make resume), and the root's copy "is not a verbatim copy of templates/assembly-root/Makefile at the pinned commit — an in-place adoption appends to it". The Makefile merge was made by hand exactly as AGENTS.md says (upstream delta applied, the adoption's CONTRACTS_DIR block preserved; diff <(merged minus the local block) <(template@3abeb8a) empty; make -n park parses; make park ARGS=--dry-run reaches the extension), committed on shape/update-3abeb8a4a27e, and then:
update-shape.py apply --root <root> --at 3abeb8a4a27e --yes --accept-local Makefile --branch shape/update-3abeb8a4a27e
REFUSED update-conflict: these files changed on BOTH sides, or cannot be compared, and a merge is a human's judgement rather than a byte copy:
Makefile: edited here AND upstream since the pin
Remediation: merge each one by hand (...), commit it, then re-run this with --accept-local on that path so the row is recomputed from what you merged.
The remediation the refusal prints is the command that was just refused.
Cause (read in the source)
cmd_apply (:1049) computes :430) marks a row conflicts = [row for row in rows if row.is_conflict] and refuses unconditionally when it is non-empty; --accept-local is consulted only by the later LOCALLY_MODIFIED check. classify() (BOTH whenever the upstream template changed between the pinned and target commits AND the root's copy is not verbatim at the pinned commit. For an adopted root that appended to the Makefile, "not verbatim at the pinned commit" is PERMANENT, so BOTH fires on every future upstream touch of that file regardless of the working bytes or the pin row's recorded digest. Verified two ways in a scratch clone: (1) merged Makefile, pin row untouched → refused ("edited here AND upstream since the pin"); (2) merged Makefile AND the pin row hand-patched to its digest → still refused ("not a verbatim copy … appends to it"). This is the first time it could surface: the two earlier re-syncs (122d729 → 99b3774 → 6fe09a4) never touched the Makefile upstream.
Secondary: commit_on_branch() (~:996) runs git checkout -q -b <name> itself, so apply --branch <name> fails when the branch already exists — which the documented both flow requires (the hand merge is committed on that branch first). Moot today because the conflict refusal fires earlier; not moot once it does not.
The fix
--accept-local <path>on abothrow means what AGENTS.md says it means: the person merged that file and is re-pinning it FROM THE PROJECT'S OWN BYTES.cmd_applyexcludes accepted paths from the conflict refusal, does not copy upstream bytes over them, and recomputes their pin row from the working file (exactly what--accept-localalready does forlocally-modified). An unacceptedbothrow still refuses, with the same wording.check's verdict text forbothgains one sentence naming--accept-localas the exit.--branch <name>: if<name>is the CURRENT branch and it is not the tracking branch, commit onto it; if it exists and is not current, refuse by name; else create it as today. The tracking-branch refusal stays.- Tests in
tests/test_update_shape.py: a root with an appended Makefile (mirror an adoption), upstream touches the template →checksaysboth;apply --accept-local Makefileafter a hand merge re-pins from the merged bytes, copiesAGENTS-shape.md, movescontracts/shape-pin.yamland the manifest'sshape:block, and the root's ownvalidate-pins.pyis green;applyWITHOUT--accept-localstill refuses with the existing wording;--accept-localon a path that isbothbut whose bytes were NOT merged is still accepted (it is the person's word — say so in the test's docstring);--branchonto the current non-tracking branch commits there; onto an existing non-current branch refuses. - AGENTS.md "Updating a project's shape" point 4 stays true; add that the merge commit goes on the branch
applyis then pointed at with--branch.
Reach: update-shape.py, tests/test_update_shape.py, AGENTS.md (a clause). Then the two roots' updates (IRRS#13, IRSS#13) rerun apply at the new main and land.
🤖 Generated with Claude Code
Activity
brettheap commentedon Sep 10, 2026
CLAIMED — lane xfactory-2 (xFactory-2), session harness 47c80b53-25d0-407b-8e19-432e9316bf61, 2026-09-10T02:56Z, for the fix above, branch
fix/update-shape-accept-local-both. It unblocks S4 of #77 on InkRouter/IRRS#13 and IRSS#13, where the hand-merged Makefiles sit committed on their shape branches. Brett Heap's word for the update these roots need: "apply the shape update to the holder and both roots" (2026-09-10).Reads before claiming: 1. comments here: none. 2. open PRs: #83 (this lane's, #82) only;
--search 'accept-local both'issues: none prior. 3. branches: none matching accept-local|update-shape.brettheap commentedon Sep 10, 2026
(lane xfactory-2 (xFactory-2), 2026-09-10T03:24Z) PULL REQUEST OPEN: #85 (
fix/update-shape-accept-local-both, head 1f8d573). Proven on a clone of InkRouter/IRRS's shape branch before opening.test_update_shape.py: the adopted-root fixture builds on the existing…
update-shape.py: --accept-local re-pins a `both` row from the merged …
brettheap commentedon Sep 10, 2026
(lane xfactory-2 (xFactory-2), 2026-09-10T03:47Z) MERGED — #85 → 8702373 (squash), on Brett Heap's word "merge 85 when green and rerun apply on both roots". Object complete; the roots' reruns follow under InkRouter/IRRS#13 and IRSS#13.