Skip to content

Commit 11f08d5

Browse files
committed
P-037 Phase B / B1-F2-F4-R2: carve dump summary out of instrument
B1-F2-F4 widened scripts/p037_b_production_diff_gate.py to make dump.rs's fn dump_summaries an authorized B2.1b/c treatment item, but scripts/ p037_evidence_b.py's own INSTRUMENT_CARVE_OUTS was never updated to match: dump.rs stayed inside the Phase-B instrument closure that instrument_ manifest()/instrument_identity() actually hash. Consequence, not hypothetical: comparison_problems() refuses an instrument_identity mismatch by design, so a real B_after take following the already- authorized dump_summaries change would have been mechanically refused against the just-named R_B (718a673/9d914e3/3ac13fd) regardless of how correct the guarded-summary solver was -- the same instrument/treatment collision B1-F2 first found for the whole extractor and B1-F2-F2 found a second time for its mutable-method seam, now found a third time in Rust. Fix: rust/crates/own-bridge/src/dump.rs joins mos.rs/lower.rs in INSTRUMENT_CARVE_OUTS (TREATMENT_PATHS follows, being the same tuple), carved out WHOLE at the provenance layer -- not because every byte of dump.rs may change, but because path-level carve-out plus item-level production diff gate together are the actual permitted boundary. production_diff_gate.rust itself is untouched: fn dump_summaries stays the only mutable item there. A new selftest() regression proves it structurally: dump.rs (with mos.rs/lower.rs re-asserted) is absent from instrument_manifest('HEAD'); an unrelated, still-frozen own-bridge file (verdict.rs) stays present -- proving the fix removed exactly the treatment files, never the whole directory. rust/crates/own-bridge/tests/ is explicitly NOT carved out here (it is a production-gate control, a different concept, and stays instrument-frozen for this treatment unless a separate boundary amendment later authorizes it) -- recorded in the epoch record's new b1_f2_f4_r2_findings, not silently expanded. Adds docs/notes/p037-formal-kernel.md #10.8j. Zero production semantics move: both diff gates report IDENTICAL against 3ac13fd; ruff, mypy, and the full test suite are clean. Touches exactly scripts/p037_evidence_b.py, docs/evidence/p037-b-epoch.json, and docs/notes/p037-formal-kernel.md. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AN6xHbpovxrmZ4AMjS7WQA
1 parent 3ac13fd commit 11f08d5

3 files changed

Lines changed: 154 additions & 4 deletions

File tree

