Skip to content

The pinned-source index missed 13 pinned files, and told me one was free to edit - #140

Merged
cursor[bot] merged 4 commits into
chatgpt/drive-github-hardening-20260919from
claude/pinned-index-archive-members
Sep 27, 2026
Merged

cursor[bot] merged 4 commits into
chatgpt/drive-github-hardening-20260919from
claude/pinned-index-archive-members

Conversation

@d6g8k5htny-coder

Copy link
Copy Markdown
Owner

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.md exists so nobody has to learn a byte binding by breaking one. 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 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.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:

path pinned by
research/rn/moment_envelope.py rn_bernstein…zip::bernstein/DEPENDENCIES.json
research/rn/density_majorant.py, n6_inputs.py, side24_wedge.py, spatial_cover.py same
engine/operations/trial.py same
tools/h3_rn_n6_check.py, tools/twelve_project_check.py same — two checkers pinned by the campaign they enforce
research/parallel/lpw/lpw_modulus.py, ARGUMENT.md q0_twelve…zip::verification_plan.json
two drive/ and drive/search/ files same
docs/OPEN_PROBLEMS.md tools/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_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:

archive member key enforced by paths
h3_rn_n6_20260920_v1.zip verification_plan.json repository_inputs tools/h3_rn_n6_check.py 25
rn_bernstein_sharp_variance_20260921_v1.zip bernstein/DEPENDENCIES.json files tools/rn_bernstein_sharp_check.py 30
rn_bernstein_sharp_variance_20260921_v1.zip sharp_variance/DEPENDENCIES.json files tools/rn_bernstein_sharp_check.py 32
q0_twelve_20260920_v1.zip verification_plan.json repository_dependencies tools/twelve_project_check.py 24
(held in code) — SUPPLEMENTAL_DEPENDENCIES tools/twelve_project_check.py 2

Each 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() 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.

Three mistakes I made writing this, all caught by the controls

  1. My 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.
  2. main() merged the archive declarations while 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().
  3. 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 — 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_declarations asserts this repository is never the skipped case, and the summary line prints archive_scope so a skipped run is visible rather than silent.

Verification

pinned_sources_check: certificates=11 pinned_files=55 pinned_archive_members=6
                      archive_declarations=4 archive_scope='read' problems=0
tests/test_pinned_sources.py        29 passed
full suite                          3424 passed, 2 skipped
claims_check, quarantine_check, verify_manifests, consumers_check,
registers_check, disclosure_check   all clean
rn_bernstein_sharp_check            PASS  <- confirms no pinned byte moved

