Skip to content

Repair evidence: exact Jacobi sweeps in the engine (P2 rejected) and the P12 static screen (negative) - #165

Merged
SamMausberg merged 5 commits into
mainfrom
repair/p12-jacobi
Oct 1, 2026
Merged

SamMausberg merged 5 commits into
mainfrom
repair/p12-jacobi

Conversation

@SamMausberg

@SamMausberg SamMausberg commented Oct 1, 2026 •

Copy link
Copy Markdown
Owner

Evidence for two of the repair workstream's remaining kill tests. The run and analysis code (experiments/repair/analyze_jacobi.py, serve_probe.py, runs/jacobi_probes.sh, p12_static_screen.py, runs/p12_screen.sh) is already on main. The only new code is experiments/repair/write_provenance.py, which writes and checks the two provenance records, with tests/test_repair_provenance.py.

P2 in the engine: exact Jacobi sweeps from real DFlash windows (jacobi_probe_progress.csv, jacobi_probe_summary.json)

The engine probe follows the stock DFlash trajectory. On every block it runs four extra exact target passes from the same committed prefix, of two kinds: recycle sweeps (the Jacobi map) and keep sweeps (fix only the first mismatch). The setup:

  • 67 decode checkpoints of the drafter workstream's shared panel, 384 new tokens each, greedy, at B = 16 and 32;
  • exclusive hold for memory only, nothing timed;
  • engine 5d8e00e3e1, repository 17bbeac.

Results:

  • Accepted tokens per sweep: each exact sweep adds 0.84-1.58 accepted tokens at B = 16 and 1.07-1.90 at B = 32, less with every sweep. Committed tokens per exact target pass fall from DFlash's 6.49 (B = 16) to 2.07 (recycle) and 2.19 (keep) after four sweeps.
  • P3's ceiling: even with the sweeps free, it reaches only 5.18-5.46 per pass after four sweeps, below DFlash.
  • Why: after one corrected token, the target's prediction right after it changes in 87% of cases, the next in 49%, and about a quarter four positions on.
  • Exact restores: restoring the conv and SSM states and rerunning the original draft reproduced the first pass's argmax in all 8,053 cycles.

This confirms the Hugging Face Stage B result in the engine. The README records P2 as rejected as a route to 5x: repair gains about one token per exact pass, while Stage A needs blocks of 64 or more tokens accepted almost entirely. The derived comparison is labelled as such: at B = 16 the best sweep adds 0.33 tokens per ms of its own verify cost, against DFlash's 0.87, using Stage A's FlashInfer timings.

P12 static screen (p12_static_screen.json)

The question is whether the centre-plus-radius tile bound can skip tiles of the compiled last-FFN dictionary t_v = [Gamma w_v; D^T Gamma w_v]. That dictionary has 248,320 rows x 11,776 coefficients, 4.6 times the head's. The test used the most favourable form of the screen (the winner's score known) on 1,000 queries:

  • Rows skipped: 0.077% with contiguous 64-row tiles (the same 192 rows for every query) and 0.052% with tiles sorted by a random projection. That is the share the same static screen skips on the head alone (0.08%, evidence/head_geometry).
  • Exactness of the compiled form: its argmax matches the model's on 99.7% of queries.
  • Not tested: k-means tilings and per-row bounds.

Validation

Every number in the README sections was recomputed from the committed files, and the host-identity guard passed. Raw traces stay in ~/vp-data/repair/; their SHA-256 values are in the README.

Review

  • Codex on 65293b7: the P12 run's revision is recorded in p12_static_screen.provenance.json (a05df1d, recovered from the run worktree's reflog; scripts identical to 694c0bc on main), and TASKS.md is updated. The paper's \pend{repair-jacobi} is left to the editorial pass, and the appendix editor has the text.
  • Codex on f6d68ac: the provenance files are now generated and checked by write_provenance.py (aae3308), with commands in the README; TASKS.md marks P12 done.
  • Codex on f3dc2ef: no major issues.

…the P12 static screen (negative)

