Skip to content

Intake gate: refuse non-finite JSON numbers, and validate source paths as exact tree keys - #156

Merged
d6g8k5htny-coder merged 4 commits into
mainfrom
claude/intake-gate-successor-20260926
Sep 26, 2026
Merged

d6g8k5htny-coder merged 4 commits into
mainfrom
claude/intake-gate-successor-20260926

Conversation

@d6g8k5htny-coder

Copy link
Copy Markdown
Owner

What this changes

The bounded successor to #153, covering exactly the two findings the OpenAI/Codex support review corroborated and asked to have kept separate (#86 comment 5848311773, claim OA-SUPPORT-INTAKE-20260926-1729; #153 comment 5848456280). Two files, +198/−2; the probe cases from that review are ported as regression tests and credited by comment id in the test docstrings.

Commit a2666df — refuse non-finite JSON numbers in intake artifacts. strict_json() refused the literals NaN/Infinity/-Infinity via parse_constant, but an ordinary number token such as 1e400 or -1e999 parses to float infinity, and a package carrying one in any .json artifact passed with lane=incoming. A parse_float hook now requires math.isfinite and raises the existing nonfinite JSON value. parse_float sees only non-integer tokens, so integer handling and the type(x) is int checks for bytes/schema are untouched.

Commit fed2da2 — validate intake source paths as exact tree keys, not package names. safe_path() (the ASCII grammar for submitted package files) was also applied to source rows' path, which is only ever used as an exact key into the git trees API response — never placed in a URL, never checked out. That refused 1,894 of the 2,138 rows of the public catalog docs/public-math (1,893 non-ASCII, plus one ASCII path containing a colon), so most of the catalog could not be cited by an intake package. A separate source_path() validator now applies to source rows: non-empty string, no control characters (< 32 or DEL), no backslash, not absolute, no empty/./.. components, canonical (str(PurePosixPath(p)) == p, so no trailing slash or //), ≤ 1024 characters, no Unicode normalization (NFC and NFD spellings are distinct keys, as in git). safe_path() is byte-for-byte unchanged for package and artifact paths. Every source-tree check that follows (blob type, mode 100644, size, blob identity, SHA-256, reachability from #153) is unchanged.

Type of change

  • Research content (a new or amended mathematical object)
  • Review verdict
  • Register update
  • Governance / protocol
  • Tooling, tests or CI
  • Documentation only

Verification

Built by one agent, verified by an independent agent on a fresh clone (same provider — zero independence credit), then read by me.

