Skip to content

Address Codex review items on contract witnesses, head constants, source manifest and README - #41

Merged
SamMausberg merged 4 commits into
mainfrom
paper/codex-followups
Sep 30, 2026
Merged

SamMausberg merged 4 commits into
mainfrom
paper/codex-followups

Conversation

@SamMausberg

@SamMausberg SamMausberg commented Sep 30, 2026 •

Copy link
Copy Markdown
Owner

Four Codex review comments on merged PRs concern files outside paper/. This PR fixes them. The paper-text items from the same reviews (#21's quantile caption, #32's τ definition and the missing GSM8K series) will go into the editorial revision, which rewrites the text around them.

Contract witnesses (#26).

  • Key norm. test_regrouped_gdn_recurrence_changes_outputs normalized its keys with np.sum, whose reduction order depends on the NumPy build. The squares are now summed in an explicit float64 loop (sequential_norm), like every other reduction in the file.
  • Regenerated evidence. The counts are unchanged: 1,481 of 1,600 FP32 outputs differ, and 2 after BF16 rounding.
  • Fifth contract. The suite claimed five contracts but witnessed four. A new test, test_equal_quality_different_outputs, gives two greedy decoders with equal accuracy (1/2 each) on four problems whose answers differ on all four. Equal task scores therefore imply none of the stronger contracts.
  • Rerun. evidence/contracts/ was regenerated with the documented command: 7 methods, all passing. Its README lists the new witness.

Head-constant quantiles (#21).

  • What was wrong. summary() sliced a random permutation to 1,000,000 elements. For the 248,320-row head that selects every row once, but the scope string and the README called it a one-million-row sample.
  • Fix. The function now takes quantiles over all rows directly, and the scope and README say so.
  • Regenerated evidence. Every value in head_constants.json is identical. Only repo_commit, seconds and scope change.
  • Private path. The script's docstring cited a private notes path. It now points to the crossover theorem in paper/sections/transport.tex.

Source manifest (#30). paper/references.bib has 223 entries and sources/source_manifest.json had 194. The 29 entries added with paper milestone 2 now have records in the manifest's schema: the workload datasets, the repair prior art and the P6 prior art. Each record takes its text from the BibTeX entry and says that it mirrors that entry. None claims a fresh verification. source_count is 223.

README (#21). PR #39 already fixed this on main (the setup block installs requirements-dev.txt), so the duplicate commit was dropped in the rebase.

Rebase. The branch is rebased on main after #39. The evidence/precision/README.md conflict was resolved to "quantiles over all 248,320 rows", because the script no longer has a sampling cap. The 29 manifest records apply cleanly on top of #39's URL pins, giving 223 records for 223 bibliography entries.

Validation.

  • python -m pytest tests/test_contracts.py: 7 passed.
  • head_constants.py was rerun on CPU in the SGLang venv, and its JSON diff was checked field by field.
  • Pre-commit passes on every changed file.
  • No GPU was used.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 30, 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-30T21:19:49.190248Z 74ff454 PR opened
ℹ️ 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.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 74ff454c4a

ℹ️ 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".

"seconds": 0.033,
"repo_commit": "29c85d7fafbc8eae0a10b39851731e293ba6cbf0",
"seconds": 0.036,
"repo_commit": "25278b6cb149799596118f6b818c0dc81b693a24",

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Record the commit containing the generator changes

Checking out the recorded 25278b6 SHA and running the documented command cannot reproduce this artifact: that commit still has six contract tests, uses the old np.sum normalization, and lacks the new quality witness. The same incorrect SHA is recorded in head_constants.json, even though 25278b6 still contains the old subsampling implementation. Record commits that contain the respective generator changes (or explicitly capture a dirty-tree source hash) so the evidence remains tied to the source that produced it.

AGENTS.md reference: AGENTS.md:L24-L27

Useful? React with 👍 / 👎.

…tract

The regrouped-recurrence witness normalized its keys with np.sum, whose
reduction order depends on the NumPy build; it now sums the squares in an
explicit float64 loop, as every other reduction in the file does. The counts
it reports are unchanged (1,481 of 1,600 FP32 outputs, 2 after BF16).

The suite claimed to separate five contracts but witnessed four. A new test
gives two greedy decoders with equal accuracy on four problems whose answers
differ on every problem, so empirical quality equivalence implies none of the
stronger contracts. Evidence regenerated with the documented command.
summary() sliced a random permutation to 1,000,000 elements, which for the
248,320-row head is every row once; the scope string and README called it a
one-million-row sample. Quantiles are now taken over all rows directly and the
scope says so. Regenerated: every value is identical; only repo_commit,
seconds and scope change. The docstring no longer points at a private notes
file.
…e manifest

paper/references.bib has 223 entries and the manifest had 194, so the
workload, repair and P6 sources added with paper milestone 2 (PR #30) could
not be audited through it. Each new record follows the manifest's schema,
takes its text from the BibTeX entry and says it mirrors that entry;
source_count is 223.
@SamMausberg

Copy link
Copy Markdown
Owner Author

Verdict: REQUEST CHANGES

Reviewed head 64fc8ce, rebased on main after #39 (0 behind). The substance is right and both evidence files reproduce. One item blocks: Codex's P2 on this PR, which I agree with.

Blocking

B1. Both regenerated evidence files record a commit that does not contain the code that produced them (evidence/contracts/contract_witnesses.json, evidence/precision/head_constants.json; Codex P2).

  • What is wrong. Both record repo_commit 25278b6. That commit has the old test_contracts.py (six methods, np.sum normalization, no quality witness) and the old head_constants.py (the randperm(...)[:1_000_000] subsample). Checking it out and running the documented commands does not produce these files. evidence/precision/README.md now points readers to "the commit recorded in the JSON".
  • What I found on this head. Rerunning both commands gives identical values: python tests/test_contracts.py, and head_constants.py --output on CPU with CUDA_VISIBLE_DEVICES="". Only repo_commit and seconds change. So this is provenance only, the same problem as Round underflowing leaves in the precision reference instead of raising #43's B2.
  • Fix. After the code commits, regenerate both files (and contract_witnesses.log) in a separate commit, so repo_commit names a commit that contains the generators. Then check that the two READMEs describe that commit.

Checked and correct

  • Manifest (Paper milestone 2: workstream methods, head-geometry results and the five contracts #30's Codex item).
    • sources/source_manifest.json now has 223 records with source_count 223. Its keys equal the 223 @ keys in paper/references.bib exactly: none missing, none extra, no duplicates.
    • The 29 new records carry the bib entries' URLs and identifiers (spot-checked sjd2025, so2026scd, deltacnn2022, cacheblend2025, dblast).
    • Address Codex review comments on the bundle checksums, manifest and README #39's pinned model-card URLs are kept.
  • test_contracts.py (Exact witnesses that separate the exactness contracts (P7) #26's Codex items).
    • The key norm is now an explicit left-to-right float64 sum, so it no longer depends on NumPy's pairwise reduction.
    • The new test_equal_quality_different_outputs separates empirical quality equivalence (equal accuracy, 1/2 each, with 2 + 2 discordant pairs and different answers on all four problems) from the stronger contracts. With it, the suite witnesses all five contracts, as the README says.
    • The GDN witness counts are unchanged: 1,481 of 1,600 outputs differ in FP32 and 2 after BF16.
    • 7 tests pass.
  • head_constants.py (Reorganize the paper around the evidence and the stock-kernel contract #21's Codex item). Quantiles are now over every row, and the scope string and README say so. The values are identical to the previous run, as expected: the old subsample was a permutation of all 248,320 rows.
  • The ~/vp-coord citation. It is removed from the precision README, which now points to the crossover theorem in paper/sections/transport.tex.
  • Hooks and attribution. Pre-commit passes on the changed code and READMEs, and there are no AI co-author lines.

The paper-text items (the transport.tex:119 caption, the τ definition, the GSM8K series) stay with the editorial revision, as you said. I will check them there.

…at holds their code

Both files recorded 25278b6, which still has the six-test contract suite and
the subsampling quantile code, so that checkout could not reproduce them. They
are rerun at 64fc8ce with the documented commands; every value is unchanged
and only repo_commit and the run times differ.
@SamMausberg

Copy link
Copy Markdown
Owner Author

Verdict: APPROVE

This re-review covers head 7baa597. B1 and Codex's P2 are fixed.

  • The recorded commit. contract_witnesses.json, contract_witnesses.log and head_constants.json now record repo_commit 64fc8ce, an ancestor of this head. That commit contains the generators:
    • test_contracts.py with sequential_norm and test_equal_quality_different_outputs;
    • head_constants.py taking torch.quantile over every row. The remaining randperm at line 109 builds the random tiles, not a subsample.
  • The diff. It changes only repo_commit and the run times. That matches my own reruns, which reproduced every value.
  • The READMEs. Both refer to "the commit recorded in the JSON (repo_commit)", so they now point at the right source.

Everything verified in my first review still holds: the manifest matches the 223 bib keys, all five contracts are witnessed, the GDN counts are unchanged, 7 tests pass and the hooks are clean.

@SamMausberg
SamMausberg merged commit a4c6d80 into main Sep 30, 2026
SamMausberg added a commit that referenced this pull request Sep 30, 2026
…nel contract

The paper now argues in dependency order: setting and what the stock engine
computes, the five contracts and the R-stock gap and interval theorems, the
certified low-precision head with its measured candidate sets and fallback
shares, sampled decisions, transport and its measured failure, exactness under
speculation, the stack, drafting and repair hypotheses, the serving protocol,
related work, and a discussion that merges the hypothesis and failure tables.
Secondary derivations, untested mechanisms, engine notes, CPU evidence,
reproduction and attribution move to appendices. Evidence paths, pull request
numbers and pending work move to an evidence register and a development record
(Appendix A); the text cites [En] for committed evidence and [pending Dn] for
designed work, with the scientific status in the prose.

Integrates merged evidence: H2 on DFlash-4B (#35) and MTP-4B (#47), the
overlapped roofline (#44), the frontend diagnosis (#46), the fifth contract
witness (#41) and the precision counts after #43. Folds in the Codex items on
#21 (quantiles over all rows), #32 (pooled tau, GSM8K series) and #36.

Typography: Charter text, a plain title block with the repository URL,
greyscale-safe figures, a new mechanism figure (Figure 1) replacing three
overlapping flowcharts, a drift figure and transport table, two-panel
candidate and acceptance figures, and tables reorganized instead of shrunk.
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.

1 participant