Repository navigation
Conversation
Both skills ran branch-mutating git in the main checkout without referencing the checkout lock (#901): they took no protection and, as non-holders, were refused mid-run when another session held the tree. - /merger acquires before its first guarded verb (baseline git checkout main), releases on every exit (happy path, regression halt, error), identified by its first issue number. - /release acquires after read-only pre-flight under a reserved sentinel issue id (999999999 — it has no issue and the lock/guard key on a positive integer), releases on happy path, rollback, and mid-release error. The --label alternative is left to a follow-up (schema+CLI+hook). - Mirrored byte-identical across the three skill dirs (lint:skill-sync). - Per-site mutation-verified gate tests + a contention proof driving the real pre-tool.sh (foreign holder refused, holder allowed). Entire-Checkpoint: 7b93572a52b5
… rendering Two gaps from the #911 QA pass: - /release's 'After git push, before npm publish' rollback relied on the Error Handling blanket alone; it now carries its own inline checkout-lock release, symmetric with the before-publish rollback. EXPECTED_RELEASE_SITES bumped 3 -> 4 with a new per-site gate test (mutation-verified). - The /release sentinel rendered as issue=#999999999 in `locks list` and the CLI release-refusal, inviting readers to look up a fake issue. Both CLI surfaces now render it as '/release (sentinel)' via describeCheckoutHolderIssue. The shared formatCheckoutLockedMessage and the hook's shell-side message are deliberately untouched: the hook mirrors that sentence in shell, and a TS-only rewording would drift the mirror (#871 class). The recovery hint keeps the literal numeric --issue form, which must stay typeable. Full --label=release support (schema + CLI + hook) remains the documented follow-up. Entire-Checkpoint: 3fff85533005
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.
Fixes #911.
/mergerand/releaseboth ran branch-mutating git in the main checkout while referencing the checkout lock (#901) nowhere: they took no protection (an interleaved branch switch from another session could land/merger's merge or/release's version-bump commit on the wrong HEAD) and, being non-holders, were themselves refused mid-run when another session held the tree.Both skills now copy
/fullsolve's Phase 0.3 contract:/mergeracquires before its first guarded verb (the baselinegit checkout main), identified by its first issue number, and releases on every exit path — happy-path completion (Step 8), the regression-gate halt (Step 7), and Error Handling — and not on branches that continue to a later mutation (the fix(locks): checkout release ignores holder identity on skip-pid-check locks — a blocked session's release contract unlocks the tree mid-run #906 distinction: the integrationgit mergeand mid-workflowgit checkout mainstay protected until the run ends)./releaseacquires after its read-only pre-flight, before the first mutation/approval pause, under a reserved sentinel issue id (999999999) — it has no issue of its own, and both the CLI and the numeric-onlypre-tool.shguard prove ownership by positive integer. The spec's--label=releasealternative would require schema + CLI + hook changes and is left to a follow-up (noted in the skill text). It releases on happy-path completion, the before-publish rollback, and the Error Handling blanket. The pre-flightexit 1branches deliberately carry no release call: the acquire is placed after pre-flight, so an abort there holds no lock (this refines spec AC-5's literal scenario in favor of its requirement — no exit path can leak a lock it never took).SEQUANT_ORCHESTRATOR(AC-6) and are mirrored byte-identical acrossskills/,.claude/skills/,templates/skills/(AC-7,lint:skill-sync44/44).Tests
merger-checkout-lock-skill.test.ts/release-checkout-lock-skill.test.ts— per-site gate tests, scoped to the delimited acquire section (extractor throws on rename rather than going vacuous), with release sites pinned as an exact count so a deleted site fails the count test.merger-release-checkout-lock.integration.test.ts— contention proof driving the real.claude/hooks/pre-tool.sh: a foreign session's first guarded command (git checkout mainfor merger,git reset --soft HEAD~1for release) is refused exit 2 naming the holder; the holding session runs it unrefused; and with no lock held the command passes (baseline isolating the cause).lint:skill-syncandlint:skill-callsclean.Mutation verification (CLAUDE.md gate-test rule)
skills/merger/SKILL.mdskills — exactly the expected number of release sites,skills — the regression-gate halt releases before it stops); 22/24 passed; restoredskills/release/SKILL.mdexactly one acquire block,the acquire fence uses the sentinel id and --skip-pid-check,acquire lands after read-only pre-flight); 21/24 passed; restoredExecution evidence
Sentinel round-trip against the built CLI, unchanged:
locks checkout acquire --issue=999999999 --skip-pid-check✓ →checkrenders the holder correctly →release --issue=999999999✓.Follow-up commit: QA gap fixes (
741ba8e5)Closes the two actionable gaps from the QA pass:
locks checkout release --issue=999999999call, symmetric with the before-publish rollback.EXPECTED_RELEASE_SITESbumped 3 → 4 with a new per-site gate test.locks listand the CLI's release-refusal now render the holder as/release (sentinel)instead ofissue=#999999999, viadescribeCheckoutHolderIssue()(new, exported withRELEASE_SENTINEL_ISSUEfromsrc/lib/locks). The sharedformatCheckoutLockedMessageand the hook's shell-side message are deliberately untouched — the hook mirrors that sentence in shell, and a TS-only rewording would drift the mirror. The refusal's recovery hint keeps the literal numeric--issue=999999999, which must stay typeable. Verified live against the rebuilt CLI (list row + refusal + release round-trip).The spec's AC-5 pre-flight clause divergence (documented above) and the prompt-only-enforcement caveat are design decisions, not defects — unchanged. Full
--label=releasesupport remains the follow-up.skills/release/SKILL.mdexactly the expected number of release sites,the after-push rollback releases before it stops); 25/27 passed; restoredPost-fix: 90/90 tests across the four affected files; build passes;
lint:skill-sync44/44.