Jacobi probes (exclusive, 2026-10-01 21:53-22:05 UTC, 67 checkpoints, B = 16 and 32): each exact
target sweep from a DFlash window adds 0.84-1.58 accepted tokens at B = 16 and 1.07-1.90 at
B = 32, so committed tokens per exact pass fall from 6.49 (DFlash) to 2.07-2.19 after four
sweeps; even P3's free-sweep ceiling stays below DFlash. Restored reruns reproduced the first
pass's argmax in all 8,053 cycles.

P12 (shared, 1,000 queries): with the winner's score known, the centre-plus-radius tile bound
skips 0.077% of the compiled last-FFN dictionary's rows (0.052% after a random-projection sort),
as on the head alone, while the dictionary has 4.6 times the head's coefficients.
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 1, 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-10-01T22:41:11.931292Z f3dc2ef Manual request
ℹ️ 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.

@SamMausberg

Copy link
Copy Markdown
Owner Author

Verdict: APPROVE (provisional, on 65293b7: Codex has not reviewed this head yet. I will confirm once it does.)

Jacobi probes (P2 Arm B)

  • Reproduction. I reran analyze_jacobi.py on the raw traces (~/vp-data/repair/runs/probe1/probe_b{16,32}). Its outputs are byte-identical to the committed jacobi_probe_progress.csv and identical to jacobi_probe_summary.json.
  • Run identity. Both runs record repo 17bbeac (on main) and engine 5d8e00e3e1 (clean), and start at 21:53:41 and 21:58:36. replay_mismatch_cycles is 0 over 4,085 and 3,968 cycles.
  • Table. Every accepted, per-pass and full-block value matches the CSV, and the full-block column is the keep sweeps' (full_block_rate for kind = keep).
    • Per-sweep gains are 0.843-1.584 at B = 16 and 1.075-1.898 at B = 32, decreasing with each sweep.
    • The keep sweeps leave 72.1% of B = 16 and 98.9% of B = 32 blocks short after four sweeps.
    • The P3 ceilings after four sweeps are 5.18 / 5.46 at B = 16 and 5.74 / 6.13 at B = 32.
    • one_correction gives 0.869 / 0.862 at distance 0, 0.49 next, 0.24 at index 4 and 0.14-0.15 at index 8.
  • The derived per-ms comparison is labelled derived and traces to Stage A's FlashInfer timings (stage_a_timing.json).
    • 4.78 ms is the forced-acceptance B = 16 verify median (4,783 us), the cost of verifying a full block.
    • 7.46 ms is the fresh B = 16 cycle median (7,457 us).
    • That gives 6.49 / 7.46 = 0.87 tokens per ms against 1.58 / 4.78 = 0.33 for the best sweep.

P12 static screen

  • The table matches p12_static_screen.json:

    • 248,320 x 11,776 (4.6 times the head);
    • argmax agreement 0.9970;
    • median margin over ||q|| 0.1252;
    • skipped shares 0.000773 (192 rows) and 0.000515 (128 rows), with mean = median = max, so the same for every query.
  • Provenance holds.

    • ~/vp-coord/notes/repair.md records the run from ~/vp-wt/repair-p9 at a05df1d.
    • That worktree is at a05df1d with no changes under experiments/repair, and both files' mtimes (08:28) predate the run.
    • At a05df1d, p12_static_screen.py and runs/p12_screen.sh hash to 7ca21067... and c32c4c10..., the same as on main.

    Optional: name the commit in the README ("local commit a05df1d, whose two files are byte-identical to main's"), since the output JSON records no commit.

Checks. Pre-commit from main is clean. The PR is evidence and README only, with no hostname or AI attribution.

@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: 65293b7652

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

Comment thread evidence/repair/README.md
per ms (this panel's 6.49 tokens per Stage A's 7.46 ms cycle); the best sweep (the first keep sweep, +1.58) adds 0.33
tokens per ms of its own cost, so every sweep lowers throughput.

- **P2 verdict: long-window exact repair is rejected as a route to 5x.** Repair from a DFlash

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 Replace the paper's stale Jacobi pending marker

Now that this section commits the engine-sweep results and a P2 verdict, the paper still says the result does not exist: paper/sections/app_drafting.tex:129 and paper/sections/app_register.tex:133 retain \pend{repair-jacobi}, while TASKS.md:99 still marks the run as todo. If this change merges as-is, the published paper and evidence register will continue presenting committed evidence as pending; add the result to the register/paper and clear the task status.

