Repository navigation
Two false numbers in research/interval's own prose, both claiming more than the code delivers - #135
Conversation
…e than the code does An audit of the package's documentation rather than its arithmetic: every numeric assertion in the README and in the library docstrings re-derived or re-measured against the code as it stands. No containment violation. Two false statements, both in the unsafe direction, and two certificates with no control that names them. 1. `transcendental.py` line 688 asserts, as a premise of the sin/cos reduction sketch, that "pi(P) has width below 10**-P". False at exactly P = 64 (width 1.051e-64) and P = 102 (1.084e-102), true at every other P in 1..129: pi takes target = _tol(key)/32 and then round_out(4*key + 96), and the outward significand rounding puts the width back over 10**-P where the binary and decimal boundaries line up. The sketch's conclusion survives. The same paragraph says the argument tolerates pi being "about 10**13 times more loosely" certified and the shortfall is a factor of 1.05, and containment never rested on it either: _sin_cos_reduced re-tests mag(s) <= 1 and raises. A test pins the exceptional set, so a future pi that misses the hint at a THIRD precision is a failure rather than a discovery. 2. Phi's docstring and the README gave "beyond about x = 26" as a flat constant for where 1 - Phi(x) collapses to [0, ...]. It is not a constant. Phi finishes with round_out(4*g + 32), g = prec + 20, so it keeps 4*prec + 112 significand bits and the subtraction goes vacuous once the tail mass falls below 2**-(4*prec + 112): ceil(sqrt(2 ln2 (4 prec + 112))), measured as 13 at prec 1, 17 at prec 20, 27 at prec 100. "About 26" is the prec = 100 row and is optimistic everywhere below it. At prec 20 a consumer trusting it would read 1 - Phi(20) = [0, 7.97e-59] as a tail bound where normal_sf(20) = 2.75e-89. The README carries the measured table and the closed form; two rows are asserted by tests. 3. NC13 and NC14: the sin/cos alternating remainder, and the UPPER branch of the Mills bracket. The mutation exercise refined this finding and the wording follows it rather than the other way round -- neither mutant survived the old suite, but the sin one was caught by the Pythagorean identity and the addition formula, which report that trigonometry is inconsistent rather than that a remainder bound is wrong. Both controls now name their mutation. NC14 is rigorous only below ERF_CROSSOVER and says so: above it, erfc IS this bracket, so the library holds no independent enclosure to contradict. At z <= 6 the series gives one 14 to 31 orders tighter; above, the test asserts the other symptom, that the mutation claims thirty digits of a quantity the honest bracket pins to four. Both false statements are in `research/interval/transcendental.py`, which is pinned by four certificates, so the bytes stand and the corrections live in `research/interval/README.md`, which is not pinned. A reader of transcendental.py alone still reads the false constant; that is the cost of the pin, recorded rather than hidden. Verified: 81 passed in tests/test_interval.py; both mutants built outside the repository, each killed, each by the control that names it. Nothing here promotes, closes, discharges or reclassifies anything. No bound was tightened and no status moved. A corrected threshold is a corrected sentence. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Cz7WZybv8znP64SpPj6sWY
|
The red Failing check: Byte-identical to the failure on #134, where the analysis and a proposed patch for the adapter's owner are written up. In short: a push that creates a branch carries Not this PR's: the diff is two files, No re-run spent: the event payload is immutable, so Local verification on this head, for the record: Generated by Claude Code |
…0260919' into claude/interval-docs-errata
|
OpenAI/Codex bounded review claim at |
|
Review finding at |
…ies that proved nothing Both found by a nonauthor engineering review of this branch. The measured rows were right; what was said about them was not. 1. The README called `ceil(sqrt(2 ln2 (4 prec + 112)))` THE collapse threshold on the strength of seven agreeing rows. It is a fit. It is a continuous approximation to an integer crossing and rounds up by one whenever the crossing lands just inside an integer. The review named prec = 3, where the measured threshold is 13 and the formula says 14; checking the rest of the range found four more, at prec 8, 13, 19 and 25. Every one overshoots by exactly one, and the seven tabulated rows all happen to agree, which is exactly why a seven-row fit must not be called the threshold. Direction, recorded because it decides how much this matters: the fit predicts a collapse one step LATER than the truth, so a consumer trusting it at prec = 3, x = 13 expects a usable bound and gets [0, ...]. Sound, and useless -- the same trap this branch's original correction was about, one row down. It is not a containment failure. The opposite direction would be worse and now has its own control. 2. The two rational inequalities asserting the ceiling used the outer bounds in the wrong directions. To prove (n-1)^2 < 2 ln2 sig you need the LOWER bound on 2 ln 2; the test used the upper. To prove 2 ln2 sig <= n^2 you need the upper; the test used the lower. Both statements are necessary and neither is sufficient, so the test asserted things that are true while proving nothing. On the two rows it checked, the invalid pair happens to pin the right n -- which is why the defect survived being written and read by its author. test_the_old_inequalities_do_not_prove_the_ceiling demonstrates it instead of asserting taste: at prec = 275 the old pair also admits 42 where the certified ceiling is 41, and at prec = 405 it admits 49 where the truth is 50 -- the unsafe direction, licensing a collapse that has not happened. The corrected pair cannot affirm either value. At prec = 275 the three-digit bracket turns out to be inconclusive about the truth as well, and being silent where it cannot decide is the correct behaviour for a bound; a wider enclosure decides it, and the control uses one. The 2 ln 2 bracket was a typed comment. It is now asserted from this module's own `log`, so the enclosure is unconditional rather than a number nobody checked. The numerators are kept as plain ints because Fraction(1386, 1000) normalises to 693/500 and reading `.numerator` off it silently changes every comparison -- a mistake made once while writing this. 85 tests pass (81 before, four added). pinned_sources_check, disclosure_check, claims_check, consumers_check and verify_manifests are clean; research/interval/README.md is not byte-pinned, and transcendental.py is untouched, so the docstring's own constant remains errata recorded here. Scientific effect: NONE. No bound was tightened, no enclosure changed, no claim or premise status moved. A corrected threshold description is documentation. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Cz7WZybv8znP64SpPj6sWY
|
Both findings confirmed and fixed at The overclaim: worse than one counterexample
Every one overshoots by exactly one, and the seven rows the README tabulates (1, 5, 10, 20, 30, 50, 100) all happen to agree. That is the whole lesson: a seven-row fit that agrees on all seven of its own rows is not evidence that it is the threshold. The formula is a continuous approximation to an integer crossing and it rounds up by one whenever the crossing lands just inside an integer. The README now says fit, not threshold, tabulates all five counterexamples, and your Direction, since it decides how much this matters, and I think it supports your "documentation overclaim, not a containment failure" framing exactly. The fit predicts collapse one step later than the truth, so a consumer trusting it at The inequalities: you are right, and they proved nothingThis is the finding I am most glad you caught, because the rows were correct and the argument for them was not. To prove Worse for my side of it: on the two rows it checked, the invalid pair happens to pin the right So rather than just flip the constants, the new control demonstrates the flaw:
One honest detail from doing this: at The Verification at
|
|
@d6g8k5htny-coder — review of #135 at head Read: the PR body, all four comments (no filed reviews or review threads), the three-dot diff ( Recomputed, all confirmed: Mutants: sin remainder advanced one index → 4 failures, NC13 among them (matches your count). Mills upper quotient Findings — all prose, no assertion is wrong:
Process: no status path touched; Verdict: AMEND at stated scope — three one-line prose corrections, best pushed with the update; none changes an assertion. Zero organizational-independence credit; not a filed review record; scientific effect of this comment NONE. Generated by Claude Code |
d6g8k5htny-coder
left a comment
There was a problem hiding this comment.
Owner-requested merge audit, 2026-09-26 (America/Chicago). Nonauthor engineering review by OpenAI/ChatGPT; source-exposed, zero organizational-independence credit. Scope: the complete two-file diff at 16b00c1, not the mathematical claims underneath the interval library.
Engineering disposition: suitable for normal guarded integration into its existing hardening base, not a promotion or a retarget to public main. I read both diff bodies, the prior review findings and the author's correction. The README now distinguishes the measured collapse thresholds from the heuristic fit; the tests use sufficient lower/upper rational comparisons and include the counterexamples and targeted NC13/NC14 controls. No library implementation, pinned certificate, scientific register, proof body or status path is in this diff. The current hardening ref is 96e5175; comparison from the recorded cd66a65 base has no changes to the interval implementation or tests/test_interval.py.
Freshly inspected hosted evidence for this exact head: ci run 36253729760 / verify job 108436465134 completed successfully, including source bindings, claims gates, unit tests and negative controls; navigation 36253729747 and withdrawal-governance-pilot 36253729759 also succeeded. No inline review threads are present. These are inspected hosted results, not a new local full-suite replay. Prior branch-creation push failure is not being relabeled as success.
I will use only the normal PR merge route with the expected head SHA; any server-side required-check or protection rejection remains a blocker. Scientific effect NONE; no proof acceptance, closure, independence credit or change to existing verdicts follows from this engineering review.
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
38a3e07
into
chatgpt/drive-github-hardening-20260919
What this changes
research/interval/README.mdandtests/test_interval.py. No library code —research/interval/transcendental.pyandcore.pyare pinned by fourcertificates and are untouched.
Type of change
The findings
A fifth adversarial pass over this package, aimed at the prose rather than the
arithmetic: every numeric assertion in the README and in the library docstrings
re-derived or re-measured against the code as it stands. No containment
violation. Two false statements, both in the unsafe direction — each claims
something tighter than the code delivers — and two certificates with no control
that names them.
1.
pi(P)misses its own width hint at exactly two precisionstranscendental.pyline 688 asserts, as a premise of thesin/cosreductionsketch, that
False at exactly
P = 64(width1.051e-64) andP = 102(1.084e-102), andtrue at every other
Pin 1..129.pitakestarget = _tol(key)/32and thenround_out(4*key + 96), and the outward significand rounding can put the widthback over
10**-Pwhere the binary and decimal boundaries line up.The sketch's conclusion survives, and that is the honest report. The same
paragraph states the argument tolerates
pibeing "about10**13times moreloosely" certified, and the shortfall is a factor of 1.05. Containment never
rested on it either:
_sin_cos_reducedre-testsmag(s) <= 1and raises. So thisis a false premise inside a sound argument, not a broken bound — and a test now
pins the exceptional set, so a future
pithat misses the hint at a thirdprecision is a test failure rather than somebody's later discovery.
2. Where
1 - Phi(x)goes vacuous is a function ofprec, not a constantPhi's docstring, and the README, gave "beyond aboutx = 26".Phifinisheswith
round_out(4 * g + 32)whereg = prec + 20, so it keeps4*prec + 112significand bits, and the subtraction collapses once the tail mass falls below
2 ** -(4*prec + 112):precxwith(1 - Phi(x)).lo == 0Measured, and
ceil(sqrt(2 ln2 (4 prec + 112)))predicts every row exactly."About 26" is the
prec = 100row, and it is optimistic everywhere below it. Atprec = 20a consumer trusting it would take1 - Phi(20) = [0, 7.97e-59]for atail bound where
normal_sf(20) = 2.75e-89. Even atx = 16, one short of thethreshold, the subtraction is already two orders coarser than the direct route
(
7.97e-59against2.9e-61) — so the wrong shape of statement mattered asmuch as the wrong number.
3. Two certificates with no control that names them
The
sin/cosalternating-series remainder in_sin_cos_reduced, and theupper branch of the Mills bracket (
b = 1 - 3/(2z^2), validz >= 1). Thelower branch had a control; the upper did not, and the Machin remainder control
covers
atan, notsin/cos.The mutation exercise refined this finding, and the wording follows the evidence
rather than the reverse: neither mutant survived the old suite. The
sinone wascaught by the Pythagorean identity and the addition formula — tests that report
"trigonometry is inconsistent", not "this remainder bound is wrong" — and the
Mills one by twenty tests at once. What was missing was a control that names the
mutation, so a failure points at the certificate. Both now do.
The mutants
Both new controls verified by mutating a copy of
transcendental.pyoutside therepository — never by editing the library — one weakening each, in a subprocess
with
PYTHONDONTWRITEBYTECODE=1:boundadvanced one index in_sin_cos_reduced..._sin_remainder_off_by_one_loses_containment4*zz*zz + 2*zz - 3written+ 1in_erfc_mills's upper quotient (b = 1, the proved lower bound)..._mills_upper_bound_without_the_b_correctionNC14 is rigorous only below
ERF_CROSSOVER, and the test says so instead ofhiding it: above the crossover
erfcis this bracket, so the library holds noindependent enclosure to contradict it. At
z <= 6the series gives one 14 to 31orders tighter and the broken value falls clean below its lower endpoint; above
it, the test asserts the other symptom — the mutation collapses the claimed
relative width from the honest
~3/(4 z^4)to the rounding floor, claiming thirtydigits of a quantity the bracket pins to four.
Writing NC14 corrected my first attempt, which is worth recording: comparing the
b = 1expression againsterfc(z).loabove the crossover compares the.hiand.loof the same quantity, because_erfc_millscomputes its lower endpointfrom exactly that expression. It looked like a control and proved nothing.
On the pin
Both false statements are in
transcendental.py, whichresearch/PINNED_SOURCES.mdrecords as bound by
DEPENDENCIES.json,candidate.json,hermite_gaussian_20260919.jsonandinner_wedge_20260920_v1.json. So the bytesstand and the corrections live in
research/interval/README.md, which is notpinned. A reader of
transcendental.pyalone still reads the false constant.That is the cost of the pin, recorded rather than hidden — and it is the reason the
measurements landed as tests, which no reader has to find in a README.
Status discipline
claims/graph.jsonunchangedregisters/json/work_events.jsonunchangedIf this is a review
Not a review of anyone's work. This is the package auditing its own prose, and no
independence credit arises from it.
Verification
Every step of
.github/workflows/ci.ymlreplayed locally: 48 of 52 green undertools/run_checks.py, then steps 50–52 by hand.Step 49 (
claims_gate_adapter.py event-compare) exits 1 locally on any tree forwant of
GITHUB_EVENT_PATH, reproduced on the clean base at2f7a5a9, whose ownhosted ci run 36210490138
is green.
Two notes on state rather than on the diff:
verify, at that sameevent-comparestep, because a branch-creation push carriesbefore = 0000…and_require_usable_refrejects it by design(
tools/claims_gate_adapter.py:1606, called unconditionally at:1897-1902).It is not this diff, it cannot recur on this branch, and the analysis plus a
proposed patch for the adapter's owner is written up on
#134.
The
pull_requestrun is the one that gates this PR.cd66a65while this was being verified. Its diff touchesresearch/PINNED_SOURCES.md,tests/test_pinned_sources.pyand the SIDE24source-recovery tree — no overlap with the two files here, so no base merge
is needed. I will merge it if CI disagrees.
What this does not establish
It read prose against code. It verified no mathematics, tightened no bound,
and moved no status. A corrected threshold is a corrected sentence.
OBL-H5-JETMOD,OBL-H5-ZBAND,OBL-H5-REMOTE-THRESHOLD,OBL-D1-PROMOTE,D3-LEMMA-RN-UNIF,PERC-DECAYandOBL-B1-BRANCHstand exactly wheredocs/OPEN_PROBLEMS.mdhas them.one.
pi(64)contains π. The false thing is a sentence about its width.normal_sfwas already the rightfunction; what changes is that the README now says when the wrong one stops
working, and at which
prec.ceil(sqrt(2 ln2 (4 prec + 112)))formula is a measured fit checked atseven precisions, not a proved threshold. Two rows are asserted by tests; the
other five are measurements in a README and carry no more weight than that.
🤖 Generated with Claude Code
https://claude.ai/code/session_01Cz7WZybv8znP64SpPj6sWY
Generated by Claude Code