Skip to content

fix(getff-freshness-widening): S1b — close the two round-3 MINORs (emitted proof corpus · shipped-layer narrative) - #1356

Merged
artyhoo merged 2 commits into
stagingfrom
fix/getff-s1b-round3-minors
Aug 10, 2026
Merged

fix(getff-freshness-widening): S1b — close the two round-3 MINORs (emitted proof corpus · shipped-layer narrative)#1356
artyhoo merged 2 commits into
stagingfrom
fix/getff-s1b-round3-minors

Conversation

@artyhoo

@artyhoo artyhoo commented Aug 10, 2026

Copy link
Copy Markdown
Owner

Summary

Closes the two MINOR findings the round-3 cold fidelity audit recorded against getff-freshness-widening S1b. Both were deliberately left out of #1353 because folding them in would have moved the PR head off the audited SHA (packages/core/hooks/checks/pr-body-fidelity.ts:165 requires Audited-SHA to prefix the head), so they land here as a follow-up. Neither changes behaviour: one restores fidelity between a proof fixture and the artefact it certifies, the other removes review narrative from a file that ships to consumers.

Changes

  • MINOR 1 — the M1 proof corpus is emitted, not copied (tests/install-sh/python-rules-lock.test.sh). Arm (13) hand-built its five synthetic locks, joining rule objects with },{ while the real emitter joins with }, { (_py_json_rules builds the separator as out="$out, ", setup.d/45-python.sh:534). The auditor verified the byte is non-load-bearing today — identical verdicts on both shapes — but a proof fixture one byte off the artefact it certifies is #sync-by-copy-paste (dual-implementation-discipline.md §8) at the fixture level, and is what hides the next boundary defect. Rather than re-synchronise the copy, the copy is removed: each case now calls the real _py_json_rules through the existing PY_LAYER_LIB_ONLY=1 seam against a synthetic generation-context fragment dir, so the separator, the {"id":…,"provenance":[],"tier":2} fallback object and the "rules": …, framing are the artefact's own bytes by construction.
  • New corpus-precondition arm. An emitted corpus can fail to materialise (broken seam, renamed _py_json_rules) in a way a hand-written one could not; five empty files would make every grep miss and read as a regex defect. The guard sends the next reader at the seam, not at the pattern (attention-is-not-a-mechanism §1).
  • MINOR 2 — audit-round retelling dropped from a shipped layer (setup.d/45-python.sh:518-521). The _py_json_rules docstring retold the round-2 audit ("it said «line 648» while the same hunk … pushed the caller to 654") inside a file installed into consumer projects. The substantive repair — naming _py_write_rules_lock instead of a line number — stays untouched; only the retelling is removed, with the surviving rationale restated in the consumer's terms.

Criterion 3's discriminating power is preserved, not simplified away

The stage constraint was explicit: on the current fixture the researched rule is emitted last, so the live assertion alone cannot exhibit the round-1 crossing defect — criterion 3 rests entirely on the synthetic proof. All five shapes stay, and the emitted corpus was re-scored against the two historically defeated patterns to prove the teeth survive the rewrite:

pattern honest dishonest empty multi multi_honest
shipped pass ok ok ok pass
round-1 defeated ("[^}]*"tier":0) pass LEAK ok LEAK pass
round-2 defeated (unbounded .*) pass ok ok LEAK pass

Only the shipped pattern is clean on all five. The round-1 pattern still leaks on the dishonest and multi-rule cases; the round-1 repair still leaks on the multi-rule case.

Prior-art consult

  • Both commits carry the escape-hatch Prior-art: trailer. Neither is a capability commit under the CLAUDE.md definition: no new package.json dependency, no new file, and nothing under packages/ (the diff is one tests/install-sh/ script and one setup.d/ comment).
  • No new capability area surfaced — this is fixture-fidelity rework on an existing gate plus a comment removal.
  • No existing SSOT entries matched (no capability area to match).
  • No context7 queries required — no new capability area.

Test plan

  • bash tests/install-sh/python-rules-lock.test.sh33 passed, 0 failed, including (13) M1 discrimination 5/5 and the new (13) M1 corpus emitted by the real _py_json_rules
  • bash tests/install-sh/rules-lock-schema-parity.test.sh — 13 passed, 0 failed
  • npx vitest run packages/core/synthesizer — 186/186
  • npx vitest run packages/core/install — 100/100
  • bash scripts/build-synth-bundle.sh --check — in sync
  • SNAPSHOT_MODE=compare bash tests/install-sh/snapshot.sh — 15 pass / 0 fail, byte-identical (no delivered bytes move; the installer layer has no shipped twin)
  • make self-audit — composition 46/46, principles 353 passed / 1 skipped, always-on 31297B within the 54000B ceiling
  • npm test --workspace=@rules-as-tests/core --runRED on this host, and equally RED without these commits. See the note below; not caused by this PR.

Note on the core workspace suite

The full core suite is red on this host independently of this change. Controlled A/B in a single worktree at merge-base 8d2e7173cf, running the same three files with and without these two commits, is identical — 1 file / 4 tests failed (hooks/getff-work.test.ts) in both. The failing families are hooks/ and skills/ tests that spawn git/worktree/shell state (getff-work, create-worktree, priority-score, dup-detect); they touch nothing this PR edits.

Two separate effects were isolated while checking this, both worth recording:

  1. Unprovisioned worktree inflates the failure count. Before running scripts/worktree-node-modules.sh, this worktree reported extra failures that vanished after provisioning — the hazard CLAUDE.md documents (the WorktreeCreate hook is not registered, so worktrees born outside create-worktree.sh are unprovisioned).
  2. The remainder is load-dependent flake plus host state. Full-suite counts wobble run to run (85 failed at base vs 87 with these commits, in opposite directions from the file counts), while the targeted runs are stable and identical.

Provenance

n/a

Review findings

n/a

Fidelity verdict

FIDELITY: skipped — non-stage follow-up PR closing two recorded MINOR findings from the S1b round-3 audit; no kickoff substrate governs it, and both fixes are behaviour-preserving.

Parked questions

n/a

§1.7 Self-discipline check (REQUIRED if PR touches discipline-bearing files)

§1.7 Skipped: mechanical maintenance — a test-fixture fidelity rework plus a comment removal; no discipline rule, principle, or skill is introduced or extended, and no changed path matches the discipline trigger.

Test added 2 commits August 10, 2026 10:26
…not copied

Round-3 cold-audit MINOR 1. The discrimination proof in arm (13) hand-built its five
synthetic locks, joining rule objects with `},{` while the real emitter joins with
`}, {` (`_py_json_rules` builds the separator as `out="$out, "`). The auditor verified
the byte is non-load-bearing today — the shipped pattern returns identical verdicts on
both shapes — but a proof fixture that does not reproduce the emitted shape is
`#sync-by-copy-paste` (dual-implementation-discipline.md §8) at the fixture level: it
is what hides the NEXT boundary defect, and it drifts silently the day the emitter's
rendering changes.

Re-synchronising the copy would have left the same door open, so the copy is removed
instead: each case now calls the real `_py_json_rules` through the existing
`PY_LAYER_LIB_ONLY=1` seam against a synthetic generation-context fragment dir. The
separator, the `{"id":…,"provenance":[],"tier":2}` fallback object and the
`  "rules": …,` framing are now the artefact's own bytes by construction.

Criterion 3's discriminating power is preserved, NOT simplified back to the single-rule
cases: all five shapes stay, and the emitted corpus was re-scored against the two
historically defeated patterns to prove the teeth survive the rewrite —

  shipped          honest=pass dishonest=ok   empty=ok multi=ok   multi_honest=pass
  round-1 defeated honest=pass dishonest=LEAK empty=ok multi=LEAK multi_honest=pass
  round-2 defeated honest=pass dishonest=ok   empty=ok multi=LEAK multi_honest=pass

Only the shipped pattern is clean on all five; the round-1 pattern still leaks on the
dishonest and multi-rule cases, the round-1 repair still leaks on the multi-rule case.

Adds a corpus precondition arm: an emitted corpus can fail to materialise (broken seam,
renamed `_py_json_rules`) in a way a hand-written one could not, and five empty files
would make every grep miss and read as a REGEX defect. The guard sends the next reader
at the seam, not at the pattern (attention-is-not-a-mechanism §1).

Verified on host: python-rules-lock 33/0 (incl. `(13) M1 discrimination 5/5`),
rules-lock-schema-parity 13/0, vitest synthesizer 186/186, vitest install 100/100,
build-synth-bundle --check in sync, install snapshot 15/15 byte-identical.

Prior-art: skipped — test-fixture fidelity rework on an existing gate, no new capability, no new dependency and no new module.
…from a shipped layer

Round-3 cold-audit MINOR 2. `_py_json_rules`' docstring retold the round-2 audit inside
a file that is installed into consumer projects: it quoted what the audit «said» («line
648») against what the hunk did (pushed the caller to 654). Consumers read this seam to
understand their own install; our review history is not their context, and a shipped
layer is the wrong home for it.

The substantive repair the round-2 audit produced is CORRECT and stays untouched: the
pointer names `_py_write_rules_lock` instead of a line number. Only the retelling is
removed, and the surviving rationale is restated in the consumer's terms — a line
pointer into this same file goes stale the moment anything above the caller is edited.

Verified on host: python-rules-lock 33/0, rules-lock-schema-parity 13/0, vitest
synthesizer 186/186, vitest install 100/100, build-synth-bundle --check in sync,
install snapshot 15/15 byte-identical (no delivered bytes move — the edit is a comment
in the installer layer, which has no shipped twin).

Prior-art: skipped — comment-only edit removing review narrative from a shipped file, no behaviour change and no new capability.
@artyhoo
artyhoo merged commit 50c6fa9 into staging Aug 10, 2026
42 checks passed
@artyhoo
artyhoo deleted the fix/getff-s1b-round3-minors branch August 10, 2026 08:39
artyhoo added a commit that referenced this pull request Aug 10, 2026
…comments (#1359)

Sibling sweep of the S1b round-3 MINOR 2 finding (#1356), which removed one such
retelling from `_py_json_rules`. That fix named a class, and the class had nine members,
not one — a wider grep over `setup.d/**` and `packages/core/templates/**` surfaced eight
more sites where our internal review history is narrated inside files that install into
consumer projects.

Consumers read these seams to understand their own install. «MAJOR B (W-7)», «S2 rework
round 1», «R2», «round-1 rework» and a path into `.superpowers/sdd/` are our process
artefacts: the wave numbers index nothing a consumer can open, and the round numbers
describe a review conversation they were never part of.

Every substantive rationale is preserved verbatim — only the round/wave/severity markers
and the one dead internal report path are removed:

- `10-skills.sh`  — env+ contour surface; the design-SSOT citation that carries the actual
  reason (spec:211 «pipeline presets, status, …») stays.
- `10-skills.sh`  — the §1j relocation note; «consolidate to ONE ship-point» stays as the
  reason, and the call-chain argument below it is untouched.
- `85-worktree-scripts.sh` — getff-work.sh ship-alongside rationale (spec A9) stays.
- `lib.sh` — the concrete leak example stays (it is the useful part); «(round-1 rework)»
  becomes plain observation.
- `46-cargo.sh` / `47-go.sh` — «§3a option B / §6 fork 2» design pointers stay; the
  «MAJOR B (W-7)» prefix goes.
- `45-python.sh` ×3 — probe-proven silent-unenforcement finding stays (the dead
  `.superpowers/sdd/s2-task-2-report.md` pointer goes with the round marker); the
  fragment-per-rule and manifest-path rationales stay, the latter restated so it explains
  the CURRENT design rather than narrating the defect that preceded it.

Design pointers into internal kickoff/spec sections (`§3a`, `§6 fork 2`, `spec A8/A9`) are
a NEIGHBOURING class — also unreachable for a consumer, but they carry design intent
rather than review history. Left alone deliberately; removing them would rewrite meaning,
not strip narrative.

Verified on host: install snapshot 15/15 byte-identical (no delivered bytes move — these
are installer-layer comments with no shipped twin), `bash -n` clean on all six edited
files, local CI sweep green, make self-audit green.

Prior-art: skipped — comment-only sweep removing review narrative from shipped files, no behaviour change, no new capability and no new dependency.

Co-authored-by: Test <test@example.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant