Repository navigation
State safety: cache-level check for the concurrency pair (tap v4 with pinned pools) - #148
Conversation
…ols) run_tap_v4_batch.sh serves every prompt with plain decoding at concurrency 1 and 32 (at most 16 running), taps the 40 prompts of the concurrency pair, and runs mechanism.py, so the caches entering the first differing module output are compared. tap_runs.py gains --pin (pools from server.POOL_PIN, overridden by pool flags in --extra-flags, server restarted until it allocates exactly those) and records the repository commit in meta.json.
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: 0dfb6e6d43
ℹ️ 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".
| (`tap_v4_inputs/ids_c1_vs_c32.txt`) tapped. `tap_runs.py --pin` pins both servers to | ||
| the same pools (cap 16, 98,304 KV tokens, 80 GDN slots, given in `--extra-flags`) and | ||
| restarts each until it allocates exactly those sizes; `meta.json` records the pins and | ||
| the repository commit. Its summary is committed as `cachecheck_v4_plain_c1_vs_c32.json`. |
There was a problem hiding this comment.
Commit the cache-check result you document
The README claims that cachecheck_v4_plain_c1_vs_c32.json is committed, but a repository-wide filename search finds only the older mechanism_plain_c1_vs_c32.json; the new script writes its result outside Git under ~/vp-data/state/tap and never copies it into evidence/state_safety/. Consequently, the advertised cache-level result cannot be inspected or verified from this commit; either commit the generated summary with its reproduction command or stop claiming it is present.
AGENTS.md reference: AGENTS.md:L15-L18
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed in be00c17: the README now says the summary will be committed to evidence/state_safety once the hold has run and that the check is pending until then. The evidence commit will follow on this branch or in a follow-up PR after the hold.
| done | ||
|
|
||
| echo "analysis $(date +%T)" | ||
| python mechanism.py --a "$T/v4b_plain_c1" --b "$T/v4b_plain_c32" --untapped-a "$U" \ |
There was a problem hiding this comment.
Compare the tap against a reference with matching pools
When this script runs, $U is the old unpinned runs/plain/c1.jsonl, while run A is explicitly started with custom pinned 98,304-token/80-slot pools. Passing that file to --untapped-a causes pool- and radix-history-induced output differences to be reported as tap mismatches, so the resulting tap_check cannot establish that instrumentation left output unchanged. Generate or select an untapped c1 reference with the same flags and pool sizes, or omit this control.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed in be00c17: the hold first runs an untapped c1 pass on the same engine tree with the same pinned pools (run_matrix.py --extra-flags with the cap-16 pools, into ~/vp-data/state/runs_cap16), and that run is the --untapped-a reference. Same prompt order and request history as the tapped c1 session (both serve all 320 prompts at concurrency 1 on a fresh server).
|
Verdict: REQUEST CHANGES (0dfb6e6, 2 blocking: Codex's two comments, both valid) Checked.
Blocking
Suggestion (self-review, pinning). The script relies on |
… pending wording Review of #148 (Codex and the reviewer): the tap-neutrality reference is now an untapped c1 pass on the same engine with the same pinned pools, not the unpinned matrix run; the hold refuses to start unless ~/sglang-wt/state is a clean checkout of 9341fb82 and the repository checkout is clean; and the README says the summary will be committed after the hold, not that it is.
|
@codex review |
|
Verdict: APPROVE (provisional, on be00c17: Codex is still running on this head, and pre-commit is queued in the CPU window. I will confirm or withdraw once both finish.) be00c17 resolves both blocking items and takes my suggestion.
|
|
Codex Review: Didn't find any major issues. Delightful! 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". |
Code for the last cache-level check the paper lists as pending (Appendix G, D11
state-mech): for the concurrency pair (plain decoding at concurrency 1 against 32, at most 16 running), do the caches entering the first differing module output agree? The tap v4 run answered this for plain decoding against MTP; for the concurrency pairmechanism_plain_c1_vs_c32.jsonnames first differing module outputs only.What it runs
experiments/state_safety/run_tap_v4_batch.sh, in one exclusive hold from a clean checkout:--load-all, as in the matrix passes) and tapping the 40 prompts ofmechanism_plain_c1_vs_c32.json(tap_v4_inputs/ids_c1_vs_c32.txt, the same list the v3 c32 session tapped);GPU_STARTUP_MIN_FREE_GB=70;run_matrix.py --extra-flags <the cap-16 pools>, into~/vp-data/state/runs_cap16), the reference for the tap-neutrality check;mechanism.pywith the cache comparison, written to~/vp-data/state/tap/cachecheck_v4_plain_c1_vs_c32.json. It will be committed asevidence/state_safety/cachecheck_v4_plain_c1_vs_c32.jsonafter the hold, and the check stays pending until then.The script refuses to start unless
~/sglang-wt/stateis a clean checkout of9341fb82(the tap tree) and the repository checkout is clean.tap_runs.pygains--pin, which usesserver.POOL_PIN, lets pool flags in--extra-flagsoverride it, and restarts the server until the allocated pools match, asrun_matrix.pydoes. Itsmeta.jsonnow also recordsrepo_shaandrepo_dirty, so the evidence names the commit that produced it. Existing calls without--pinbehave as before.Status
~/sglang-wt/stateat9341fb82(the tap patch), the same tree as tap v4.maindecided. It runs this branch's checkout at its pushed head, currentlybe00c17. The evidence will come in a follow-up commit or PR, with the README section.hold_lint.shon the script: no findings. pre-commit (ruff, mypy, shellcheck, codespell) passes.state_tap._spans,_cache_hashes), and the v3 tap ran at concurrency 32, but this combination has not run before.Review
cachecheck_v4_...jsondescribed as committed): fixed inbe00c17. The README says it lands after the hold.be00c17. A pool-matched untapped c1 pass on the same engine now runs first in the hold and is the reference.be00c17).