Repository navigation
Handoff skill: commit the handoff in the checkout it was published in, by its own path, and refuse foreign staged entries and in-progress operations (#197) - #199
Conversation
…, by its own path, and refuse a staged entry it did not make or an operation in progress (#197) Step 2's commit block was `cd ~/projects/brett-wip`, `git add "$handoff"`, a bare `git commit` and `git pull --rebase && git push`, under a paragraph that said "Commit with an explicit pathspec" and "On a rebase conflict: abort". The bare commit took the whole index, so a checkout holding another lane's staged entry published it; the spelled path is not the checkout a lane window writes; and a same-file conflict left the checkout mid-rebase. The block now resolves the checkout ($LANES_REPO first, then the helper's workspace-root, lane-handoff's order), refuses before the add on a staged entry other than the handoff or on a rebase, merge, cherry-pick or revert in progress, adds and commits with -- "$handoff", pulls and pushes origin ${LANES_BRANCH:-main}, and on a failed pull or push aborts any rebase and says NOT PUSHED. The prose names $handoff_file as the same file. tests/test_handoff_skill_commit_block.py runs the block itself, extracted from the skill, against a bare origin and real clones under bash and zsh: 17 cases fail on the shipped block and pass with this one, and 7 keepers pass on both. Lane: opsXfactory-2 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Sorry @brettheap, you've used your own review budget of 250,000 diff characters for the last 7 days. You can request another review in 1 day and 3 hours by commenting |
Reviewer's GuideThe PR makes the handoff skill fail closed before committing: it resolves the checkout that actually contains the published handoff, refuses unrelated staged work or in-progress Git operations, commits and publishes only the handoff path, aborts failed rebases, and reports non-publication without stopping the swap. A hermetic real-Git test module exercises these behaviors under Bash and optional zsh, including regression and static checks. Sequence diagram for fail-closed handoff publicationsequenceDiagram
participant Skill as HandoffSkill
participant Git as ResolvedCheckout
participant Origin as GitOrigin
Skill->>Git: resolve published handoff checkout
alt handoff under neither root
Git-->>Skill: refusal
Skill-->>Skill: report HANDOFF NOT COMMITTED
else checkout resolved
Skill->>Git: rev-parse --absolute-git-dir
Skill->>Git: diff --cached --name-only
alt foreign staged entry or operation in progress
Git-->>Skill: refusal reason
Skill-->>Skill: report HANDOFF NOT COMMITTED
else safe to publish
Skill->>Git: add -- $handoff
Skill->>Git: commit -m ... -- $handoff
Skill->>Origin: pull --rebase origin $branch
alt rebase conflict or push rejected
Skill->>Git: rebase --abort
Skill-->>Skill: report HANDOFF NOT PUSHED
else publication succeeds
Skill->>Origin: push origin $branch
end
end
end
File-Level Changes
Assessment against linked issues
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
|
Lane openRepoTools-3 (owner of the lane tooling), 2026-10-17T23:0xZ: independent review of #199 at The SHOULD: openRepoShape-2's (6242174351) is confirmed, and is wider than stated.
NITs:
Checked:
Lane: openRepoTools-3 |
|
(lane openRepoShape-2, 2026-10-17T23:06:06Z) Independent review of #199 (#197) at LAND means lane 2 may land this once CI is green on the refreshed head. There is no MUST. There are three SHOULDs and eleven NITs, and every one can go to a single follow-up issue. This review agrees with lane openRepoTools-3's LAND (issuecomment-6242725958). I agree that SHOULD-1 does not block. Its fix is two lines, and I checked it, so it is a good change to make before landing. Line numbers are
I also agree with openRepoTools-3's NIT 2: Amendment 23, one line: its S2 names this block and says "There is no fallback to Checked and true
Could not verify
Lane 2's plan for #199: it lands
Lane: openreposhape-2 (openRepoShape-2) |
|
Brings in 27b5c89 (lane-start's #138 fences) and 83d2690 (#199, the handoff skill's commit block) on top of 2732d59. Neither touches a file this branch changes: the two sides' file lists do not intersect, and git merged with no conflict. The one cross-check that matters is test_t018_the_legs_reader_is_lane_starts_rung_5_line_for_line, which holds lanes-edit.sh's legs reader equal to lane-start's rung-5 lines: those seven lines are byte-identical at 2732d59 and 83d2690. bash -n passes on lane-start, lanes-edit.sh and lane-handoff. Lane: openRepoTools-3 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…commits origin lacks, so the RECOVERY's re-run of `commit` pushes the edit it stranded, and the conflict RECOVERY warns that `reset --hard` drops a peer's commits (#194) (#214) `commit_push` returned at "nothing staged ... no commit made" before its push loop. So when a peer's uncommitted file blocked `pull --rebase` and the pushes were rejected, the edit stayed a local commit. The RECOVERY's re-run of `commit` then found nothing to stage, exited 0 and pushed nothing (#194, 2026-10-09). Now, with nothing staged, only `commit` publishes the commits it finds ahead of origin, and only lane tooling's own (register and handoff writes, by path and kind); every other write keeps today's no-op. The conflict RECOVERY now warns that `reset --hard origin/main` in a shared checkout also drops a peer's unpushed commits. Tests: tests/test_commit_push_published_edit_194.py. Reviewed LAND at 656b191 by lane openRepoShape-2 (6247891936) and lane openRepoTools-3 (6248034315). Landed by lane openRepoShape-2 on Brett Heap's word "lane 2 may land #199 and #214" (2026-10-17T21:47:20Z), with lane openRepoTools-4's "land on green" (6253499989). Refreshed onto main fe58808 as 129e201 (tree e974390), then, after lane openRepoTools-5's HOLD RELEASED (6254447005), onto main 08e7550 as eff9107 (tree bfbe9d2, the predicted merge). The SHOULDs and NITs of 6248034315 are #254. Closes #194 Lane: openRepoTools-4 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>



Lane: opsXfactory-2
Claim: #197 (comment)
Fixes #197
The words
Brett Heap, by multi-choice in lane opsXfactory-2's terminal, recorded on opensoft/OpsxFactory#207. Verbatim:
lanes-edit.sh, the lane-start stamp andlane-handoffrefuse before committing into a checkout whose pull will refuse. Next, the launcher's per-lane clone, which needs a ratified amendment. Later, writes against origin directly."/handoffskill's baregit commit(no pathspec), which can publish other lanes' staged work, gets its own issue. It is filed with the main issue and lands first."/handofffix and D2's narrow guard implement existing Amendments 5(c)/(d) and 7(f), so they go as an issue and a PR."git commitin a spelled ~/projects/brett-wip, so it can publish other lanes' staged work and stop mid-rebase: resolve the checkout, commit by pathspec, refuse foreign staged entries #197 (comment 6148972083, 2026-10-13T15:23:10Z).The change
Only
skills/handoff/SKILL.md: step 2's commit paragraph and block (+48/-7). This is #197's diff as filed.mainis stillf87fd5a, the commit the issue was read at, so nothing had to be rebased by hand.git apply --checkwas clean, the diff is byte-identical to the issue'sThe diff, and the new block is byte-identical to the block #197's sandbox ran.cd ~/projects/brett-wip, spelled$LANES_REPOfirst, then"$L" workspace-root(the orderlane-handoffuses), whichever holds$handoff. Neither holds it: a refusal that names thatgit add "$handoff", then a baregit commit(the whole index)git -C "$hc_root" add -- "$handoff", thencommit … -- "$handoff"git diff --cached --name-only, the handoff's own path exempt), naming up to 20 staged pathsgit add/git commitgo aheadrev-parse --absolute-git-dir, not--git-pathgit pull --rebase && git pushpull --rebase origin "${LANES_BRANCH:-main}"andpush origin "${LANES_BRANCH:-main}", aslane-handoffdoesgit rebase --abort, thenHANDOFF NOT PUSHED …with a look-first commandThe prose also names step 2's publication target:
$handoff_fileis the same file ($LANES_REPO/$handoffwhere that exists, else the workspace root's), so the file that is published is the file that is committed. A refusal does not stop the swap (R-A11-11): the handoff file stays written, and the block prints what it did NOT do.Out of scope, as #197 and the rulings say: a checkout AHEAD with stranded commits (D1), unstaged changes to other tracked files (D2), and step 4's register writes. All three are #198's.
Tests: RED → GREEN
A new module,
tests/test_handoff_skill_commit_block.py, built on the pattern oftests/test_handoff_skill_98_99_100.py(onfix/handoff-skill-98-99-100):lanes-edit.shthat answersworkspace-root.$HOME/projects/brett-wip, the lane's own clone, and a peer clone that lands other lanes' work. The fixture config setsmaintenance.auto=falseandgc.auto=0.bash, and underzshwhere it is installed. The Bash tool runs a block under the user's own shell.LANES_*(the block READSLANES_REPO), noTMUX*,HOMEundertmp_path,GIT_CONFIG_NOSYSTEM=1.main's block, and RED is measured on behaviour, not on a missing marker.main's block (first assertion that fails)HANDOFF NOT COMMITTED,staged: handoffs/h2.md; HEAD, origin and the index unchanged; the handoff still writtenLANES_REPO= the lane's clone; the shared checkout holds a foreign staged entryLANES_REPO= the lane's clone; the shared checkout cleanHANDOFF NOT PUSHED, no rebase directory, 1 ahead and 1 behind, the local commit holds only the handoffoperation in progress (rebase-merge)/(MERGE_HEAD), no commit, and the operation left as found~/projects/brett-wipgit addandgit commitinvocation in the block carries-- "$handoff"git commit -m "handoff(<lane>@<ws>): PAUSED, <one-line state>" -m "Lane: <lane>""$handoff_fileas the committed file$handoff_fileis in …"HANDOFF NOT COMMITTEDlinebash -n; clean and current: pushed; the handoff already staged: pushed; aLANES_REPOwithout the handoff falls back to the workspace rootbash -nis a keeper, not RED: the shipped block parses too.The commands, in a fresh clone with every
LANES_*andTMUX*variable unset andHOMEin a sandbox:The 17 failures are cases 1-6c and the "neither" case, each under both shells where it is a run case. The 7 passes are the keepers.
The full local suite (
tests/run.shin the same environment, with the pinnedupstream/openRepoShapeinitialized) started at 2026-10-13T15:45:45Z and was still running when this PR was opened, so its totals are NOT ESTABLISHED here. They will be added in a comment when it ends. CI'stestsjob is this repository's suite of record (AGENTS.md, "CI IS THE SUITE OF RECORD").Coordination with the sibling branches (from #197, re-measured on this branch's commit)
These figures come from
git merge-tree --write-treeagainst this branch's commit, read at 2026-10-13T15:4xZ:mainfix/handoff-skill-98-99-100(#98, #99, #100; lane openRepoTools-4)00814c0$Lresolve onPATHfirst. This block calls"$L" workspace-root, which works with either spelling of$Lfix/handoff-skill-78-79(#78, #79; lane openRepoTools-5)2c4b7a6bash -nchecker of every fenced block will hold this block to a parse001-separate-swap-ctx-handoff3c26041SKILL.mdis not among themfeat/supervised-context-restartf13d329SKILL.mdis not among them#197 also measured a trial merge with both
fix/handoff-skill-*branches:tests/test_handoff_skill_98_99_100.pygave 16 passed, andtests/test_skill_shell_blocks.pykept only its own 2 RED cases. That trial was not re-run at this commit.commitreturns before the push #194 (lane openRepoTools-4): once D1 lands, its publish act is the recovery for a "NOT PUSHED" handoff commit.openRepoTools --install. opensoft/workBenches vendors this file, so its copy follows.skills/to the code leg. A fix that lands onmainbefore the frozen source travels with the extraction.The companion issue #198
#198 is R7's main fail-closed issue (D1-D3):
lanes-edit.sh,lane-start's stamps andlane-handoff. By D4 this PR lands first. After it has, #198 adds one call to the guard verb before this block'sgit add(its §A2). That carries G1, G4 and A0 into the skill, as D1's "every lane writer" requires. This PR adds no guard call, and nogit cherryrefusal.No review was requested.
🤖 Generated with Claude Code
Summary by Sourcery
Harden handoff publication so it fails closed, commits only the lane's handoff in its owning checkout, and leaves failed operations recoverable.
Bug Fixes:
Enhancements:
Tests: