Repository navigation
Enforce the float-labelling rule, and stop the tool from demanding a false label - #136
Conversation
`tools/noncertifying_check.py` did not exist on this line, so nothing enforced "where you compute in floats, label the path NON-CERTIFYING in the code and in any output". Forty-one repository-authored files hold a float literal or a `float(` call; twenty-four carried no label. Reading all twenty-four is what shaped the port, and it inverted the obvious fix. Sixteen of them use a float ONLY as a REJECTION PROBE: the float is the input a checker must REFUSE, and the test asserts the refusal. Labelling one of those NON-CERTIFYING would be a FALSE statement about the file -- its whole content is that floats are rejected -- so a checker a contributor can satisfy by pasting the banner is a checker that invites a false claim into the tree. They are DECLARED, each with the line it refuses, and the declaration is the deliverable. Five more are wall-clock (poll intervals, timeouts, elapsed seconds) and are declared as durations. Two files compute in floats where it matters. Exactly ONE could be labelled: tests/test_rn_moment_envelope.py -- pins the digits moment_envelope.py prints, with a float fourth root against a float literal inside a float tolerance. Labelled, and its docstring now points at the two tests that assert the envelope exactly and without floats, which is where the mathematics actually lives. THE OTHER COULD NOT, AND FINDING THAT OUT COST A BROKEN PIN. research/rn/moment_envelope.py's `__main__` block prints float fourth roots of exact rationals, so rule 3 plainly applies. I labelled it. The CI replay then failed at step 43 with REJECTED: ValueError: repository dependency mismatch: research/rn/moment_envelope.py because the file is pinned by an ARCHIVE MEMBER -- research/campaigns/rn_bernstein_sharp_variance_20260921_v1.zip, member bernstein/DEPENDENCIES.json, which binds 30 repository paths by digest -- and `research/PINNED_SOURCES.md` does not cover pins of that shape. The index I built in PR #51 reported the file as unpinned, I trusted it, and the campaign replay caught what the index missed. That is precisely the failure PR #51 exists to prevent, and it is recorded rather than quietly fixed. The bytes are restored (6778 / 107c873f..., verified against the archive member) and the obligation is DECLARED as UNMET, alongside research/bands/ladder.py, whose eleven float sites are display conversions in an equally pinned file. Two of the twenty-four therefore end as recorded unmet obligations rather than as labels, which is the honest count. A new control asserts moment_envelope.py's bytes against the archive member directly, so the next attempt fails in a test named after the reason instead of inside a campaign replay -- and asserts that PINNED_SOURCES.md still omits it, so the gap stays visible rather than papered over. CLAUDE.md says the same in the section a contributor reads before editing, and says to grep the campaign archives until the index covers them. Two fixes to the tool itself, both found by porting it: The spelling rule (2) fires on any identifier spelling in prose whether or not the file owes a label. research/cover/audit.py has ZERO float sites and uses "noncertifying" as an English adjective -- "Well-formed noncertifying or incomplete totals remain noncertifying/incomplete" describes a TOTAL's status. That is the checker's second false positive of the same family as its first (a receipt field name, recorded in its own comment). The rule is NOT narrowed, because a file that labels an mpmath path in prose and writes the word badly must still be caught; instead SPELLING_DECLARED carries the exemption with the reason, and audit.py's bytes are untouched. research/side24/source_recovery/custody/ is excluded on the same ground as the carrier blobs: recovered Drive source, held byte-exact and pinned, so adding a banner is the one edit that would break it. The CI step is registered in BOTH .github/workflows/ci.yml and tools/run_checks.py's REQUIRED_COMMANDS; closure_pipeline check-plan refuses an unlisted CI command and now reports 53 explicit checks. tests/test_noncertifying.py is 27 CLI-invoked controls. Seven fixes reverted in a copy of the tree outside the repository, one at a time, in subprocesses with PYTHONDONTWRITEBYTECODE=1: seven killed, none surviving, each by the control written for it -- including one that removes the label from a display path's OUTPUT while leaving the comment, since half the rule is not the rule. Also corrected in CLAUDE.md: the pinned-source counts had drifted from eight records and 34 files to eleven and 42 as the SIDE24 recovery lane grew. The numbers are generated; the paragraph now says to read the index rather than it. No status moved. A labelled float path is still a float path, a declaration is a claim about a file rather than a certificate about anything, and an unmet obligation recorded is not an obligation discharged. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Cz7WZybv8znP64SpPj6sWY
|
The red Failing check: Byte-identical to #134 and #135, where the analysis and a proposed patch for the adapter's owner live. Not this PR's: the diff is six files, none of them the adapter or anything it reads. No re-run spent — the event payload is immutable, so Worth escalating now that it is the third identical instance. One occurrence looked like an edge case; three in a row, on three unrelated branches, is the general behaviour: the first push to every new branch in this repository fails Two honest notes on state:
Local verification on this head: Generated by Claude Code |
… its own fix test_the_pinned_display_path_is_declared... asserted `"moment_envelope" not in` research/PINNED_SOURCES.md, to keep the gap visible rather than papered over. That was the wrong shape. The sibling change that teaches tools/pinned_sources_check.py to read dependency declarations inside campaign archives ADDS this file to the index -- which is exactly the fix this PR's body argues for -- so whichever of the two landed second would have broken the other. A control that has to be edited when the defect it describes is fixed is a control that penalises the fix, and it creates a merge-order hazard between two branches that agree with each other. The assertion is now the invariant that actually matters: the file's bytes match the archive member that pins it, and the index either omits it (gap open) or names it with the SAME digest and byte count (gap closed). The one state that must never occur -- the index naming it with a different digest -- is what fails. Found while checking my own two open branches against each other rather than after a merge picked a loser. 26 controls pass; noncertifying_check problems=0; rn_bernstein_sharp_check PASS, so the pinned bytes are still intact. Scientific effect: NONE. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Cz7WZybv8znP64SpPj6sWY
|
Two corrections at A control that penalised its own fix
assert "moment_envelope" not in f.read() # research/PINNED_SOURCES.md— keeping the gap visible rather than papering over it. That was the wrong shape. #140 teaches A control that must be edited when the defect it describes is fixed is a control that penalises the fix, and between two sibling branches it creates a merge-order hazard where neither is wrong. It now asserts the invariant rather than the transient state:
Found by checking my two open branches against each other, not after a merge picked a loser. A count in this body was wrongThe body says "27 CLI-invoked controls" and Correcting it because a typed count that nobody compares is precisely what #140 makes mechanical for Verification at
|
…0260919' into claude/noncertifying-label-enforcement
…led path The base advanced from cd66a65 to 96e5175 and added six files, one of which this PR's own checker correctly refused: tools/coordination_check.py: 1 float site(s) and no 'NON-CERTIFYING' label noncertifying_check: files=198 with_float_sites=42 ... problems=1 files=198 against 192 locally was the tell: the file did not exist when this branch was written. The failure is this PR's to own -- the checker it adds is what makes CI reject the merged tree -- even though the file is someone else's. The site is age = (now - parse_utc(hb)).total_seconds() / 3600.0 the age of an agent heartbeat in hours, compared against STALE_AFTER_HOURS. It is wall-clock, in the same category as the five durations this PR already declares, and DECLARED is the honest disposition: coordination_check.py computes no bound at all, so stamping NON-CERTIFYING on it would state something false about the file. That is the argument this whole PR rests on, and it would have been cheaper to paste the banner than to write the declaration -- which is exactly why the declaration is the right answer. The base merge is included here rather than left for later: the PR should be tested against the base it will land on, not the one it was branched from. declared=26 and problems=0. Full suite 3543 passed, 2 skipped, 3 subtests. closure_pipeline check-plan: 55 explicit checks. 108 CI-coverage and workflow tests pass, so the base's own new checkers and this one are both registered. Scientific effect: NONE. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Cz7WZybv8znP64SpPj6sWY
|
@d6g8k5htny-coder — triage of #136 at head 567213c against base 96e5175 (the merge-base; the base has not moved). Read: the full three-dot diff (6 files, +814/−3), the body, both comments, Findings:
Verdict: AMEND. Engineering/docs, no pinned byte or status path moved, controls are real. The PR is a draft and cannot be merged as-is; it needs the author to fix 1–3 and mark it ready for review. Zero organizational-independence credit (same account); not a filed review record; scientific effect of this comment NONE. Generated by Claude Code |
1. State in the docstring that printed output is not checked: the tool reads source only and never runs a display path, so the rule's 'in its output' half is unenforced. 2. is_excluded() matches EXCLUDED entries as whole path components or path prefixes instead of substrings; tools/quarantine_check.py and tests/test_quarantine_digest_coverage.py are now scanned (files=200) and test_the_scanner_is_not_vacuous asserts both, plus that no sandbox/legacy/ quarantine root is scanned. 3. Correct two record sentences: two tools did handle the string at single sites (math_status_check.py:316, rn_bernstein_sharp_check.py:274) but none enforced the rule; the quoted rule is the live Engineering-conventions bullet, not the superseded 'rule 3'. Ran: tools/noncertifying_check.py (files=200 with_float_sites=42 declared=26 problems=0); pytest tests/test_noncertifying.py tests/test_rn_moment_envelope.py (35 passed). Co-authored-by: Dylan Roy <d6g8k5htny@privaterelay.appleid.com>
…0260919' into claude/noncertifying-label-enforcement # Conflicts: # CLAUDE.md Co-authored-by: Dylan Roy <d6g8k5htny@privaterelay.appleid.com>
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>
|
Amendment applied at acc9510; base (now including #140 at 1eeec0c) merged at 66cdbc6; one follow-up test fix on top. Changes against the review findings:
What ran on the merged head (Python 3.11.16, locked pytest 9.0.2): Scientific effect: NONE. Label/declaration hygiene and scanner scope; no number, grade or gate moves. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
0394913
into
chatgpt/drive-github-hardening-20260919
What this changes
New
tools/noncertifying_check.py(wired into CI), newtests/test_noncertifying.py(27 CLI-invoked controls), one label intests/test_rn_moment_envelope.py, and theCLAUDE.mdsection that explains therule. No pinned byte is touched — and the reason that sentence needed
verifying is the main finding below.
Type of change
CLAUDE.mdsection, alongside the tool)The gap
CLAUDE.mdrule 3 says: "Where you compute in floats, label the pathNON-CERTIFYING in the code and in any output." Nothing on this line enforced it —
no tool in
tools/contained the string. Forty-one repository-authored files holda float literal or a
float(call; twenty-four carried no label.Reading all twenty-four inverted the obvious fix
Sixteen of them use a float ONLY as a rejection probe. The float is the input
a checker must refuse, and the test asserts the refusal:
Labelling one of those
NON-CERTIFYINGwould be a false statement about thefile — its whole content is that floats are rejected. A checker a contributor
can satisfy by pasting the banner is a checker that invites a false claim into the
tree, which is the opposite of what this repository is for. They are
DECLARED,each with the line it refuses, and the declaration is the deliverable rather than
the label. Five more are wall-clock (poll intervals, timeouts, elapsed seconds)
and are declared as durations. A control asserts a declaration and a label are not
interchangeable states.
Two files compute in floats where it matters. One could be labelled.
tests/test_rn_moment_envelope.pypins the digitsmoment_envelope.pyprints,with a float fourth root against a float literal inside a float tolerance.
Labelled — and its docstring now points at the two tests that assert the envelope
exactly and without floats, which is where the mathematics actually lives.
The other could not, and finding that out cost a broken pin
research/rn/moment_envelope.py's__main__block printsfloat(...) ** 0.25fourth roots of exact rationals, so rule 3 plainly applies. I checked
research/PINNED_SOURCES.md, which did not list the file, and added the label.The CI replay then failed at step 43:
The file is pinned — by an archive member:
research/campaigns/rn_bernstein_sharp_variance_20260921_v1.zip, memberbernstein/DEPENDENCIES.json, which binds 30 repository paths by digest and isenforced by
tools/rn_bernstein_sharp_check.py.tools/pinned_sources_check.pyreads candidate records on disk and handles the<archive>::<member>pin shape, but never opens a member that is itself adependency list. So the index reported a pinned file as free to edit, and the
campaign replay caught what the index missed — precisely the failure that index
was built to prevent.
The bytes are restored and verified against the member (6778 bytes,
107c873ffd7565e8…), the campaign check passes, and the obligation isDECLAREDas unmet, alongside
research/bands/ladder.py— eleven float sites, alldisplay conversions, equally pinned. Two of the twenty-four therefore end as
recorded unmet obligations rather than as labels, which is the honest count.
Three things guard it rather than a fix-and-move-on:
moment_envelope.py's bytes against the archive memberdirectly, so the next attempt fails in a test named after the reason instead
of inside a campaign replay.
PINNED_SOURCES.mdstill omits the file, so thegap cannot be quietly forgotten while it remains open.
CLAUDE.md's pre-edit section names the archive and says to grep the campaignarchives until the index covers them.
A sweep for the full scope found 32 JSON members across 8 archives naming 969
distinct repository paths — but not all are live pins. Many are manifests of an
archive's own contents, and one is a 2026-09-20 delivery snapshot listing
.github/workflows/ci.ymlat 3729 bytes where the live file is 7778; no toolreads it against the tree, so it is evidence, not a pin. I checked that one
specifically because this PR edits
ci.yml. Separating live pins from historicalrecords is the follow-up work, and
MANIFESTvsDEPENDENCIESnaming is not areliable signal for it.
Two fixes to the tool itself, both found by porting it
research/cover/audit.pyhas ZERO float sites. The spelling rule flagged itbecause it uses "noncertifying" as an English adjective — "Well-formed
noncertifying or incomplete totals remain noncertifying/incomplete" describes a
total's status. That is the checker's second false positive of the same
family as its first (a receipt field name, recorded in its own comment). The rule
is not narrowed — a file that labels an mpmath path in prose and writes the
word badly must still be caught — so
SPELLING_DECLAREDcarries the exemptionwith the reason, and their bytes are untouched. A control asserts the rule still
fires for an undeclared file.
research/side24/source_recovery/custody/is excluded on the same ground asthe carrier blobs: recovered Drive source, held byte-exact and pinned, so adding
a banner is the one edit that would break it.
The mutants
Seven fixes reverted in a copy of the tree outside the repository — never by
editing the library — one at a time, each in its own subprocess with
PYTHONDONTWRITEBYTECODE=1. Seven killed, none surviving, each by the controlwritten for it:
..._declared_files_all_exist...,..._summary_reports_both_declaration_counts..._spelling_rule_still_fires_for_an_undeclared_file..._recovered_custody_tree_is_excluded_not_declared..._pinned_display_paths_are_declared_as_unmet_obligations..._labelled_display_path_also_labels_its_output..._an_unlabelled_float_literal_is_refused,..._float_call_is_refusedThe output-label mutant is worth naming: it leaves the comment in place and
removes only the printed banner, because half of "in the code and in any output"
is not the rule.
Also corrected
CLAUDE.md's pinned-source counts had drifted from "eight candidate records … 34files" to eleven records, 42 files, 23 containers as the SIDE24 recovery lane
grew. The numbers are generated by
tools/pinned_sources_check.py, so theparagraph now tells the reader to read the index rather than the paragraph.
Correcting a number is not a fix for drift, and making that reconciliation
mechanical is queued separately.
Status discipline
research/rn/moment_envelope.pyrestored to 6778 /107c873f…, verified against the archive member;tools/twelve_project_check.py, also pinned, was declared and never edited)claims/graph.jsonunchangedregisters/json/work_events.jsonunchangedIf this is a review
Not a review of anyone's work. The one change affecting another agent's file is a
declaration in this checker exempting
research/cover/audit.py, whose bytes areuntouched. No verdict is recorded and no independence credit arises.
Verification
The CI step is registered in both
.github/workflows/ci.ymlandtools/run_checks.py'sREQUIRED_COMMANDS—closure_pipeline check-planrefuses an unlisted CI command and now reports 53 explicit checks.
tools/run_checks.py; step 50 isclaims_gate_adapter event-compare, which exits 1 locally on any treefor want of
GITHUB_EVENT_PATH(reproduced on the clean base, whose ownhosted run is green). Steps 51–53 run by hand, above.
The push that creates this branch will show a red
verifyat that same step,because a branch-creation push carries
before = 0000…and_require_usable_refrejects it by design. Analysis and a proposed patch for the adapter's owner are on
#134;
the
pull_requestrun is the one that gates this PR.What this does not establish
A labelled float path is still a float path. A declaration is a claim about a
file, not a certificate about anything. An unmet obligation recorded is not an
obligation discharged —
research/bands/ladder.pyandresearch/rn/moment_envelope.pystill print unlabelled float digits to anyone whoruns them, and this PR does not change that; it makes the fact findable.
mpmathandnumpyare floats too, and afile using them without a Python float literal is not caught — stated in the
tool's own docstring, not hidden.
🤖 Generated with Claude Code
https://claude.ai/code/session_01Cz7WZybv8znP64SpPj6sWY
Generated by Claude Code