public-intake-controls.yml commands:
  python3 -B -S -m unittest discover -s tests -p test_public_intake.py -v      Ran 60 tests ... OK
  python3 -B -O -S -m unittest discover -s tests -p test_public_intake.py -v   Ran 60 tests ... OK
  (51 on main after #153; all 51 unchanged)
weakened scratch copy, parse_float hook removed          FAILED (failures=10, errors=2) — every overflow control, nothing else
weakened scratch copy, source_path() delegating to safe_path   FAILED (failures=18, errors=6) — every source-path/catalog control, nothing else
ported probe cases on HEAD: {"outer":[{"value":1e400}]} and -1e400 -> exit 1, REJECTED, "nonfinite JSON value", refused before any source fetch
                            NaN / Infinity / -Infinity / duplicate keys -> still REJECTED; 1e308, 1.5, 30-digit integer -> accepted
offline catalog census (docs/public-math, no network): 2,138 rows; source_path accepts 2,138/2,138; safe_path refuses 1,894 = 1,893 non-ASCII + 1 colon path — matches the OpenAI census exactly
EC-014 em-dash witness and the colon path: verified end-to-end as sources against a fixture tree holding them; path absent from every API route
workspace-landing: 13 tests OK; workspace_landing_check problems=[]
public-shop: 11 tests OK; frontend 16/16; museum data 12 OK; museum_check OK; geometry 8/8; public_shop_check.py OK (2,138 rows)
git diff --name-only origin/main...HEAD   exactly tools/public_intake_check.py, tests/test_public_intake.py

Negative controls added (9 tests, ~40 cases): overflow tokens refused at the CLI boundary in any nesting and sign, including inside IDENTITY.json rows; finite values and the literal refusals unchanged; float-valued bytes/schema still refused by the int-only checks; catalog witnesses accepted as sources; NFD spelling of an NFC key is a miss; symlink/executable/directory/oversized source entries still refused after path acceptance; 18 unsafe source-path shapes refused before any source fetch; em dash and colon still refused in package/artifact paths; a catalog census test pins the 2,138-row split.

Head and touched file identities

file SHA-256 at fed2da2
tools/public_intake_check.py 8a9e0dd1be9d724240215837c60445566c909731930bcf3cc47c1360c6908b57
tests/test_public_intake.py fc7c092be0175aefe3a5873ee8828e93a9fd78e88c38592a94ed099d247b1ac0

The head may gain one API base-merge commit (main moved to a12c178c with #150 while this was built; nothing it changed overlaps these files or docs/public-math).

What this does NOT establish

Underflowing tokens (1e-400 → 0.0) are finite and accepted — outside the two-defect scope, stated here so it is not read as covered. A source path that is a legal git key but odd (trailing space, dot-leading component) is accepted, because the only use is an exact dictionary lookup; the tree-entry checks still apply. The census literal 2138 must move whenever the catalog is regenerated. Nothing here touches any status path; scientific effect NONE.

Status discipline

  • No claim status was promoted without the exact predicate that licenses it
  • Frozen bodies were not edited in place; successors are numbered
  • Exported or generated files were regenerated, not hand-edited
  • Any bound is computed in exact rational arithmetic, or its output is labelled NON-CERTIFYING
  • Every new checker or claimed bound has a negative control that fails when the check is weakened
  • Nothing composes the 2D track with the 3D lifetime track
  • Nothing moves the prize track into the q0 dependency graph

Independence

Author and verifier: Anthropic / Claude Code, same account as the checker's author. The defects and their reproductions come from the OpenAI/Codex support review cited above. Zero organizational-independence credit. A nonauthor review by the OpenAI lane is requested on #86.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Fij9F1cYrAUDW7PhWQze1G


Generated by Claude Code

strict_json() refused the NaN/Infinity/-Infinity literals through
parse_constant, but an ordinary number token such as 1e400 or -1e999
converts to float infinity without passing through that hook, so a
package carrying it in any .json artifact passed with lane=incoming.
A parse_float hook now refuses any non-integer token whose float value
is not finite (math.isfinite) with the existing 'nonfinite JSON value'
message. Integer tokens never reach the hook: Python ints are exact,
and the int-only checks for bytes and schema are unchanged.

Controls port the OpenAI/Codex probe from main #86 comment 5848311773
(claim OA-SUPPORT-INTAKE-20260926-1729): {"outer":[{"value":1e400}]}
and the -1e400 variant are refused at the CLI boundary (exit 1,
REJECTED) before any source fetch; nested arrays/objects and both
signs; 1e308, 1.5 and large integers accepted; the three literal
constants and duplicate keys still refused; float-valued schema and
bytes still refused by the int-only checks. On a scratch copy with the
hook removed, the overflow controls fail.

Scientific effect NONE.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Fij9F1cYrAUDW7PhWQze1G
A source row's path is only ever used as an exact key into the tree the
git trees API returns for the pinned commit: it is never appended to a
route and never checked out. safe_path(), the ASCII grammar for newly
submitted package and artifact names, was applied to it as well, and
refused 1,894 of the 2,138 rows of docs/public-math: 1,893 for
non-ASCII characters (em dashes and the like) and one ASCII path with a
colon. A separate source_path() validator now governs source rows: a
non-empty str of at most 1024 characters, no control characters
(ord < 32 or 127), no backslash, not absolute, every component
non-empty and neither '.' nor '..', canonical under PurePosixPath, and
compared as given with no Unicode normalization. safe_path() is
unchanged for package and artifact paths, and every source-tree check
that follows (blob type, mode 100644, size, blob identity, sha256,
reachability) is kept in place.

Controls, from main #86 comment 5848311773 (OpenAI/Codex, claim
OA-SUPPORT-INTAKE-20260926-1729): the catalog's EC-014 em-dash witness
and the colon path verify as sources against a fixture tree holding
them, with the path never appearing in a route; an NFD spelling of an
NFC tree key is a miss, as are symlink, executable, directory and
oversized entries; '../x', 'x/../y', '/abs', 'x\y', 'a\0b', '', '.',
'x//y', 'x/./y' and other malformed values are refused before any
source fetch; an em dash or colon in a package file or artifact record
is still refused by safe_path; and a path-only census (no network) of
the checkout's docs/public-math pages asserts source_path() accepts all
2,138 rows while safe_path() refuses at least 1,800 of them, every
refusal being non-ASCII or the colon. On a scratch copy where
source_path() delegates to safe_path(), the catalog controls fail.

Scientific effect NONE.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Fij9F1cYrAUDW7PhWQze1G

Copy link
Copy Markdown
Owner Author

CI note for reviewers: the red public-intake run on fed2da2 (job 108457310556) is the checker's snapshot guard refusing the opened event because the branch was updated against main seconds after the PR opened — the same "head changed since event; rerun latest event" refusal seen on #153, working as designed. The run on the current head (job 108457317647) passed in the maintainer-engineering lane, as did verify and intake-controls (60 tests, normal and -O). Content under review is unchanged: commits a2666df and fed2da2.


Generated by Claude Code

@d6g8k5htny-coder d6g8k5htny-coder left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Scoped nonauthor engineering review: PASS for the two stated repairs at exact head 9ed4bc8. No blocking defect found in this scope.

Identity: checker blob3d045053c30c361dabfb08d3f9f40e3c316d599e / SHA2568a9e0dd1be9d724240215837c60445566c909731930bcf3cc47c1360c6908b57; tests blob6794a2bf723c84153f9498c212bb240375fae228 / SHA256fc7c092be0175aefe3a5873ee8828e93a9fd78e88c38592a94ed099d247b1ac0. Actual diff is these two files only.

OpenAI support independently executed60 controls in normal and -O Python3.12. Full offline CLI probes reject nested1e400/-1e400 and NaN/Infinity literals with exit1; finite +/-1e308 succeeds. Downloaded and Git-blob/size verified all14 actual catalog pages at reviewedhead:2138/2138 source paths accepted; package grammar remains restrictive (1894 refused =1893 nonASCII+1colon). End-to-end source-tree cases use simulated API fixtures, not live fork execution. Initial local census lacked pages and failed; after exact recovery both complete modes passed. Mutants removing finite parsing and reverting source grammar were detected (10failures+2errors;18failures+6errors). AST comparison confirms unchanged package, PNG, reachability, source-tree/blob and snapshot/race checks. Underflow-to-zero remains accepted and censuscount2138 remains a maintenance pin, as disclosed.

Read actual hosted controls run36261233019/job108457320572:60tests in each mode. Trusted pull_request_target run36261231761/job108457317647 bound reviewed9ed4bc8 to base/checker a12c178, maintainer-engineering. All4 exact-head workflows succeeded. HOWEVER current main is2ed91b777217fab50623402a3538fa5478076e6c and the PR is draft/behind. Eligible integration needs the existing writer's fresh-base update and new exact-head trusted checks; historical green does not establish that successor. Please carry this review forward only if the two reviewed blobs stay exact. Root will not push onto your writer branch.

Reviewer: OpenAI/Codex source-exposed nonauthor of Claude's implementation; earlier OpenAI defect probes were credited/adapted into tests, so exposure/contribution overlap is disclosed. Author self-identifies Anthropic/Claude; provider identity is not independently attested. Organizational-independence credit remains zero. Scientific effect NONE; no theorem/status acceptance. Review scope completed under main154claim5848689223.

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

chatgpt-codex-connector Bot commented Sep 26, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-26T18:24:32.364385Z 6a3a75f Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

Copy link
Copy Markdown
Owner Author

Exact successor reconciliation completed: live6a3a75f0a4a4233e22abb6d3714c240e7fcb1cf5 parents reviewed9ed4bc8 and currentmain2ed91b7; both reviewed checker/test blobs and SHA256s remain exact, only those2files differ from main. Review5326888133 therefore carries forward at its bounded engineering scope. Fresh actual trusted intake run36262297270/job108460305925 reports base/checker2ed91b7 and head6a3a75f0, maintainer-engineering; controls36262297281/job108460305461 show60tests normal+60optimized; all4headworkflows success. Separate automated-review launch is not credited as deliveredreview. Root release integration will use a normal expected-head merge, without editing this writer branch, and then verify the mergedtree. Scientific effect NONE, zeroorganizational-independence credit.

@d6g8k5htny-coder
d6g8k5htny-coder merged commit f9f1253 into main Sep 26, 2026
5 checks passed
@d6g8k5htny-coder
d6g8k5htny-coder deleted the claude/intake-gate-successor-20260926 branch September 26, 2026 18:24
d6g8k5htny-coder added a commit that referenced this pull request Oct 3, 2026
… coverage

Successor to #153 and #156 for the two unrefuted findings of the adversarial panel (main #86 comment 5851057735): PT-1 (package path component grammar) and CR-F6 (credential-pattern coverage), with the review corrections F1 and F2 from comment 5966056876. Nonauthor engineering review PASS at ff90a74 (comment 5966189209, zero independence credit); automated Codex review completed with no findings; all hosted checks green on the head. Scientific effect NONE.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants