Repository navigation
Verify the code citations in a PR's SOTA sources (W1b phase A, report-only) - #1003
Conversation
tools/sota-sources/verify_sources.py reads the PR description's SOTA sources section exactly as the required sota-sources check does, then verifies each code citation (a GitHub blob permalink with #Lx-Ly, or owner/repo@sha:path:Lx-Ly) through GitHub REST: the 12-hex SHA floor (short-sha, unpinned, hex-named branches), git/commits, contents with the raw media type, the line range, and compare against the default branch. Transient errors are "unavailable", never a failure. It writes a JSON report and a job summary; --mode report always exits 0, --mode enforce exits 1, 3 or 0. No workflow is added. tests/test_verify_sources.py runs on api.github.com responses recorded through the checker's own fetcher (tests/fixtures/verify_sources/), with a failing and a passing fixture for every rule, and pins the section finder to both workflows' own script under node. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
@codex review |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a46fce0da2
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 20eac579da
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 17e6789cc5
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 82c86da668
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
|
Codex Review: Didn't find any major issues. 🚀 Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d92893d735
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…mes, safe digests
The command center's Claude read and the co-op's GPT read (P1 B1, B2, B4;
P2 B3, C1; C2, C3), in one commit as the command center ruled:
- B1: a "(" after a match exempts nothing; the 7 tree matches it hid,
decorator calls after an escaped newline, are reviewed entries.
- B2: the local part and its left boundary take every RFC 5322 atext
character (rfc5322.txt:679-690), so a match is the whole dot-atom and
private!<listed> is a different, unlisted match. A local part needs a
letter or a digit (a code span of an @import names no mailbox).
- B3: the dead-entry check leaves the registry out.
- B4 (correction #161): native_token_ci.py publishes digests of sanitized
text only; raw_sha256 and the stdout, stderr and MCP raw digests are gone.
- C1: RFC 2606's three names exactly, with their subdomains; example.*
under other TLDs and chained labels are no longer exempt.
- C2: target is a TLD (IANA 2026101001), so it is no longer an exempt
unit type.
- The registry is re-reviewed at main 3a8a846: 78 values, including
#1003's URL-userinfo fixture; the record's counts are measured here.
Each regression fails on e0862d8 and passes here.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
…k decoder The command center's Claude read at 4e5ef13 (B3 and B4 ruled privacy P1s): - B3: the graph-id exemption covers only a repository name, the segment after one owner segment of a listed code host's URL that starts its token. - B4: personal home path, in validate.py and both copies, reads \\wsl$\, \\wsl\ and \\wsl.localhost\<distro>\home\<name>, JSON-escaped too (MicrosoftDocs/WSL@a1473a69 filesystems.md:22, :34; release-notes.md:24, :76, :145). - B1: the body guard admits tabs and line breaks (Bidi_Class B), so #1003's mirror test passes again. - B2: the link decoder's parentheses are runs that cannot overlap; 35 adversarial shapes at the bound take at most 0.25 s each. The new tests fail on 4e5ef13 (34 failures, 1 error); 13 of 13 weakened copies fail them. Co-Authored-By: Claude Opus 5.5 <[email protected]>
6a06673's comment named tools/sota-sources/verify_sources.py inside the job's script, so the OpenHands push gate's derivation (push_gate.py derive_ci_protected, names_in_text over run and script text) took the mirror as a CI-named file, and its 15 reads broke the advisory baseline test in validate-shard-2. The comment now names the mirror without a path; the record keeps the path. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…mes, safe digests
The command center's Claude read and the co-op's GPT read (P1 B1, B2, B4;
P2 B3, C1; C2, C3), in one commit as the command center ruled:
- B1: a "(" after a match exempts nothing; the 7 tree matches it hid,
decorator calls after an escaped newline, are reviewed entries.
- B2: the local part and its left boundary take every RFC 5322 atext
character (rfc5322.txt:679-690), so a match is the whole dot-atom and
private!<listed> is a different, unlisted match. A local part needs a
letter or a digit (a code span of an @import names no mailbox).
- B3: the dead-entry check leaves the registry out.
- B4 (correction #161): native_token_ci.py publishes digests of sanitized
text only; raw_sha256 and the stdout, stderr and MCP raw digests are gone.
- C1: RFC 2606's three names exactly, with their subdomains; example.*
under other TLDs and chained labels are no longer exempt.
- C2: target is a TLD (IANA 2026101001), so it is no longer an exempt
unit type.
- The registry is re-reviewed at main 3a8a846: 78 values, including
#1003's URL-userinfo fixture; the record's counts are measured here.
Each regression fails on e0862d8 and passes here.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
…k decoder The command center's Claude read at 4e5ef13 (B3 and B4 ruled privacy P1s): - B3: the graph-id exemption covers only a repository name, the segment after one owner segment of a listed code host's URL that starts its token. - B4: personal home path, in validate.py and both copies, reads \\wsl$\, \\wsl\ and \\wsl.localhost\<distro>\home\<name>, JSON-escaped too (MicrosoftDocs/WSL@a1473a69 filesystems.md:22, :34; release-notes.md:24, :76, :145). - B1: the body guard admits tabs and line breaks (Bidi_Class B), so #1003's mirror test passes again. - B2: the link decoder's parentheses are runs that cannot overlap; 35 adversarial shapes at the bound take at most 0.25 s each. The new tests fail on 4e5ef13 (34 failures, 1 error); 13 of 13 weakened copies fail them. Co-Authored-By: Claude Opus 5.5 <[email protected]>
6a06673's comment named tools/sota-sources/verify_sources.py inside the job's script, so the OpenHands push gate's derivation (push_gate.py derive_ci_protected, names_in_text over run and script text) took the mirror as a CI-named file, and its 15 reads broke the advisory baseline test in validate-shard-2. The comment now names the mirror without a path; the record keeps the path. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Scope
The W1b phase-A source checker verifies commit/path/line citations through GitHub REST and writes JSON plus Markdown. Report mode remains advisory. The final adjudicated repair also bounds report rows and repeated display strings, recording exact omissions as indeterminate. This change also preserves malformed-candidate diagnostics, bounds parsing and REST work, avoids false refusal on indeterminate API responses, excludes mutable abbreviated refs, snapshots ancestry and handles authorization configuration safely.
65cf2730068429a1c48c8c18fb24aadef8120817.d92893d7359984ac15e1ee62288978bfff40682e, one forward final-round repair of82c86da668fda5dc351d03ea524b5a360299aaf6on the CC's adjudicated fix-now cue.lane:foundation.tools/sota-sources/, verifier tests and fixtures, and their evidence bindings.verify-sources/1; CLI:--repo/--pr --mode report --report, with Markdown appended toGITHUB_STEP_SUMMARY.SOTA sources
2026-03-10: commit resolution and compare, commit objects, raw contents, exact references, rate limits, and versions. Original response bytes are retained in the source packet. OpenAPI pin:github/rest-api-description@58b1e0c00b39b9e46c24dc4a0ba6a2669c90e9c1,descriptions/api.github.com/api.github.com.json.v3.12.3, python/cpython@f6650f9:Lib/urllib/request.py:L675-L679 supplies the redirect handler/request-processor seams. python/cpython@f6650f9:Lib/http/client.py:L1311-L1314 rejects invalid header values; the checker validates before fetch and never formats that exception. The retained installed CPython 3.13.16 client has SHA256d12e0060428b8389389db2244f9e1bd7fccae1450d43f74bce91b782498c300a._PY_LONG_DEFAULT_MAX_STR_DIGITS). The unmodified pinned header is retained with SHA25684c0c7bd7ba0c2fbbfb106561e32328e478d8350afe756af6a4862c95d921a06; the parser canonicalizes zero padding and bounds tokens before conversion.too_largeenvelope takes precedence. The documented contents codes are github/rest-api-description@58b1e0c:descriptions/api.github.com/api.github.com.json:L55991-L56059 (200/404/403/302/304, no 422). Size refusal remains synthetic, not observed live. A 401 or identified rate limit stops later requests.unavailable(repository not visible to this token). The original capture is retained, SHA2562fd859cca1eaff6fce3d3c4f35ace570dc91acbb228a823beaa9ebbe6617f1c0.sha-unresolved, not a missing full commit.tc39/ecma262@5345883164f463e87f8b40aca4956157ecba8783:spec.htmlis retained for the trim and line-break semantics; the Node parity test executes both workflow scripts.Source packet for both review families:
~/.local/state/native-agent-stack/coordination/ns2604-coop/lanes/currency-work/pr1003-403-fix-20261011/attachments/, withMANIFEST.sha256andSOURCE-INDEX.json. All original captures and pins remain byte-exact inprior-packet/; its source index maps those sources. The new troubleshooting capture, complete CC micro, current Codex threads and proofs are included. The original trimmed fixture is replay input; it is not presented as an original HTTP capture.Evidence-class table
The measurements in this table and the original command block record the reviewed 82c86da repair. The final row-bound repair has separate validation below.
syntheticsynthetictests.test_verify_sources_family_findingsand retained failing-before receiptsyntheticlocal_integrationscripts/validate.py; retained final gatesnative_provensource_reviewLocal commands run at reviewed 82c86da
The final publication receipt records the actual PR-range-only gitleaks scan with full redaction and native count-only privacy checks. No full-history scan is used.
Decision record
tools/sota-sources/review-corrections.mdrecords the primary sources, budget choices, failing-before evidence, caller/adjacent-state scope and measured limits.unavailable. An unresolved abbreviated SHA is separately counted assha-unresolved. Enforce mode exits 3 for indeterminate rows and 1 for established failures; report mode exits 0.not-checkedrows; after the first rate limit no subsequent request is sent, including for a previously cached URL. Raw file cache entries retain measurements and headers rather than large content bodies.not-on-default-branch:behindand:divergedhave distinct counts. Release-tag heads and a grammar naming tags are deferred to phase B; extended SWHID verification remains deferred and its candidates receive unchecked diagnostics. No release-tag behavior is claimed.Boundaries: hosted verifier execution is unrun; actual over-100-MB server refusals, synthetic rate limits and malformed responses are fixture controls. The intermittent Linux compare 422 did not recur during public rechecks; its fixture is explicitly reconstructed from source review. The original scratch 22-mutation list is not in the repository and is not claimed as final validation. Symlinks to directories remain a documented raw-API ambiguity.
The combined micro repair retains every recognized occurrence after prose punctuation and joiners across 12 supported grammar spellings; malformed continuations retain diagnostics. Repository/package pins have a distinct unchecked reason and every row has the same span schema. Successful JSON caches retain only consumed fields. Owner/name case aliases share keys; API-established numeric repository ids/full_name also preserve keys and one tip across rename/redirect aliases. Ref/file-path case remains significant. Public .git-suffix metadata and blob rechecks returned 404, so that suffix is not silently stripped or conflated without API identity evidence.
The 70-fresh-repository synthetic budget replay yields 32 ok, 32 unavailable and six not-checked at 256 requests; this request cap binds before the 64-citation cap. The source packet retains the complete Astra micro (SHA256 7185960587ed5ee270235c3488cdae16f3f24791455aa4db6b268cc9ccd9a245), current Codex threads and pinned #1006 consumer at bd9d46f (SHA256 769cc256339d0ed7a1e065dea3348393488585a70b7a2223dc7524845fe965ed). Fresh tag-resolution bodies bind v3.12.3 and lychee-v0.24.2 to their cited full commits. No hosted verifier execution is claimed.
The current micro repair checks HTTP 100–599 at every reachable REST step and both contents envelope forms. Explicit 403 size refusal precedes generic unavailable while preserving rate-limit stop; no-response states remain unavailable. Hidden 404s require a repository visibility probe at initial resolution and later checks. Unsupported numeric Unicode-dash/comma/tilde ranges produce diagnostics; prose punctuation and joined citations retain each occurrence. Historic family-suite counts are corrected by scope: 29F/7E unadapted, 28F/8E with the retained local comparison-route adapter. The complete replay is attached. Optional additional status semantics and repository-pin grammar remain deferred.
Host evidence
No host receipt or platform status changes.
Checklist
Final adjudicated row-bound repair
MAX_ROWS permits 256 data rows plus one exact omission row across recognized occurrences, malformed candidates and candidate-free entries. Omitted work sends no requests and is indeterminate: report mode stays 0, enforce returns 3 unless an established failure already requires 1. Entry and other row display fields retain at most 1,024 characters with an ellipsis/note; verification and spans use the original input. JSON records all limits and the omitted count; Markdown exposes the bounds and keeps the omission marker out of its checked-citation tally. The grammar, HTTP classifications, compare and cache mechanisms are unchanged by this repair.
Primary mechanism: python/cpython v3.13.16 at cbc944f4bc59639a444dd971c737788ba2283a91:Lib/json/encoder.py:L280-L299 and L336-L358 iterates list rows and dictionary values. The installed mirror blob is retained whole. These are local report-budget choices; no vendor-defined row limit is claimed.
Seven permanent methods replayed on exact 82c86da give six intended assertion failures and zero errors; the exact-boundary preservation case passes. The actual 1,000-token CLI report is 6,557,147 bytes before the repair and fails a 30,000-byte ceiling with the test budgets. With production budgets, an actual 66,017-byte/11,000-candidate input produces 425,301 JSON bytes, 256 data rows plus one omission row and 10,744 exact omissions, enforce exit 3, and zero requests. The earlier 730,517,298-byte large-output value was derived row by row; its full list was never allocated and no worker OOM is claimed.
Final gates: 139 surrounding tests without skips on CPython 3.13.16; 108 verifier tests without skips on 3.12.3; FULL 70 components / 11,481 hashed files / four profiles / 239 receipts; evidence/diff checks pass. Only five repair paths change. Native registration changes three existing bindings plus the new row-limit test; all other evidence metadata is exact. PR-range-only gitleaks scans five commits with 100% redaction and no leaks.
Receipt correction: exact original/current learned-key fixtures both fail at 20eac57 on 9 != 5, one failure/zero errors. The previous statement that the original failed on an unrouted metadata request was wrong. The separate case/URL-form preservation test instead stops there on an unrouted mixed-case commit request; it is not claimed as an intended identity fail-before. Its preservation behavior remains tested.
Follow-ups
Phase B: release-tag history checks and the grammar for naming tags; extended SWHID verification.
Document, package and health verification beyond phase A's code-citation checks.
Optional HTTP 405/409/410/451 classifications and repository-pin grammar.
Distinguishing symlinks to directories from files beyond one raw contents request.
Hosted verifier acceptance and a real over-limit contents response remain unmeasured; current controls are synthetic.
CC final P3: the compare visibility clause's reachability remains a follow-up.
CC final P3: additional citation joiner variants remain a follow-up.
CC final P3: refine the remaining 64-citation wording where it does not specify recognized occurrences.
the encoder citation names the Python fallback; the C path is at L253-L256.
no test checks the omission row in the Markdown tally.
omitted rows are reported as indeterminate.
CC P3 4242461609: treat a 200 from
/reposfollowed by a 404 on contents as indeterminate for tokens with Metadata read but no Contents read. No failure reproduces with the deployedgithub.token; the private repository probe itself returns 404 and correctly reports unavailable.CC P3 4242461612: reject binary blobs before checking line ranges. No committed citation currently points at a binary blob with a line range.