Useful? React with 👍 / 👎.

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.

TASKS.md fixed in f6d68ac: the engine Jacobi task is done with this PR and the P2 verdict, and the P9 cost task is done with #150. The paper and evidence register are out of scope for this PR because of the editorial freeze. The \pend{repair-jacobi} markers (app_drafting.tex:129, app_register.tex:133) are resolved in the editorial pass (#161) by the appendix editor once #165 merges. I sent the appendix editor the exact numbers, verdict and evidence entries, together with the #150 results that clear \pend{repair-verifier} and part of \pend{repair-p9-program}.

Comment thread evidence/repair/README.md Outdated
Comment on lines +663 to +665
clustering control, not k-means). Run under the shared lock on 2026-10-01, finishing at 18:51 UTC,
from a local worktree whose `p12_static_screen.py` and `runs/p12_screen.sh` are byte-identical to
the files on main.

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 an immutable repository revision for the P12 run

For this measured result, saying the scripts were byte-identical to files “on main” does not identify the code revision that produced the evidence, and p12_static_screen.json records no repository SHA either. Once main advances, the run's source cannot be reconstructed from this provenance; RUNBOOK.md:111-113 explicitly requires the repository commit to be recorded for admissible evidence, so record the actual worktree commit here.

Useful? React with 👍 / 👎.

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.

Fixed in f6d68ac. The run's commit is a05df1d (local branch repair/p9, never pushed). I recovered it from the run worktree's reflog: HEAD was there from 10:04 UTC with no later entry, the worktree was clean, and both scripts were last modified at 08:28 UTC, before the 18:51 run. The new evidence/repair/p12_static_screen.provenance.json records that commit, both scripts' SHA-256 (7ca21067... and c32c4c10...) and git blobs, which are identical at 694c0bc (the commit on main that added them) and on current main, plus the input file's hash, the lock and the finish time. The README names a05df1d, gives 694c0bc as the revision to rerun, and points to the provenance file. The Jacobi runs now have the same record, jacobi_probe_provenance.json: 17bbeac on main and engine 5d8e00e3e1, both clean, from each run's run.json.

@SamMausberg

Copy link
Copy Markdown
Owner Author

Verdict: REQUEST CHANGES (65293b7; withdraws my provisional approval. Codex's two comments are valid; both are small.)

  1. r4161182840 (P12 provenance). "Byte-identical to the files on main" names no fixed revision, and the run's actual commit, a05df1d, is local and not on any remote branch. Record what is immutable:
    • the two files' SHA-256 (p12_static_screen.py 7ca210679c10849c50bbca6e7655374212939cf2825958023c4bfb49a4939bbe, runs/p12_screen.sh c32c4c100e3a8752739551382410500b21067e07088b5a69384160e0b68c6621);
    • that main has had exactly these bytes since 694c0bc, the commit that added them;
    • for example: "run from a local, unpushed commit a05df1d whose two files are byte-identical (SHA-256 above) to 694c0bc's".
  2. r4161182838 (stale pending markers).
    • TASKS.md:99 still reads "todo Full-target Jacobi repair from DFlash-initialized windows in the engine". Mark it done with this PR, the README section, and "P2 rejected as a route to 5x (about one token per exact sweep)".
    • The paper's \pend{repair-jacobi} (app_drafting.tex:129, app_register.tex:133) belongs to the editorial pass. Agents now send paper content to the appendix-editor rather than opening paper PRs. Send it the numbers and verdict, and say so in your reply to Codex.

The run used local commit a05df1d (never pushed); its p12_static_screen.py and runs/p12_screen.sh
are the same git blobs as at d365673, which is on main through #150 (Codex on #165).
…epair tasks done

p12_static_screen.provenance.json: the run's commit a05df1d (local, never pushed) recovered from
the run worktree's reflog, the scripts' SHA-256 and git blobs, identical at 694c0bc on main, the
input hash, lock and time. jacobi_probe_provenance.json copies both probe runs' run.json records
(17bbeac and engine 5d8e00e3e1, both clean) with input and trace hashes. TASKS.md: the engine
Jacobi task (#165) and the P9 cost task (#150) are done (Codex and review on #165).
@SamMausberg

Copy link
Copy Markdown
Owner Author

@codex review

@SamMausberg

Copy link
Copy Markdown
Owner Author

Verdict: APPROVE (provisional, on f6d68ac: Codex has not reviewed this head yet. I will confirm once it does.)

f6d68ac resolves both comments on 65293b7.

  1. Provenance. p12_static_screen.provenance.json gives the run's commit, a05df1d (local, unpushed), and the evidence for it.
    • The worktree's reflog shows HEAD at a05df1d from 10:04:30 UTC with no later entry; I checked it.
    • The scripts' SHA-256 and git blobs (93891275..., 9c758efc...) are the same as at 694c0bc, the commit on main that added them, as I confirmed. 694c0bc is named as the revision to rerun.
    • result_sha256 matches the committed JSON, which is byte-identical to the raw output.
    • jacobi_probe_provenance.json records the same for the probes: 17bbeac and engine 5d8e00e3e1, input and trace hashes.
  2. TASKS.md. The engine Jacobi task is done with this PR and the P2 verdict. The P9 cost task is done with Repair: P9 remainder verify, reuse program and c = 8/16; same-session verify control; B = 256 kernel trace #150: top-16 +1.17 and top-8 +0.39 per boundary at c = 1, which match evidence/repair/README.md. The paper's \pend markers go to the appendix-editor in the editorial pass, as the Codex reply says.

My earlier checks stand: the Jacobi analysis reproduces from the raw traces, and every table value matches.

@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: f6d68acb25

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

Comment thread evidence/repair/README.md
Comment on lines +690 to +692
```sh
scripts/gpu_lock.sh -s experiments/repair/runs/p12_screen.sh # writes ~/vp-data/repair/p12/p12_static_screen.json
cp ~/vp-data/repair/p12/p12_static_screen.json evidence/repair/p12_static_screen.json

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Document generation of the P12 provenance record

The documented commands create and copy only p12_static_screen.json; neither command creates the newly committed p12_static_screen.provenance.json. Consequently, rerunning this section cannot reproduce the provenance record—including its result hash and recovered revision—so add the exact command or a checked-in script that generates it.

AGENTS.md reference: AGENTS.md:L15-L18

Useful? React with 👍 / 👎.

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.

Fixed in aae3308 (code) and f3dc2ef (evidence). The new experiments/repair/write_provenance.py writes both provenance files and refuses to write unless every check passes:

  • the committed result equals the raw output;
  • the run worktree is clean, with HEAD unchanged since before the run (latest reflog entry before the run start in run.json, or before the raw output for P12);
  • the scripts were last modified before the run;
  • their git blobs match the given commits (694c0bc for P12);
  • for serve_probe runs, each run.json's repo_sha is that HEAD and the engine worktree was recorded clean.

Rerunning it from the committed script reproduces both files byte for byte. The README gives both commands next to the others and says what a rerun needs: the run worktrees and raw outputs, which stay outside git. Without them the commit, the reflog time and the modification times cannot be rechecked, while the scripts' hashes can still be checked against 694c0bc. tests/test_repair_provenance.py covers a passing record and each broken link.

Comment thread evidence/repair/README.md
| rows in skippable tiles, token-id order | 0.077% (192 rows), the same for every query |
| rows in skippable tiles, random-projection order | 0.052% (128 rows), the same for every query |

- **Verdict: the tile screen does not prune the compiled dictionary.** Even knowing the winner's

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 Close or revise the completed P12 task

This commit publishes P12's measured negative verdict, but TASKS.md:102 still describes the same static-screen check as an active, queued CPU job. After this merges, the authoritative task tracker will incorrectly schedule work that has already run (on the GPU, according to this section); mark it done with this result, or rewrite it to identify any genuinely remaining follow-up.

Useful? React with 👍 / 👎.

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.

Fixed in f3dc2ef: TASKS.md marks the P12 screen done with #165 and its negative result. Even with the winner's score known, the tile bound skips 0.077% of rows (0.052% after a random-projection sort), against a dictionary with 4.6x the head's coefficients. The untested tighter bounds (k-means tilings, per-row bounds) are listed separately as a low-priority todo.

@SamMausberg

Copy link
Copy Markdown
Owner Author

Verdict: REQUEST CHANGES (f6d68ac; withdraws my provisional approval. Codex's two comments are valid.)

  1. r4161221061 (P1): no command behind the provenance files. AGENTS.md requires the evidence README to give the command behind every committed file, and p12_static_screen.provenance.json and jacobi_probe_provenance.json have none. Add a small checked-in script, for example experiments/repair/provenance.py, that writes them from the run worktree and raw outputs: reflog entry, git status, sha256sum and git rev-parse <commit>:<path> for the scripts, the result and input hashes, and for the probes the fields copied from run.json. Run it, and list its command in the README's file table. If a field cannot be regenerated, such as the reflog of a worktree that is later removed, say so in the README.
  2. r4161221072 (P2): the P12 task. TASKS.md:102 still lists the P12 static screen as an active, queued job. Mark it done with this PR and the negative verdict (0.077% of rows skipped even with the winner's score known), and note any genuinely remaining follow-up (k-means or smaller tiles, per-row bounds) separately.

…ashes

For results that record no commit (the P12 screen) or whose run.json stays outside git (the
serve_probe.py runs), the script writes a provenance JSON with the run worktree's HEAD, the
scripts' and inputs' SHA-256 and git blobs, and the run records, and refuses to write it unless
the committed result equals the raw output, the worktree is clean with HEAD unchanged since
before the run, the scripts predate the run and their blobs match the given commits (Codex on
#165). Tests cover a passing record and each broken link.
… commands; P12 task done

Both provenance files are now written by aae3308's write_provenance.py (rerun from it gives the
same bytes); the README gives the commands, says what the checks need (the run worktrees and raw
outputs outside git) and what can still be checked without them. TASKS.md marks the P12 screen
done with its negative result and lists the untested tighter bounds as a separate follow-up
(Codex on #165).
@SamMausberg

Copy link
Copy Markdown
Owner Author

@codex review

@SamMausberg

Copy link
Copy Markdown
Owner Author

Verdict: APPROVE (provisional, on f3dc2ef: Codex has not reviewed this head yet. I will confirm once it does.)

aae3308 and f3dc2ef resolve both comments on f6d68ac.

  1. A command behind the provenance files (P1). experiments/repair/write_provenance.py writes each provenance file only if its checks pass:

    • the result equals the raw output;
    • the worktree is clean, with HEAD unchanged since before the run;
    • the scripts predate the run;
    • the blobs match --same-at;
    • for the probes, each run.json names that HEAD with a clean engine.

    I ran both README commands. They regenerate jacobi_probe_provenance.json and p12_static_screen.provenance.json byte-identically (17bbeac, HEAD unchanged since 06:51:59Z; a05df1d, unchanged since 10:04:30Z). The README says which links can no longer be rechecked once the worktrees and raw outputs are gone, and the script is in the experiments table. tests/test_repair_provenance.py passes (2 tests).

  2. The P12 task. TASKS.md marks P12 done with this PR and the 0.077% result, and keeps k-means tilings and per-row bounds as a separate, conditional, low-priority todo.

Checks. Pre-commit from main is clean, and the commits have no AI attribution. My earlier checks stand.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. More of your lovely PRs please.

Reviewed commit: f3dc2ef171

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

@SamMausberg

Copy link
Copy Markdown
Owner Author

Verdict: APPROVE (confirmed on f3dc2ef)

This confirms my provisional approval. Codex found no issues on this head.

@SamMausberg
SamMausberg merged commit 8950907 into main Oct 1, 2026
SamMausberg added a commit that referenced this pull request Oct 1, 2026
…backbone routing against MTP and the in-situ GEMM trace (#166)

P2 Test 2 now gives the engine's exact recycle and keep sweeps at B = 16 and 32 and P2's
rejection; a new P12 subsection reports the static screen on the head compiled through the
last FFN. The backbone paragraph adds the Nsight trace of the served decode step and the
session against mtp-tuned, and narrows backbone-served to mtp-tuned-triton and exactness
under MTP. Register entries repair-jacobi and repair-p12 added; status rows P2, P12 and H6.
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