10 of the 29 controls were verified to fail against the pre-fix tool, in a real recursive copy outside the tree (git archive of the old head, new tests over old tools/, 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

…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

Copy link
Copy Markdown
Owner Author

The red verify on this branch's first push is the branch-creation artefact, not this PR

What failed: verify job 108439437118, at the last step, claims_gate_adapter.py event-compare:

{
  "error": "before ref unavailable or all-zero: '0000000000000000000000000000000000000000'",
  "promotion_permission": false,
  "scientific_effect": "NONE"
}

Why it is not this PR's. GitHub sets a push event's before to all-zero when the push creates the branch, and _require_usable_ref (tools/claims_gate_adapter.py:1606) rejects an unusable before by design — tests/test_claims_gate_adapter.py:575 pins that refusal. So the first push to any new branch fails this step regardless of its diff. Every step before it passed on this head, including the adapter's own tip_health run (problems: [], 39 nodes).

It is established empirically, not just argued. #134 and #135 each showed the same all-zero failure on their branch-creation push, and on each the next push — carrying a real before — passed the identical step. Both are green on every job now. Nothing about the mechanism is specific to what this branch changes.

The gating run is the pull_request one (108439526872), which computes base→head rather than before→after and is in progress as I write this.

No re-run spent, and no empty commit. A re-run reproduces this deterministically — the input is the event payload, not anything flaky — so it would burn a cycle to learn nothing. An empty commit or a close-and-reopen to clear it is not something I will do. It clears on its own the next time this branch receives a real commit, if one is needed; the diff does not need one today.

Not proposed as a change to the adapter here. The refusal is correct behaviour and relaxing it would weaken a real gate. The analysis and a proposed patch for the adapter's owner are on #134; this comment exists so nobody has to re-derive why a red check sits on a branch whose gating run is green.

Scientific effect: NONE.


Generated by Claude Code

…0260919' into claude/pinned-index-archive-members

Copy link
Copy Markdown
Owner Author

Read: the three-dot diff 96e5175...3013733 (4 files, +574/−59), the PR body and comment, tools/h3_rn_n6_check.py, tools/rn_bernstein_sharp_check.py, tools/twelve_project_check.py, research/rn/n6_inputs.py, and the four archive members directly via zipfile. Ran in a detached worktree at 3013733: tools/pinned_sources_check.py (certificates=11 pinned_files=55 pinned_archive_members=6 archive_declarations=4 archive_scope='read' problems=0); tests/test_pinned_sources.py (29 passed); the new tests over the base's tool/index/CLAUDE.md (12 failed, 17 passed); a byte appended to research/rn/moment_envelope.py (problems=1, exit 1, message names bernstein/DEPENDENCIES.json); the h3 row deleted from ARCHIVE_DEPENDENCY_SOURCES (guard fires, exit 1). Declared counts 25/30/32/24 match h3_rn_n6_check.py:91, rn_bernstein_sharp_check.py:110/112, twelve_project_check.py:181. The 13 added index rows are exactly the 13 the body lists. The merge commit's tree equals git merge-tree of its parents. No status path is touched.

  1. CLAUDE.md:51 and the PREAMBLE at tools/pinned_sources_check.py:539-540 (rendered at research/PINNED_SOURCES.md:28-29) say two checkers are "pinned by the very campaign they enforce" and that pinned documents live in governance/. Both are false. h3_rn_n6_20260920_v1.zip::verification_plan.json[repository_inputs] does not name tools/h3_rn_n6_check.py; q0_twelve_20260920_v1.zip::verification_plan.json[repository_dependencies] does not name tools/twelve_project_check.py; both checkers are pinned only by the two rn_bernstein_sharp_variance members, a downstream campaign whose replay depends on them — your own table shows this. No pinned path begins with governance/. These are false statements in the document this PR exists to make trustworthy. Resolve: reword both sites, drop governance/, run tools/pinned_sources_check.py --write, and fix the body's "pinned by the campaign they enforce" row.

  2. enforcing_checkers() scans only top-level tools/*.py. research/rn/n6_inputs.py:67 also calls runtime.repository_inputs(root, dependencies) — today the h3 plan, already covered — so a research/ module enforcing a new set would not trip the guard. And the guard is per-checker: deleting only the q0_twelve row is not caught by it, because tools/twelve_project_check.py is still named in CHECKER_HELD_DEPENDENCIES (the index-equality control catches it instead, 46 problems). Not blocking; state the scope in the docstring.

  3. Enforce the float-labelling rule, and stop the tool from demanding a false label #136 (same author, same base, draft) rewrites the same CLAUDE.md paragraph; git merge-tree of the two heads conflicts there. Enforce the float-labelling rule, and stop the tool from demanding a false label #136's control at tests/test_noncertifying.py:245-260 already tolerates the index naming moment_envelope.py, so The pinned-source index missed 13 pinned files, and told me one was free to edit #140 first is safe; Enforce the float-labelling rule, and stop the tool from demanding a false label #136 then drops its "index is not yet complete" paragraph on rebase.

State: draft; both verify jobs on 3013733 in progress at 17:34Z; mergeable_state unstable. Verdict: AMEND — with the two-sentence fix, a regenerated index, ready-for-review and green verify, this merges on the merits. Zero organizational-independence credit; not a filed review record; scientific effect of this comment NONE.


Generated by Claude Code

cursoragent and others added 2 commits September 27, 2026 18:08
…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>
@cursor

cursor Bot commented Sep 27, 2026

Copy link
Copy Markdown
Contributor

Amendment applied at 6950689 (fix commit plus merge of base 38a3e07).

Changes against the review findings:

  • tools/pinned_sources_check.py PREAMBLE reworded: h3_rn_n6_check.py and twelve_project_check.py are pinned because downstream rn_bernstein_sharp_variance members pin them, not by the campaigns they enforce; the stray governance/ mention is dropped.
  • enforcing_checkers() docstring now states its actual scope: top-level tools/*.py only, with a per-checker guard; the index-equality control covers the single-missing-row case.
  • CLAUDE.md carries the same corrected sentence.
  • research/PINNED_SOURCES.md regenerated with --write (61/61 digests).

What ran on 6950689 (Python 3.11.16, locked pytest 9.0.2):

  • pinned_sources_check: problems=0; tests/test_pinned_sources.py: 29 passed
  • tools/run_checks.py steps 1–50: PASS; claims_gate_adapter.py event-compare with CLAIMS_GATE_BEFORE_REF=38a3e07 / CLAIMS_GATE_AFTER_REF=HEAD: rc=0, transition_ok=true; tip-health rc=0; navigation check: no problems
  • Full python -m pytest -q: 3432 passed, 2 skipped, and 105 cases in test_workflow_integrity_hardening.py / test_ci_pins.py failed only because the bare python executable was not on PATH in my first run (returncode=127: python: command not found); with the 3.11 interpreter on PATH those two modules report 137 passed. Net: no failing test attributable to this change.

Scientific effect: NONE. This corrects the checker's documentation of its own scope and regenerates the index; no digest semantics, grade, or gate changes.

@d6g8k5htny-coder
d6g8k5htny-coder marked this pull request as ready for review September 27, 2026 18:34
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@cursor
cursor Bot merged commit 1eeec0c into chatgpt/drive-github-hardening-20260919 Sep 27, 2026
5 checks passed
@cursor
cursor Bot deleted the claude/pinned-index-archive-members branch September 27, 2026 18:35
cursor Bot pushed a commit that referenced this pull request Sep 27, 2026
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>
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.

2 participants