Repository navigation
The pinned-source index missed 13 pinned files, and told me one was free to edit - #140
Conversation
…ree to edit research/PINNED_SOURCES.md exists so that nobody has to learn a byte binding by breaking it. Its first version read only the JSON files on disk under research/, so the dependency declarations sealed INSIDE the campaign archives were invisible to it. Thirteen repository paths were byte-pinned by a live checker and absent from the index whose only purpose is to name them. That is not hypothetical. research/rn/moment_envelope.py is one of the thirteen. A NON-CERTIFYING label was added to it BECAUSE this page said it was not pinned, and tools/rn_bernstein_sharp_check.py refused the tree on replay. An incomplete "the only way to learn a binding was to break it" page is worse than no page, because it is trusted. That sentence is now in the index itself. The thirteen: research/rn/moment_envelope.py, density_majorant.py, n6_inputs.py, side24_wedge.py, spatial_cover.py; engine/operations/trial.py; research/parallel/lpw/lpw_modulus.py and ARGUMENT.md; docs/OPEN_PROBLEMS.md; two drive/ and drive/search/ files; and tools/h3_rn_n6_check.py plus tools/twelve_project_check.py -- two checkers pinned by the very campaign they enforce. LIVENESS IS TAKEN FROM THE CHECKERS, NOT FROM PIN SHAPE. This matters more than the fix. A campaign archive holds 137 pin-shaped JSON members. Most are manifests of the archive's own contents, or blocks named context_only_reads and governance_context recording what an agent had open -- several name CLAUDE.md and README.md at byte counts they no longer have, because nothing enforces them and nothing should. Listing those as "do not edit" would put a FALSE statement in the one document people read before editing, which is worse than the omission it replaced. So a declaration counts only when a tools/ checker passes it to repository_inputs, which compares it against the tree and refuses. That is four declarations across three archives, plus one set held in code (twelve_project_check.SUPPLEMENTAL_DEPENDENCIES), and each row names its enforcing checker so a reader learns WHO will refuse. Anti-drift: enforcing_checkers() scans tools/ for calls to repository_inputs and refuses any checker not named in the table -- the original defect cannot recur silently when a new campaign lands. The declared counts (25/30/32/24) are the ones the checkers themselves assert, so this index cannot read a subset and understate what may not be edited. Three mistakes made while writing this, all caught by the controls: - The first regex used a negative lookbehind excluding `.`, so it found only tools/twelve_project_check.py and missed the two that call runtime.repository_inputs(...). It would have declared the table complete with two checkers unlisted. A control now asserts all three are found. - main() merged the archive declarations and the index-equality control called survey() + render() directly, so the control compared the index against a render that had never seen an archive declaration. Two paths for one document is exactly how one kind of pin goes unchecked -- the defect being repaired, reproduced in the repair. Both now go through full_survey(). - The "pinned by" column basenamed its source, so two archives each holding a bernstein/DEPENDENCIES.json-shaped member both rendered as DEPENDENCIES.json, naming neither. Also closes the count drift in CLAUDE.md, which is the same defect in another place: it said eight records and 34 files where the checker finds eleven and 55. Those numbers are now written in a parseable form and COMPARED against the checker's own summary line by a control, with a second control asserting the comparison would notice a drifted number. A count in the file people read before editing is load-bearing; it had drifted twice as prose nobody compared. Scoping: archive declarations are read only in a root holding research/campaigns, so the synthetic-root controls are not failed for the wrong reason, and test_the_real_tree_reads_its_archive_declarations asserts this repository is never the skipped case. The summary line prints archive_scope so a skipped run is visible rather than silent. 29 controls pass, 10 of them verified to fail against the pre-fix tool in a real copy outside the tree. pinned_sources_check problems=0 with pinned_files=55, pinned_archive_members=6, archive_declarations=4. claims_check, quarantine_check, verify_manifests, consumers_check, registers_check, disclosure_check and rn_bernstein_sharp_check all clean -- the last one confirming no pinned byte moved. Scientific effect: NONE. This is an inventory of byte identities. A pin is custody, not correctness, and no claim, premise, obligation or gate is discharged here. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Cz7WZybv8znP64SpPj6sWY
The red
|
…0260919' into claude/pinned-index-archive-members
|
Read: the three-dot diff 96e5175...3013733 (4 files, +574/−59), the PR body and comment,
State: draft; both Generated by Claude Code |
…he guard's scope Review 5848434306 item 1: tools/h3_rn_n6_check.py and tools/twelve_project_check.py are pinned by the downstream rn_bernstein_sharp_variance campaign members, not by the campaigns they enforce, and no pinned path begins with governance/. Both sentences (CLAUDE.md and the PREAMBLE rendered into research/PINNED_SOURCES.md) now say what the index rows show; the index is regenerated with --write. Item 2: enforcing_checkers() docstring states that only top-level tools/*.py is scanned and that the guard is per checker, with the index-equality control covering a single missing row. Ran: tools/pinned_sources_check.py (problems=0, 61/61 digests); pytest tests/test_pinned_sources.py (29 passed). Co-authored-by: Dylan Roy <d6g8k5htny@privaterelay.appleid.com>
…0260919' into claude/pinned-index-archive-members Co-authored-by: Dylan Roy <d6g8k5htny@privaterelay.appleid.com>
|
Amendment applied at 6950689 (fix commit plus merge of base 38a3e07). Changes against the review findings:
What ran on 6950689 (Python 3.11.16, locked pytest 9.0.2):
Scientific effect: NONE. This corrects the checker's documentation of its own scope and regenerates the index; no digest semantics, grade, or gate changes. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
1eeec0c
into
chatgpt/drive-github-hardening-20260919
After #140 the generated index preamble names research/rn/moment_envelope.py in prose as well as in its table row; the control counted both. Co-authored-by: Dylan Roy <d6g8k5htny@privaterelay.appleid.com>
Scientific effect: NONE. This is an inventory of byte identities. A pin is custody, not correctness, and no claim, premise, obligation or gate is discharged here. No status word moves.
The defect, with its consequence
research/PINNED_SOURCES.mdexists so nobody has to learn a byte binding by breaking one. Its first version read only the JSON files on disk underresearch/, so the dependency declarations sealed inside the campaign archives were invisible to it.Thirteen repository paths are byte-pinned by a live checker and were absent from the index whose only purpose is to name them.
That is not hypothetical.
research/rn/moment_envelope.pyis one of the thirteen. A NON-CERTIFYING label was added to it because this page said it was not pinned, andtools/rn_bernstein_sharp_check.pyrefused the tree on replay. An incomplete "the only way to learn a binding was to break it" page is worse than no page, because it is trusted. That sentence is now in the index itself.The thirteen:
research/rn/moment_envelope.pyrn_bernstein…zip::bernstein/DEPENDENCIES.jsonresearch/rn/density_majorant.py,n6_inputs.py,side24_wedge.py,spatial_cover.pyengine/operations/trial.pytools/h3_rn_n6_check.py,tools/twelve_project_check.pyresearch/parallel/lpw/lpw_modulus.py,ARGUMENT.mdq0_twelve…zip::verification_plan.jsondrive/anddrive/search/filesdocs/OPEN_PROBLEMS.mdtools/twelve_project_check.py(SUPPLEMENTAL_DEPENDENCIES)Liveness comes from the checkers, not from pin shape
This matters more than the fix. A campaign archive holds 137 pin-shaped JSON members. Most are manifests of the archive's own contents, or blocks named
context_only_readsandgovernance_contextrecording what an agent had open — several nameCLAUDE.mdandREADME.mdat byte counts they no longer have, because nothing enforces them and nothing should.Listing those as "do not edit" would put a false statement in the one document people read before editing, which is worse than the omission it replaced. So a declaration counts only when a
tools/checker passes it torepository_inputs, which compares it against the tree and refuses:h3_rn_n6_20260920_v1.zipverification_plan.jsonrepository_inputstools/h3_rn_n6_check.pyrn_bernstein_sharp_variance_20260921_v1.zipbernstein/DEPENDENCIES.jsonfilestools/rn_bernstein_sharp_check.pyrn_bernstein_sharp_variance_20260921_v1.zipsharp_variance/DEPENDENCIES.jsonfilestools/rn_bernstein_sharp_check.pyq0_twelve_20260920_v1.zipverification_plan.jsonrepository_dependenciestools/twelve_project_check.pySUPPLEMENTAL_DEPENDENCIEStools/twelve_project_check.pyEach row names its enforcing checker, so a reader learns who will refuse. The declared counts (25/30/32/24) are the ones the checkers themselves assert, so the index cannot read a subset and understate what may not be edited.
Anti-drift:
enforcing_checkers()scanstools/for calls torepository_inputsand refuses any checker not named in the table. The original defect cannot recur silently when a new campaign lands.Three mistakes I made writing this, all caught by the controls
., so it found onlytools/twelve_project_check.pyand missed the two that callruntime.repository_inputs(...). It would have declared the table complete with two checkers unlisted.main()merged the archive declarations while the index-equality control calledsurvey()+render()directly — so the control compared the index against a render that had never seen an archive declaration. Two paths for one document is exactly how one kind of pin goes unchecked: the defect being repaired, reproduced in the repair. Both now go throughfull_survey().pinned bycolumn basenamed its source, so two archives each holding abernstein/DEPENDENCIES.json-shaped member both rendered asDEPENDENCIES.json, naming neither.Also closes the count drift in CLAUDE.md — the same defect elsewhere
CLAUDE.md said "Eight candidate records … 34 files and 6 archive members" where the checker finds eleven and 55. Those numbers are now written in a parseable form and compared against the checker's own summary line by a control, with a second control asserting the comparison would notice a drifted number. A count in the file people read before editing is load-bearing; it had drifted twice as prose nobody compared.
Scoping, so the controls are not failed for the wrong reason
Archive declarations are read only in a root holding
research/campaigns, so the synthetic-root controls still work.test_the_real_tree_reads_its_archive_declarationsasserts this repository is never the skipped case, and the summary line printsarchive_scopeso a skipped run is visible rather than silent.Verification
10 of the 29 controls were verified to fail against the pre-fix tool, in a real recursive copy outside the tree (
git archiveof the old head, new tests over oldtools/, inodes asserted distinct).What this does not establish
A pin is an identity statement and nothing more. It says nothing about whether a certificate is correct, whether its mathematics holds, or whether a file is current or authoritative. A green run means the bytes still match. No claim, premise, obligation or gate is discharged by anything on that page, and the four declarations it now reads are not reviewed by this change — only located.
🤖 Generated with Claude Code
https://claude.ai/code/session_01Cz7WZybv8znP64SpPj6sWY
Generated by Claude Code