‎docs/evidence/p037-b-epoch.json‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,16 @@
106106
"ci_transition_wording_corrected": "docs/evidence/p037-b-epoch.json's ci_transition_plan.current_ci_unaffected (renamed current_ci_transition) claimed today's CI job 'keeps passing... unmodified through B2.1a' -- directly contradicted by this record's OWN, already-corrected facts_expectation, which makes the four F3-S* and four G-V4/legacy-honesty controls' fabricated_release_at_call_site flip true -> false unconditionally the moment B2.1a lands, which p037_controls.py --engine both (current) would read as a failure against expected.json's current layer for those eight controls. Fixed to the correct sequence: pre-B2.1a current-mode stays green and blocking; B2.1a landing makes it non-blocking going forward (an expected, not accidental, red) while a new transitional gate becomes blocking instead; the combined treatment head's mandatory gate is p037_controls.py --post-a1 --engine rust, Python measured separately under the rollback rule. No historical expected.json current/post_a1 layer is rewritten at any stage.",
107107
"not_implemented_by_b1_f2_f4_r1": true
108108
},
109+
"b1_f2_f4_r2_findings": {
110+
"task": "B1-F2-F4-R2: one more instrument/treatment boundary defect found before B2.1 semantics may move, closed with zero production-semantic movement.",
111+
"finding": "rust/crates/own-bridge/src/dump.rs was authorized by production_diff_gate.rust as a required B2.1b/c treatment surface (fn dump_summaries, item-level, since B1-F2-F4 -- see production_diff_gate.rust.dump_rs_widened_by_b1_f2_f4), but scripts/p037_evidence_b.py's own INSTRUMENT_CARVE_OUTS was never updated to match: it carved out mos.rs/lower.rs/the extractor directory but not dump.rs, so dump.rs's blob remained inside the Phase-B instrument closure that instrument_manifest()/instrument_identity() compute.",
112+
"consequence": "changing dump_summaries -- the exact, already-preregistered B2.1b/c deliverable -- would itself move instrument_identity between R_B and B_after. scripts/p037_evidence_b.py's own comparison_problems() correctly refuses an instrument_identity mismatch (proven by that function's own selftest coverage), so a real B_after evidence take following the already-authorized treatment would have been refused as ineligible no matter how correct the guarded-summary solver itself was -- the same class of instrument/treatment collision B1-F2 first found and fixed for the extractor, and B1-F2-F2 found a second time for the extractor's own mutable-method seam.",
113+
"resolution": "rust/crates/own-bridge/src/dump.rs is added to INSTRUMENT_CARVE_OUTS (TREATMENT_PATHS follows automatically, being literally the same tuple), carved out WHOLE at the provenance layer exactly like mos.rs/lower.rs, while production_diff_gate.rust's item-level authorization stays exactly as B1-F2-F4 left it (fn dump_summaries only; fn escape_py/fn emit/fn pad and the file's use statements stay frozen there) -- this task does not touch, widen, or re-scope that gate at all. Path-level provenance carve-out and item-level production diff gate together are the actual permitted semantic boundary, the same relationship mos.rs/lower.rs already had to their own item gate. A new scripts/p037_evidence_b.py selftest() regression proves the fix structurally, not just declaratively: dump.rs (with mos.rs/lower.rs re-asserted alongside it) is absent from instrument_manifest('HEAD'), while an unrelated, still-frozen own-bridge file (verdict.rs) remains present -- proving the fix removed exactly the treatment files, never the whole rust/crates/own-bridge/ directory.",
114+
"own_bridge_tests_scope": "rust/crates/own-bridge/tests/ is named in production_diff_gate.rust.controls as a control the item-level production gate permits to move -- a DIFFERENT concept from this Phase-B instrument closure, and NOT touched by this task. It remains instrument-frozen (inside INSTRUMENT_PATHS, outside any INSTRUMENT_CARVE_OUTS entry) for the upcoming B2.1 treatment unless a separate, later, pre-treatment boundary amendment explicitly authorizes and re-baselines it -- A1's required formal/production tests can be satisfied through the already-authorized formal harness/corpus/control surfaces without moving this directory, and this task does not enlarge the carve-out opportunistically to pre-empt a need that has not been shown.",
115+
"semantics": "none: no byte of frontend/roslyn/OwnSharp.Extractor/Program.cs, rust/crates/own-bridge/'s production files (mos.rs/lower.rs/dump.rs/ast.rs/lib.rs/render.rs/verdict.rs/Cargo.toml), ownlang/, rust/crates/own-ir/, or spec/ moves. Both scripts/p037_b_production_diff_gate.py and scripts/p037_b_extractor_diff_gate.py report IDENTICAL against the immediately preceding naming head (3ac13fd) -- this task changes only scripts/p037_evidence_b.py's own provenance closure, this record, and docs/notes/p037-formal-kernel.md.",
116+
"why_baseline_is_superseded": "the R_B named at 718a673/9d914e3/3ac13fd was honest at the instrument boundary it actually measured -- the boundary was incomplete (one already-authorized treatment file left inside the instrument), not the measurement itself. Superseded, never rewritten: git history keeps every prior take exactly as committed, and the epoch record's own supersession chain names this transition explicitly.",
117+
"not_implemented_by_b1_f2_f4_r2": true
118+
},
109119
"must_not_touch_yet": [
110120
"ownlang/ownir.py (stays reference/oracle/rollback; not a Phase B treatment path)",
111121
"frontend/roslyn/OwnSharp.Extractor/ outside extractor_seam.mutable_methods (as of B1-F2; before B1-F2 the WHOLE directory was listed here with no carve-out at all, which was itself the boundary defect B1-F2 corrects -- see superseded_by_b1_f2)",

‎docs/notes/p037-formal-kernel.md‎

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3575,3 +3575,78 @@ instrument path, unaffected by this fact even though its own docstring
35753575
moved. Only once this corrected head is terminal-green does the B1-F2-F4
35763576
instrument-supersession retake (naming a fresh `T_B`, four fresh `R_B`
35773577
snapshots) proceed.
3578+
3579+
#### 10.8j Phase B / B1-F2-F4-R2: dump.rs was an authorized treatment surface still sitting inside the instrument (OWNER RULING)
3580+
3581+
Found after the B1-F2-F4-R1 retake was itself named at `3ac13fd`, before
3582+
any B2.1 production semantics were touched: `scripts/p037_evidence_b.py`'s
3583+
own `INSTRUMENT_CARVE_OUTS` had not been updated to match B1-F2-F4's own
3584+
widening of `scripts/p037_b_production_diff_gate.py`. The causal chain,
3585+
exact:
3586+
3587+
B1-F2-F4 correctly made dump_summaries item-mutable
3588+
↓
3589+
but p037_evidence_b.py remained on the older mos.rs/lower.rs carve-out
3590+
↓
3591+
fresh R_B therefore included dump.rs in instrument_identity
3592+
↓
3593+
required B2.1b/c dump movement would invalidate the differential
3594+
↓
3595+
boundary corrected before any semantic treatment
3596+
3597+
`INSTRUMENT_CARVE_OUTS`/`INSTRUMENT_PATHS` define what `instrument_
3598+
manifest()`/`instrument_identity()` actually hash; `production_diff_gate.
3599+
rust`'s own `mutable_items` define what the ITEM-level Rust gate permits to
3600+
change within a unit. These are two different layers of the same boundary,
3601+
and B1-F2-F4 had only corrected the second one. `dump.rs` therefore
3602+
remained, in full, inside the Phase-B instrument closure while
3603+
simultaneously being an already-authorized, already-preregistered B2.1b/c
3604+
treatment file — the identical shape of defect B1-F2 first found for the
3605+
whole extractor directory and B1-F2-F2 found a second time for the
3606+
extractor's own mutable-method seam, now found a third time one layer
3607+
over, in Rust.
3608+
3609+
The consequence was not hypothetical: `comparison_problems()` refuses an
3610+
`instrument_identity` mismatch between two records by design (that is the
3611+
entire point of the field), so a real `B_after` evidence take following
3612+
B2.1b/c's own already-authorized `dump_summaries` change would have been
3613+
mechanically refused as ineligible against the unfixed `R_B` — regardless
3614+
of how correct the eventual guarded-summary solver was. Measuring first,
3615+
implementing second, only works when the measurement's own closure is
3616+
complete; an incomplete closure turns the *correct* future treatment into
3617+
the thing that invalidates its own evidence.
3618+
3619+
**Fix, with zero production-semantic movement.** `rust/crates/own-bridge/
3620+
src/dump.rs` joins `mos.rs`/`lower.rs` in `INSTRUMENT_CARVE_OUTS` (and
3621+
therefore `TREATMENT_PATHS`, literally the same tuple), carved out WHOLE
3622+
at the provenance layer — not because every byte of `dump.rs` may change,
3623+
but because path-level provenance carve-out and item-level production
3624+
diff gate together are what actually bounds the permitted semantic
3625+
surface, exactly the relationship `mos.rs`/`lower.rs` already had to
3626+
`production_diff_gate.rust`'s own item list. `production_diff_gate.rust`
3627+
itself is untouched by this task: `fn dump_summaries` stays the only
3628+
mutable item, `fn escape_py`/`fn emit`/`fn pad` and the file's `use`
3629+
statements stay frozen. A new `scripts/p037_evidence_b.py` `selftest()`
3630+
regression proves the fix structurally: `dump.rs` (with `mos.rs`/`lower.rs`
3631+
re-asserted alongside it) is absent from `instrument_manifest('HEAD')`,
3632+
while an unrelated, still-frozen own-bridge file (`verdict.rs`) remains
3633+
present — proving the fix removed exactly the treatment files, never the
3634+
whole `rust/crates/own-bridge/` directory.
3635+
3636+
**Explicitly not touched, and explicitly recorded as such.**
3637+
`rust/crates/own-bridge/tests/`, named in `production_diff_gate.rust.
3638+
controls` as a control the item-level production gate already permits to
3639+
move, is a different concept from this instrument closure and stays
3640+
instrument-frozen for the upcoming B2.1 treatment — this task does not
3641+
enlarge the carve-out to pre-empt a need that has not been shown; a
3642+
separate, later, pre-treatment boundary amendment would be required to
3643+
authorize and re-baseline it if B2.1 ever needs to touch it. Nothing about
3644+
P-037 semantics, the A1 acceptance matrix, guard vocabulary, compatibility
3645+
classes, or solver rules is amended by this task.
3646+
3647+
**Instrument consequence.** `scripts/p037_evidence_b.py` is itself a
3648+
tracked Phase-B instrument path, so `instrument_identity` moves again —
3649+
the same kind of retake B1-F1/B1-F2/B1-F2-F2/B1-F2-F4/B1-F2-F4-R1 each
3650+
already forced. Only once this corrected head is terminal-green does the
3651+
fresh `T_B`/`R_B` retake proceed, and only after THAT retake is itself
3652+
terminal-green does B2.1a become the next authorized task — not before.

‎scripts/p037_evidence_b.py‎

Lines changed: 69 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@
2121
also holds frozen items, so file-level pathspec diffing alone is never the
2222
authoritative boundary for either; this module's own TREATMENT_PATHS is
2323
deliberately the same coarse, file/directory-level union both item gates'
24-
own units name (mos.rs, lower.rs, and the whole extractor directory, each
25-
in full), exactly as a2d's own TREATMENT_PATHS is wider than its doors and
26-
the *door gate* is the boundary within them.
24+
own units name (mos.rs, lower.rs, dump.rs, and the whole extractor
25+
directory, each in full), exactly as a2d's own TREATMENT_PATHS is wider
26+
than its doors and the *door gate* is the boundary within them.
2727
2828
B1 originally classified the whole extractor as measurement INSTRUMENT
2929
with no carve-out at all, even though the frozen A1 acceptance matrix
@@ -157,9 +157,33 @@
157157
# functions are actually mutable under p037_b_production_diff_gate.py.
158158
# Path-level provenance carve-out + item-level production diff gate is the
159159
# actual permitted semantic boundary; this tuple is only the first half.
160+
#
161+
# B1-F2-F4-R2: dump.rs joins them. B1-F2-F4 had already widened
162+
# p037_b_production_diff_gate.py to make `fn dump_summaries` mutable (the
163+
# future B2.1b/c guarded-summary path must see the same guarded-method
164+
# universe production does, including guarded_functions[]), but this
165+
# module's own carve-out was never updated to match -- so a Phase-B R_B
166+
# taken against the unfixed closure would have carried dump.rs's blob
167+
# inside instrument_identity, and the very treatment this project's own
168+
# production gate already authorizes would itself have moved the
169+
# instrument out from under any future R_B-vs-B_after comparison
170+
# (comparison_problems() correctly refuses an instrument_identity
171+
# mismatch -- see its own selftest coverage -- so that comparison would
172+
# have been refused no matter how correct the eventual solver was).
173+
# Carved out WHOLE, same discipline as mos.rs/lower.rs and for the same
174+
# reason: NOT because every byte of dump.rs may change -- the production
175+
# gate still freezes it at item granularity (`fn dump_summaries` alone;
176+
# `fn escape_py`/`fn emit`/`fn pad`, the file's `use` statements, and every
177+
# other, unregistered item stay frozen there) -- but because path-level
178+
# provenance carve-out plus item-level production diff gate, TOGETHER, are
179+
# what actually bounds the permitted semantic surface. Carving out only
180+
# the one mutable function would still need the same item gate to police
181+
# what may move within it, while leaving the frozen remainder inside the
182+
# instrument for no protective purpose.
160183
INSTRUMENT_CARVE_OUTS: tuple[str, ...] = (
161184
"rust/crates/own-bridge/src/mos.rs",
162185
"rust/crates/own-bridge/src/lower.rs",
186+
"rust/crates/own-bridge/src/dump.rs",
163187
"frontend/roslyn/OwnSharp.Extractor/",
164188
)
165189

@@ -533,7 +557,22 @@ def selftest() -> int:
533557
re-proven here -- this module only proves the two are correctly WIRED
534558
together (the carve-out exists, and closure_problems() cross-checks the
535559
epoch record's production_diff_gate.extractor.unit against this
536-
module's own, exactly as it already did for the Rust gate)."""
560+
module's own, exactly as it already did for the Rust gate).
561+
562+
B1-F2-F4-R2 adds a third family, the same general shape again: B1-F2-F4
563+
widened p037_b_production_diff_gate.py to make dump.rs's own
564+
`dump_summaries` an authorized B2.1b/c treatment item, but this
565+
module's INSTRUMENT_CARVE_OUTS was never updated to match, so dump.rs
566+
silently stayed inside the Phase-B instrument closure -- a real defect,
567+
not a hypothetical one, since a fresh R_B taken before this fix would
568+
have made the already-authorized dump_summaries treatment itself move
569+
instrument_identity. Proven the same way as the extractor family: the
570+
carve-out is declared (and therefore also TREATMENT_PATHS, which is
571+
literally the same tuple), the file is structurally absent from
572+
instrument_manifest() at HEAD (never inferred from the carve-out
573+
declaration alone -- the manifest is rebuilt and inspected directly),
574+
and an UNRELATED, still-frozen own-bridge file stays present, proving
575+
the fix removed exactly the one path, not the whole directory."""
537576
own_only = "scripts/p037_b_production_diff_gate.py"
538577
_selfcheck("phase-b-instrument-paths-include-b-production-diff-gate",
539578
own_only in INSTRUMENT_PATHS, INSTRUMENT_PATHS)
@@ -558,6 +597,32 @@ def selftest() -> int:
558597
not any(_covered(p, (extractor_unit,)) for p in manifest_paths),
559598
[p for p in manifest_paths if _covered(p, (extractor_unit,))])
560599

600+
# B1-F2-F4-R2: dump.rs must be a declared carve-out/treatment path AND
601+
# structurally absent from the manifest built at HEAD -- not merely
602+
# declared, since instrument_manifest() is what instrument_identity()
603+
# actually hashes. mos.rs/lower.rs are re-asserted alongside it (the
604+
# exact three files p037_b_production_diff_gate.py's own item gate
605+
# polices) so a future regression narrowing the carve-out back down is
606+
# caught here too, not only in that other module's own selftest.
607+
dump_path = "rust/crates/own-bridge/src/dump.rs"
608+
mos_path = "rust/crates/own-bridge/src/mos.rs"
609+
lower_path = "rust/crates/own-bridge/src/lower.rs"
610+
_selfcheck("dump-rs-is-a-declared-carve-out",
611+
dump_path in INSTRUMENT_CARVE_OUTS, INSTRUMENT_CARVE_OUTS)
612+
_selfcheck("dump-rs-is-declared-treatment",
613+
dump_path in TREATMENT_PATHS, TREATMENT_PATHS)
614+
_selfcheck("dump-rs-is-excluded-from-the-instrument-manifest-at-head",
615+
dump_path not in manifest_paths, manifest_paths)
616+
_selfcheck("mos-rs-and-lower-rs-are-also-excluded-from-the-instrument-manifest",
617+
mos_path not in manifest_paths and lower_path not in manifest_paths,
618+
manifest_paths)
619+
# An unrelated, still-frozen own-bridge file must remain IN the
620+
# manifest -- proving the fix removed exactly the three treatment
621+
# files, never the whole rust/crates/own-bridge/ directory.
622+
unrelated_frozen = "rust/crates/own-bridge/src/verdict.rs"
623+
_selfcheck("an-unrelated-frozen-own-bridge-file-stays-in-the-instrument-manifest",
624+
unrelated_frozen in manifest_paths, manifest_paths)
625+
561626
b_id = instrument_identity("HEAD")
562627
a2d_id = ev.instrument_identity("HEAD")
563628
_selfcheck("phase-b-identity-differs-from-a2d-identity-at-head",

0 commit comments

Comments
 (0)