Skip to content

Commit 45cb78f

Browse files
committed
fix(p037): tighten mining note carve-out from a prefix to exact paths
Independent review: MINING_NOTE_PREFIXES was a startswith() prefix, so it silently admitted any future file sharing that spelling (docs/notes/p037-real-world-mining-round-97.md, -please-ignore-this.md, ...) with no further governance decision -- looser than the "admits exactly its own paths" the hostile check's name claimed. Every other note carve-out on this branch (FORMAL_NOTE_PATH, ROCQ_CONSOLIDATION_NOTE_PATH, VALUE_BENCHMARK_NOTE_PATH) is an exact governance entry; this one had drifted to a prefix because this gate produces two notes instead of one. MINING_NOTE_PATHS now lists both exact paths in governance instead. MINING_EVIDENCE_PREFIXES is unchanged (a dedicated evidence directory, matching the value-benchmark precedent, where a prefix is the proportionate match). The hostile control gains a same-prefix-but- unapproved probe (docs/notes/p037-real-world-mining-unapproved-future- note.md) that a prefix would have silently admitted and exact paths correctly still refuse. Does not change the mining result: N=0, CAPABILITY_GAP_ONLY stands, #304 stays frozen. No re-mining, no analyzer reruns. Verified: tests/test_p037_a2d_epoch.py green (18 a2d-specific checks); ruff check . clean; mypy clean. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AN6xHbpovxrmZ4AMjS7WQA
1 parent 7037c7f commit 45cb78f

1 file changed

Lines changed: 25 additions & 7 deletions

File tree

‎tests/test_p037_a2d_epoch.py‎

Lines changed: 25 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -211,10 +211,19 @@
211211
# deliverable): the identical gap, a third time, for the identical reason
212212
# -- the prereg and result notes plus the candidate-inventory evidence
213213
# directory are new paths this test never saw until they were committed
214-
# here. Two named notes (a prefix, since this gate produces exactly two --
215-
# prereg and result -- unlike the single-note Rocq/value-benchmark cases)
216-
# plus one evidence-directory prefix, matching every precedent above.
217-
MINING_NOTE_PREFIXES = ("docs/notes/p037-real-world-mining-",)
214+
# here. One evidence-directory prefix (matching every precedent above),
215+
# but the two notes are two EXACT governance paths, not a prefix: this
216+
# gate produces exactly two, and a `p037-real-world-mining-` prefix would
217+
# have silently admitted any future file sharing that spelling (a
218+
# `-round-97.md`, a `-please-ignore-this.md`) with no further governance
219+
# decision -- caught on independent review before it ever mattered, not
220+
# after. FORMAL_NOTE_PATH/ROCQ_CONSOLIDATION_NOTE_PATH/
221+
# VALUE_BENCHMARK_NOTE_PATH are all exact-path entries for the same
222+
# reason; this corrects the one place that drifted from that pattern.
223+
MINING_NOTE_PATHS = (
224+
"docs/notes/p037-real-world-mining-prereg-2026-09-28.md",
225+
"docs/notes/p037-real-world-mining-result-2026-09-28.md",
226+
)
218227
MINING_EVIDENCE_PREFIXES = ("docs/evidence/p037-real-world-mining/",)
219228

220229
# 10.6.14b: order step 6 (D after) lands its evidence as exactly these six
@@ -251,9 +260,10 @@ def classify_outside_paths(changed: list[str], t_paths: list[str],
251260
`changed` lists instead of needing a real git commit per probe."""
252261
allowed_prefixes = (*tuple(t_paths), "tests/", *PHASE_B_PREFIXES,
253262
*ROCQ_CONSOLIDATION_PREFIXES, *VALUE_BENCHMARK_PREFIXES,
254-
*MINING_NOTE_PREFIXES, *MINING_EVIDENCE_PREFIXES)
263+
*MINING_EVIDENCE_PREFIXES)
255264
governance = (EPOCH_RECORD_PATH, FORMAL_NOTE_PATH, *PHASE_B_GOVERNANCE_FILES,
256-
ROCQ_CONSOLIDATION_NOTE_PATH, VALUE_BENCHMARK_NOTE_PATH)
265+
ROCQ_CONSOLIDATION_NOTE_PATH, VALUE_BENCHMARK_NOTE_PATH,
266+
*MINING_NOTE_PATHS)
257267
return [f for f in changed if f not in governance
258268
and not f.startswith(allowed_prefixes)
259269
and f not in DOCS_GENERATED_ADJUDICATED
@@ -586,7 +596,15 @@ def run() -> int:
586596
t_paths, r_d_files, d_after_ok)
587597
check("mining-carveout-admits-exactly-its-own-paths",
588598
not mining_admits_probe, f"{mining_admits_probe}")
589-
mining_forbidden = ["docs/notes/some-other-unrelated-note.md"]
599+
mining_forbidden = [
600+
"docs/notes/some-other-unrelated-note.md",
601+
# Same prefix as the two admitted notes, but not one of
602+
# them -- exact-path governance must still refuse this,
603+
# not just an unrelated filename (a prefix would have
604+
# silently admitted it; this is the control that would
605+
# have caught that before it landed).
606+
"docs/notes/p037-real-world-mining-unapproved-future-note.md",
607+
]
590608
mining_forbidden_probe = classify_outside_paths(
591609
mining_forbidden, t_paths, r_d_files, d_after_ok)
592610
check("mining-carveout-does-not-broaden-to-docs-notes-generally",

0 commit comments

Comments
 (0)