Skip to content

aftermath Class-1 post-batch residual verification (v0.14.55) - #1067

Merged
Ljferrer merged 9 commits into
masterfrom
dev/2026-07-22-aftermath-class1-postdelete-verify
Jul 24, 2026
Merged

aftermath Class-1 post-batch residual verification (v0.14.55)#1067
Ljferrer merged 9 commits into
masterfrom
dev/2026-07-22-aftermath-class1-postdelete-verify

Conversation

@Ljferrer

Copy link
Copy Markdown
Owner

Campaign plan 7 of 92026-07-22-run-resilience-and-hardening. Stacked (ADR 0011) on dev/2026-07-22-war-memory-hardening (plan 6, PR #1061). Merge bottom-up: this PR merges after #1061.

Closes the one place in /aftermath where a construction bug converts directly into silent remote data loss — the batched Class-1 remote delete (git push origin --delete).

What changed

A new ### Class-1 remote deletes — post-batch residual verification subsection in skills/aftermath/SKILL.md: after the batch, re-list the remote once and diff survivors two ways against the retained pre-batch snapshot's hold set (the exact-refs/heads/<ref>-name complement of the delete list). A missing hold-set ref is a data-loss row (prints the snapshot SHA + the ready-to-run restore, run only behind an explicit confirm interactively / printed-only under --afk); a surviving delete-list ref is a failed-delete row. The run withholds its clean verdict until the diff is empty or every discrepancy is a report row. A set-difference construction advisory heads off the recorded near-miss (a while read-subshell exclusion filter that silently no-ops).

Prose-only encoding — matching how Class-1 executes (Lead-run by reading the skill). ADR 0027's C3 deletion bar is byte-unchanged: verification adds evidence, opens no deletion path, grows no autonomous ref-creation authority.

Drift protection: two has_i() pins in the existing Class-1 gate-evidence block (temp-break-proven); the four pre-existing assertions stay byte-untouched. The origin lesson's stale "not encoded anywhere" clause is amended in the same commit as the SKILL edit. CONTEXT.md gains a residual-set verification glossary entry.

Phases

phase tip result
1 — subsection + drift pins + same-commit lesson + glossary f8a06a8 2/2 tasks, 9/9 End states, 0 escalations
2 — Release (v0.14.55) 1edd92d 1/1, End state 10 met

Gate at land: full JS + shell suite green, war-memory lint clean, version-slots.test.mjs green. Zero follow-ups.

Red-team

CLEARED-WITH-NOTES (1 round). One needsDecision self-adjudicated + patched: the stale-claim sweep would hit the landed 2026-07-16 plan — exempted as a point-in-time record. The plan's own backstop #1 (throwaway file:// git-semantics demo) was exercised as a red-team probe and PASSED — git loses the hold ref under the buggy filter, the two-sided ls-remote diff catches it, and the snapshot-SHA restore recovers it.

Unexecuted backstops (AI-declared, ADR 0014)

check why deferred runner
Throwaway-repo demonstration of the residual diff + restore committed behavioral test of git's own semantics is a spec §9 non-goal; aftermath has no test-asset family (ADR 0027) /red-team — already exercised in this plan's red-team pass (PASSED)
Prose truth beyond the two drift pins the known ceiling of the grep-guard family /red-team prose read + landing-PR review
First live Class-1 execution with the verification Class-1 is Lead-executed prose over live git state; not fixture-able in CI operator, at the next /aftermath on the released plugin

🤖 Generated with Claude Code

WAR Test and others added 9 commits July 23, 2026 10:49
… (1 round)

Patched End state 6 + Task 1.1's stale-claim sweep to name the landed
2026-07-16 plan (docs/plans/2026-07-16-aftermath-class1-gate-evidence.md) as
deliberately-left-uncorrected — a landed plan is a point-in-time record, never
retro-edited (same rule the plan already applied to the dated spec Context band).
Resolves the one needsDecision; deterministically re-verified that every
`grep -rn 'not encoded'` hit is now adjudicated.

Executed proof: the plan's own backstop #1 (throwaway file:// repo git-semantics
demo) run as a probe — PASS: the buggy while-read exclusion filter silently loses
the hold ref, the two-sided ls-remote diff catches it, the snapshot-SHA restore
recovers it. All 6 spine + 3 bespoke probes on-target; escape guard clean.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
… pins + lesson amendment (#1064)

Coupled Task 1.1 — all three files in ONE commit (spec criterion 5: the commit
touching the lesson IS the commit touching the SKILL; the drift guard travels
with the prose it pins).

- skills/aftermath/SKILL.md: new body-only subsection
  '### Class-1 remote deletes — post-batch residual verification', placed
  between the stranded-upstream `-d` refusal subsection and Class-4 join rule,
  carrying six one-line-paragraph items: (a) retained (never retaken) ls-remote
  snapshot + exact-`refs/heads/`-name complement hold set; (b) set-difference
  construction advisory naming the piped `while read` subshell silent-no-op;
  (c) two-sided post-batch `git ls-remote --heads` diff (hold-set survival =
  invariant, missing = data-loss row, SHA drift informational; delete-list
  survivor = failed-delete row, never re-batched); (d) clean-verdict rule under
  any flag incl. --afk; (e) snapshot-SHA restore `git push origin
  <snapshot-sha>:refs/heads/<ref>`, interactive-confirm-only / --afk print-only;
  (f) zero-local-refs hygiene note. Gate cell, C3 paragraph, four-class table,
  known-stranded.tsv, frontmatter byte-untouched.
- skills/war-machine/war-pipeline-structure.test.sh: two mandated has_i() prose
  pins ('hold set must survive', 'before declaring the run clean') + one
  optional has() pin (':refs/heads/' restore refspec, worker latitude) appended
  inside the existing Class-1 gate-evidence block, after its two row-scoped
  checks, before the summary printf; sub-comment cites the 2026-07-22 spec. The
  block banner and its four pre-existing assertions stay byte-untouched.
- docs/learnings/aftermath-remote-stranded-differs-from-local-tip-reachability.md:
  the 2026-07-16 dated line's 'not encoded anywhere / standing warning' clause
  amended in place to record the 2026-07-22 encoding, citing the spec path; one
  line stays one line; metadata.keywords += 'residual-set hold-set'; description
  frontmatter and third body paragraph byte-untouched. war-memory lint clean.

Anchors: each greps to exactly one region of SKILL.md (the new subsection),
zero-hit at the 2026-07-22 base; `ls-remote` banned (6× in the SKILL).

Red-proof (temp-break — subsection reverted, three new pins go red):
  RED(absent):   has_i 'hold set must survive'
  RED(absent):   has_i 'before declaring the run clean'
  RED(absent):   has   ':refs/heads/'
Subsection present -> all three GREEN; the block's four pre-existing assertions
(git cherry, --unset-upstream, both row-scoped gate-cell pins) stay green
byte-unmodified across the revert.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Add the residual-set verification term to the Class-1 glossary
cluster, anchored immediately after the stranded upstream entry
(acknowledged-stranded -> patch-equivalence probe -> stranded
upstream -> residual-set verification). Documents the post-batch
git ls-remote two-sided diff against the pre-batch snapshot's hold
set: a missing hold-set ref is a data-loss row (snapshot SHA +
restore command), a surviving delete-list ref is a failed-delete
row, and the run is not clean until the diff is empty or fully
reported. References SKILL prose landing in Task 1.1 (same phase)
by named construct only.

Task 1.2 of docs/plans/2026-07-22-aftermath-class1-postdelete-verify.md.
…-1 into dev/2026-07-22-aftermath-class1-postdelete-verify
…ktree-lag recurrence 17

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

Bump all four version slots in lock-step to the next free patch above the
live integration base: plugin.json `version`, marketplace.json
`metadata.version` and `plugins[0].version`, and the README `## Status` line
(replace-in-place, no badge). All four slots read 0.14.54 at the phase base —
the global max across every local/remote ref and tag — so 0.14.55 is the next
free patch, resolved from the four slots as they stand in the rebased tree
(version-slots.test.mjs is the arbiter; plan v-literals are non-authoritative).

Status blurb (additive/precise; Class-1-remote-batch-scoped doctrine the Lead
follows by reading the skill — not a mechanized floor, gate, or test): after
the batched `git push origin --delete`, /aftermath re-lists the remote and
diffs survivors two ways against the retained pre-batch snapshot — a missing
hold-set ref is a data-loss row with snapshot SHA + restore command
(interactive-confirm-only / --afk print-only), a surviving delete-list ref is a
failed-delete row; the run withholds its clean verdict until the diff is empty
or every discrepancy is already a report row. ADR 0027's C3 deletion bar is
byte-unchanged (verification adds evidence, no new deletion path, no autonomous
ref-creation under --afk). Prior release prose left as-is.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…thin one plan)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
cae15d3 (docs(learnings): phase 2) inadvertently committed stale 0.14.54 version
files from a lagging verify worktree over the 0.14.55 release set by the phase-2
merge 1edd92d — reverting plugin.json, marketplace.json (metadata + plugins[0]),
and the README ## Status blurb back to plan 6's release. version-slots.test.mjs
did not catch it: all four slots were reverted in lock-step, so the lock-step
invariant still held. Restores the four slots + aftermath Class-1 blurb to their
1edd92d (0.14.55) state.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Base automatically changed from dev/2026-07-22-war-memory-hardening to master July 24, 2026 03:34
@Ljferrer
Ljferrer merged commit ab95094 into master Jul 24, 2026
1 check passed
@Ljferrer
Ljferrer deleted the dev/2026-07-22-aftermath-class1-postdelete-verify branch July 24, 2026 03:34
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.

1 participant