Skip to content

Land-advance exit-contract truth — align every live standing record with 0/2/3/6, close the unresolvable-HEAD test gap (0.14.58) - #1097

Merged
Ljferrer merged 9 commits into
masterfrom
dev/2026-07-24-land-advance-exit-contract-truth
Jul 26, 2026
Merged

Land-advance exit-contract truth — align every live standing record with 0/2/3/6, close the unresolvable-HEAD test gap (0.14.58)#1097
Ljferrer merged 9 commits into
masterfrom
dev/2026-07-24-land-advance-exit-contract-truth

Conversation

@Ljferrer

Copy link
Copy Markdown
Owner

Plan 1 of 6 in campaign 2026-07-24-standing-record-and-guard-hardening (stack-and-plow, ADR 0011).
Plan: docs/plans/2026-07-24-land-advance-exit-contract-truth.md · Red-team: CLEARED
(docs/red-team/2026-07-24-land-advance-exit-contract-truth.md) · Release 0.14.58.

skills/war/assets/provision-worktrees.sh is byte-untouched. This ships corrected standing
records and new test coverage — no script behavior changed.

Phases landed

Phase 1 — Standing-record truth sweep + T2.5d coverage (epic #1090, landed 09e49690)

task issue what
1.1 #1092 The prefetched land-path lesson and its portability-stripped seed-corpus twin now state the 0/2/3/6 exit contract (frontmatter description, **Exit contract:**, **How to apply:**, plus a nested wrong-HEAD precheck keyword). Tarball member edited in place and re-packed via seed-pack.mjs, never blind-copied.
1.2 #1093 New case T2.5d fixtures the previously-untested unresolvable-HEADEX_FOREIGN arm on an orphan-HEAD fixture: exit exactly 3 (never 2/6), die text could not resolve HEAD to a commit, local + origin refs byte-unchanged. T2.9's census rewritten count-free.
1.3 #1094 ADR 0023's amendment no longer claims the 0/2/3 contract is byte-unchanged; decision (B)'s normal-path bullet gains a deferring parenthetical. Owns the repo-wide sweep adjudication.

Phase 2 — Release (epic #1091, landed 9cd713f5) — task 2.1 (#1095): all four version slots
in lock-step at 0.14.58 (plugin.json version, marketplace.json metadata.version and
plugins[0].version, README.md ## Status replace-in-place, no badge). Target resolved from the
live slots at implementation time, not from a plan literal.

Audit: 4/4 tasks approve, 0 fix rounds, 0 escalations, 0 aced. Post-merge gate-audit
(execution-evidence, then phase-2-end-state) approve with gate evidence at both pinned tips.

Unexecuted backstops

  • node skills/_shared/war-memory.mjs lint docs/learnings/ exits 0 on the edited lessons ·
    why deferred: the redaction lint is CI-only and never gate-composed, so a plan End state citing
    it would be structurally SOFT · runner: CI (memory-audit.yml) on this PR · source: plan.
    (Run locally at both Gate-2 publications and clean both times, but the ratified runner is CI.)

Executed, no longer deferred: integrated-tip repo-wide file-type-unfiltered 0/2/3 sweep
run by the Lead at the Phase-1 land against the spec §4.4 table. PASS: every hit either fixed by
this plan or convention-exempt (historical specs/plans, the archived lesson, D15 rows, the T2.9
arm-local CLASSIFY citation, ADR 0023's two accurate arm-local clauses). One hit outside the
drafting-time table — this plan's own red-team report — adjudicated leave, same dated-record class.
No unadjudicated live standing hit. source: plan, neither backstop AI-declared.

retired-token sweep: 'shared by T2.3/T2.6' + 'the 0/2/3 contract are byte-unchanged' — 0 repo hits / 0 local hits / 6 exempt (phase 1) · retired-token sweep: n/a (phase 2).

Learnings captured

Gate-2 promoted 4 type: project lessons to docs/learnings/ (redaction lint clean):
closure-rationale-infeasibility-claim-needs-code-trace-not-assertion (RESOLVED — T2.5d closes
exactly the arm an earlier phase-close wrongly waived as unfixturable),
plan-mandated-test-comment-uniqueness-claim-can-be-code-traceably-false (new),
seed-manifest-description-is-frontmatter-only-body-fix-needs-tarball-verify (new),
full-gates-green-end-state-soft-without-threaded-gate-log-artifact (recurrence 3).

Escalations resolved · follow-ups

Escalations: none. Follow-up issues filed: none.

Two disclosures, neither blocking:

  1. A known inaccuracy ships in this PR. Task 1.2's T2.9 census asserts the push-error branch is
    "the only SILENT exit-3 route". Code trace at the landed tip shows a second silent exit-3 —
    the post-push origin-readback-mismatch arm ([ "$actual" = "$new_sha" ] || exit 3). Two auditor
    seats found it independently and both dispositioned it note rather than absorb, because the
    wording is mandated verbatim by the plan slice, so correcting it would be a plan deviation.
    Zero behavioral impact (the arm is unreachable for that fixture; route identity still rests
    soundly on (b)+(c)+(d)). Routed: the one-line correction is folded into campaign plan 2
    (2026-07-24-runbook-and-standing-record-coherence) as a pre-red-team plan edit. Captured as the
    promoted lesson plan-mandated-test-comment-uniqueness-claim-can-be-code-traceably-false.
  2. Memory prefetch was omitted for this run (fail-open). The Workflow sandbox has no filesystem
    and args pass inline; the prefetched args object came to 57 KB, too large to thread faithfully.
    Workers and auditors read full slices and Commander's Intent from the plan committed on the
    working branch instead — the same degradation as the memory-disabled path.

Closes #1035, #1036, #1037, #1038.

🤖 Generated with Claude Code

WAR Test and others added 9 commits July 24, 2026 12:23
…seed-body predicate)

Ports the red-teamed plan (ES9 strengthened to verify the seed tarball
member body directly) and its red-team report onto the campaign dev branch
so /war worker worktrees see the final plan.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…ontract (#1092)

Align the prefetched land-path lesson and its portability-stripped seed-corpus
twin with cmd_land_advance's canonical header (0/2/3/6); the script is
byte-untouched — this is a standing-record truth fix.

- description: exit 0/2/3 -> 0/2/3/6 contract (6 = wrong-HEAD precheck)
- Exit contract: name exit 3's widened unresolvable HEAD/<new-sha> triggers and
  add the exit-6 wrong-HEAD precheck refusal arm (nothing pushed, local and
  origin refs untouched, never a reland)
- How to apply: 0/2/3 -> 0/2/3/6 (defers to the script header, unchanged)
- metadata.keywords: + wrong-HEAD precheck (nested; retrieval-verified)

Seed twin edited in place (stripped shape preserved: no phase/tasks/related/
originSessionId, no Related line) and the pair re-packed via seed-pack; the
manifest description/bytes/sha256 regenerate from the corrected member, all
other members byte-unchanged. Task 1.1 (#1035 + survey-derived).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…nsus (#1093)

Add sibling case T2.5d to provision-worktrees.test.sh proving cmd_land_advance's
unresolvable-HEAD precheck arm dies EX_FOREIGN (3) — the one die arm the
phase-close waiver claimed unfixturable. An orphan/unborn HEAD
(git checkout -q --orphan <fresh-name>) with a resolvable, origin-distinct
<new-sha>: control passes the step-0 guard arms (rc-guard, phantom, already-
landed) and dies at HEAD^{commit} with 'could not resolve HEAD to a commit';
local + origin refs byte-unchanged; exit exactly 3 (never 2, never 6). Comment
records the fixture notes (fresh orphan name — --orphan <existing> refuses rc
128; the index-staged tree the fixture ignores; HEAD resolved before <new-sha>,
so <new-sha> is passed resolvable). Red-proven: asserting exit 6 or T2.5c's
'does not resolve to a commit' die text fails.

Rewrite the T2.9 route-identity census count-free — replace 'Exit 3 alone is
shared by T2.3/T2.6' with an invariant (exit 3 shared by multiple routes, every
one dying loudly with route-naming text except the silent push-error branch;
identity rests on (b)+(c)+(d)) so T2.5d's new exit-3 route cannot re-stale it.
No T2.x enumeration in the replacement paragraph; the (b)/(c)/(d) assertion code
byte-unchanged. provision-worktrees.sh stays byte-untouched.

Underlying war-followup issues #1036, #1037.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…g sentence

#1094 (Task 1.3, land-advance-exit-contract-truth plan). The 2026-07-22
amendment's "Consequence" paragraph claimed the "0/2/3 contract" was
byte-unchanged, which is false: exit 3 gained two new triggers (unresolvable
HEAD, unresolvable <new-sha>) and exit 6 is entirely new. Narrow it in place
(no appended correction paragraph) to what is actually byte-unchanged — the
push form and the [rejected] exit-2 classification — and name exit 3's
widened triggers and exit 6 truthfully, matching the script header's own
wording in provision-worktrees.sh's cmd_land_advance.

Also append a deferring parenthetical to decision (B)'s pre-amendment
"The 0/2/3 exit contract is unchanged." bullet, pointing to the amendment
below for the widened contract, so a reader who stops at (B) isn't misled.

Repo-wide file-type-unfiltered `grep -r '0/2/3'` sweep re-run and every hit
adjudicated per spec §4.4 (see PR/done-report for the full table): no new
unadjudicated live standing hit outside the plan's three task footprints.

Co-Authored-By: WAR Worker <noreply@anthropic.com>
Gate-2 promotion of the three type:project lessons the servitor captured for
2026-07-24-land-advance-exit-contract-truth Phase 1 (landed @ 09e4969).

- closure-rationale-infeasibility-claim-needs-code-trace-not-assertion —
  RESOLVED update: T2.5d fixtures the EX_FOREIGN unresolvable-HEAD arm that an
  earlier phase-close waived as "cannot be fixtured".
- plan-mandated-test-comment-uniqueness-claim-can-be-code-traceably-false — new.
- seed-manifest-description-is-frontmatter-only-body-fix-needs-tarball-verify — new.

Redaction lint clean. CLAUDE.md pointer already present (untouched).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Trailing release phase for the land-advance-exit-contract-truth plan: users
receive Phase 1's corrected standing records (the prefetched land-path lesson,
its portability-stripped seed-corpus twin, ADR 0023) and the new T2.5d test
coverage only via a release.

All four slots move in lock-step (a partial bump is a silent no-op release and
a red version-slots.test.mjs): plugin.json#version,
marketplace.json#metadata.version, marketplace.json#plugins[0].version, and
the README ## Status line (replace-in-place, no badge).

0.14.58 resolved as the next free patch from the four slots as they stand at
implementation time — verified against every origin branch and tag: nothing
anywhere carries above 0.14.57.

The release blurb is additive and records-scoped: it states what the standing
records now say (0/2/3/6) and that the unresolvable-HEAD precheck arm gained
deterministic coverage. It claims no script behavior change —
skills/war/assets/provision-worktrees.sh is byte-untouched by this plan.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
… into dev/2026-07-24-land-advance-exit-contract-truth

Phase 2: trailing release phase — version bump to 0.14.58.
Gate-2 promotion of the one type:project lesson the servitor captured for
2026-07-24-land-advance-exit-contract-truth Phase 2 (Release 0.14.58, landed
@ 9cd713f).

- full-gates-green-end-state-soft-without-threaded-gate-log-artifact —
  Recurrence 3: a Release End state bundling "four slots in lock-step" with
  "full gates green" splits into a HARD-verifiable structural half and a
  SOFT cannot-confirm half whenever no gate-log artifact / pin_status token
  is threaded into the gate-audit's own prompt. Never a hold.

Redaction lint clean. Staged from a worktree at the landed tip, so the
0.14.58 release bump is carried forward, not reverted.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Repo-root lesson states land-advance exit contract as 0/2/3 — exit 6 (EX_WRONG_BRANCH) now missing

2 participants