Skip to content

Moonshot P4b: explain the 127-request plateau; amend to a running limit of 129 - #123

Merged
SamMausberg merged 10 commits into
mainfrom
moonshot/p4-admission-cap
Oct 1, 2026
Merged

SamMausberg merged 10 commits into
mainfrom
moonshot/p4-admission-cap

Conversation

@SamMausberg

@SamMausberg SamMausberg commented Oct 1, 2026 •

Copy link
Copy Markdown
Owner

P4b's served A/B has failed admission three times: every wave in both arms stopped at 127 running requests with one queued, first with 360,448 KV tokens, then with 655,360, then with 132 mamba slots. The third attempt (admission preflight 20261001T115146Z) had KV usage 0.40 and 5 free mamba slots, so neither pool was the limit. This PR records the actual cause, checks it against every wave of the three attempts, and amends the pre-registration before any rerun.

Cause (engine code at bd66ce343e, checked against the logs)

A prefill pass stops taking requests once len(adder.can_run_list) >= get_num_allocatable_reqs(running_bs) (managers/scheduler.py:3971), and that limit is min(max_running_requests - running_bs, req_to_token_pool.available_size()) (scheduler.py:3784-3802). A chunked request whose tail runs in the pass is in can_run_list (schedule_policy.py:1166) and still holds the req_to_token row it took with its first chunk (chunk_cache.py:82-87, memory_pool.py:317-327), but running_bs excludes it (scheduler.py:3660-3663). It is counted twice, so a pass that carries a chunk tail stops at max_running_requests - 1 and sets batch_is_full, which stays set until a running request finishes (scheduler.py:4193-4197, 4268-4269).

P4b's waves are synchronised (one wave of 128 per AIPerf phase, ignore_eos, 512 output tokens), and its 2,046-2,048-token prompts in 8,192-token passes leave a chunk tail in the last pass of every wave. All 56 wave plateaus in the 12 server logs of the three attempts show the tail (C = 1) and stop at 127 with one request queued, as the derivation predicts (evidence/moonshot/p4_admission_plateaus.csv). Because every wave had C = 1, these logs test the prediction only at C = 1; the amended preflight is the discriminating test. The 128th request then decodes alone after the wave: 1.8 s and 2.1 s of 11.1 s and 11.4 s profiling phases in the third attempt.

Changes

  • experiments/moonshot/admission_plateaus.py (new, with tests/test_moonshot_admission_plateaus.py): finds each wave's plateau in a scheduler log, infers whether the last pass carried a chunk tail, and compares the plateau with max_running_requests - C. The inference assumes nothing finished between the two passes, which holds for P4b's single-wave phases. The script prints one count line per log and exits 1 if a log has fewer than --min-plateaus plateaus, if any continuation is not inferable (outside that scope), or if any plateau differs from the prediction. The evidence command requires 4 per log; every log has 4 or 5.
  • evidence/moonshot/README.md 2c: the third void attempt, the cause with line references, and a dated running-limit amendment: --max-running-requests 129 at concurrency 128, KV (655,360) and mamba (132) pins unchanged. Predicted outcome: 128 running in both arms and no single-request tail. The README also says which earlier explanations this replaces (KV budget, mamba slots), and why disabling chunked prefill or running at concurrency 127 was rejected.
  • levers.py (p4_pools), validate_p4_ab.py (pinned constant 129; its docstring names the 655,360-token KV pin) and its test, and the run_p4b.sh header. check_admission.py is unchanged: it already requires 128 running in the measured phase of both arms.
  • experiments/moonshot/README.md: the script index gains the row for admission_plateaus.py. Main, with Script indexes for experiments/profiling, moonshot and repair; fix two stale README statements #126, is merged in.
  • evidence/moonshot/README.md section 4 (coordinator's request): commands, commits and run times for the eight evidence files that had none. They come from two exclusive-lock jobs; the committed JSONs are byte-identical copies of their raw outputs, and both CSVs regenerate byte for byte with summarise.py on main. The citation of run_p4_timed.sh, which is not in git, is replaced by a description of that job. Two engine statements are corrected: the setup line named patches 0001-0007 for every result, and 2c said the aborted one-batch A/B ran on 0001-0009, when it ran on 0001-0008 (1101be8c5f).

Review

  • Codex P2 (the plateau script could exit 0 with no plateau checked): fixed in 591d060, as described above; replied inline.
  • Reviewer: the three blocking items (Codex P2, the stale 360,448 in the validator docstring, the test name) are fixed at 9c1c3aa. On the suggestion that the new decode-graph entry might be 136: get_cuda_graph_max_batch_size aligns to get_cuda_graph_batch_size_alignment(), which is 1 here (no two-batch overlap, no gathered buffer, tensor parallelism 1; utils/common.py:4059-4071), so the entry is 129.

Validation

  • admission_plateaus.py --min-plateaus 4 over the three attempts: 12 logs, 56 plateaus, all as predicted. The README gives the command; the regenerated CSV is byte-identical to the first one.
  • pytest tests/test_moonshot_admission_plateaus.py tests/test_moonshot_validate_p4_ab.py tests/test_moonshot_levers.py: 36 passed, 3 skipped (GPU tests).
  • Pre-commit hooks pass on every changed file.
  • Not yet tested: the amended configuration on the GPU. The admission preflight (run_p4_admission.sh at fc76655, queued in the normal lane) is the test. The full P4b job is queued only if it shows 128 running in both arms.

At the pinned engine a prefill pass that carries a chunked request's tail
stops admitting one request early: that request is in can_run_list and
already holds its req_to_token row, while running_bs leaves it out, so it
is counted twice. batch_is_full then stays set until a request finishes,
so every synchronised P4b wave stopped at 127 running with one queued.

admission_plateaus.py checks this against each wave's plateau in the
scheduler log. The p4_pools lever now pins --max-running-requests 129 at
concurrency 128 (KV and mamba pins unchanged), and the validator's pinned
constant follows.
The third P4b attempt (admission preflight 20261001T115146Z) plateaued at
127 running with 132 mamba slots and KV usage 0.40, so neither pool was the
limit. The cause is a double count of a chunked request's tail in
SGLang's admission check; all 56 wave plateaus of the three attempts match
it (p4_admission_plateaus.csv, from admission_plateaus.py at f84ef6c).

The amendment, declared before any rerun, sets --max-running-requests 129
at concurrency 128 and keeps the other pins; the preflight runs alone
first and must show 128 running in both arms.
@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-01T15:15:32.570487Z 9331c15 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.

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

ℹ️ 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 on lines +123 to +124
inferable = [row for row in rows if row['continuation'] != '']
mismatched = [row for row in inferable if row['plateau_observed'] != row['plateau_predicted']]

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 Fail when expected plateaus are absent

When a supplied server log contains no matching queued decode plateau, or every plateau has a non-inferable continuation, it contributes no inferable row; the script can consequently print 0 of 0 as predicted, write an empty or incomplete CSV, and exit successfully. This also lets one unparseable server log disappear while other logs provide rows, so the evidence command does not actually guarantee its claim that every wave was checked. Require at least the expected plateau count per log, and reject non-inferable rows for these synchronized P4b runs, before reporting success.

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 591d060. The script now prints one count line per server log and exits 1 if any log has fewer than --min-plateaus plateaus (default 1), if any plateau's continuation is not inferable (outside the synchronised-wave scope), or if any plateau differs from the prediction. The evidence command passes --min-plateaus 4; every one of the 12 logs has 4 or 5 plateaus, and the regenerated CSV is byte-identical. Command-line tests in tests/test_moonshot_admission_plateaus.py cover a log without plateaus, a count below the minimum, and an out-of-scope plateau.

@SamMausberg

Copy link
Copy Markdown
Owner Author

Verdict: REQUEST CHANGES

Review of the exact head fc76655 ("Record the 127-plateau cause and amend P4b to a running limit of 129").

The diagnosis is careful and, as far as I can check it, right. The amendment is dated before any further run. What blocks is an unanswered Codex comment and two small consistency fixes.

What I verified

  • The cited engine lines at bd66ce343e say what the README says.

    • get_num_allocatable_reqs returns min(pp_max_micro_batch_size - running_bs, available). pp_max_micro_batch_size is max_running_requests // pp_size (scheduler.py:1197), and available is the req_to_token pool's free rows.
    • add_chunked_req appends the tail to can_run_list (schedule_policy.py:1166).
    • ChunkCache.cache_unfinished_req frees nothing, and ReqToTokenPool.alloc reuses held rows.
    • batch_is_full is set at scheduler.py:3976 and cleared only at 4197, 4269 and 3703. The comment at 3865-3867 assumes the row was released.
    • HybridReqToTokenPool is sized max_num_reqs exactly (kv_cache_configurator.py:1139-1140), and with the radix cache off the mamba ratio is 1 (2257-2259).

    So with M = 128 and a chunk tail the pass stops at M - 1, and at M = 129 the prediction is 128.

  • The CSV has 56 rows from all 12 logs. That is 8 A/B arms × 5 waves plus 4 preflight logs × 4. Every row has continuation = 1, observed = predicted = 127 and one request queued.

  • The changes are consistent. p4_pools, validate_p4_ab.POOLS and its test move to 129, and check_admission.py still requires 128 running in the measured phase.

  • Merge. A trial merge onto current main is clean: git carries the edit of tests/test_validate_p4_ab.py onto Name the three moonshot P4 tests after their workstream #122's tests/test_moonshot_validate_p4_ab.py.

  • Checks. Both commits are by Samuel Mausberg, with no AI lines. The hostname check is clean over the diff and the PR text.

  • pytest not re-run. I did not re-run pytest, because the CPU is kept quiet during bench's hold. I'll run the three test files on one core afterwards.

Blocking

  1. Codex P2 (r4156607665) is valid and has no reply. admission_plateaus.py exits 0 when a log yields no plateau, or only non-inferable ones. So the committed command does not by itself guarantee "every wave of the three attempts". The data happen to cover all 12 logs, but the generator should enforce that. For example, fail when a log contributes no inferable plateau, or fewer than its expected waves, and print per-log counts. Either fix it or answer with a scope.
  2. The validate_p4_ab.py docstring. The line this PR edits still says "a KV pool (max_total_num_tokens; 360,448 requested)". The pin has been 655,360 since the second amendment.
  3. Test name. Rename tests/test_admission_plateaus.py to tests/test_moonshot_admission_plateaus.py, the convention Name the three moonshot P4 tests after their workstream #122 set (you said you would).

Suggestions (non-blocking)

  • Discriminating power. Every one of the 56 waves had C = 1, so the logs agree with the derivation but cannot separate it from another cause that also stops at M - 1. The code reading carries the argument, and the amended preflight (predicted 128 in both arms) is the discriminating test. One sentence saying so in 2c would make the evidential status exact.
  • The new graph entry. base_cuda_graph_runner.py:73-93 pads the pool size with ceil_align(num_max_requests, alignment) before adding it to the capture list, so the new entry may be 136 rather than 129, depending on the alignment. Either way a batch of 128 replays the 128 graph. The preflight's start-up log will show the list.
  • Merge order with Script indexes for experiments/profiling, moonshot and repair; fix two stale README statements #126. Script indexes for experiments/profiling, moonshot and repair; fix two stale README statements #126 adds experiments/moonshot/README.md. Whichever of the two merges second should add a row for admission_plateaus.py.

SamMausberg added a commit that referenced this pull request Oct 1, 2026
…eded-rank items

Bounded-range sampling is the paper's Proposition "Bounded logit error"
(app_sampling.tex), so the theory item is done (PR #21, #49, #53; Codex and
the integrator's review). New active items from the integrator: round the
Hopper accumulation constant up to cover its derived value and rerun what used
it, and state that seeded top-k/top-p at the pin keys noise by sorted rank. M1
and P4 record #123's explanation of the 127-request plateau as the status of
an open PR.
admission_plateaus.py exited 0 when a log yielded no plateau or only
non-inferable ones, so an unparsed log could vanish from the evidence.
It now prints one count line per server log and exits 1 if a log has
fewer than --min-plateaus plateaus (default 1), any plateau's
continuation is not inferable, or any plateau differs from the
prediction (Codex review of #123).

Also: the test is renamed to the tests/test_moonshot_* convention and
covers the command line; validate_p4_ab.py's docstring names the
655,360-token KV pin; the script index lists admission_plateaus.py.
Section 4 now records, for the eight files that had no command, the two
exclusive-lock jobs that produced them: their commands, repository and
engine commits, run times, and how each committed file relates to its
raw output (six byte-identical JSON copies, two CSVs that regenerate
byte for byte with summarise.py on main). The run_p4_timed.sh citation,
a script outside git, is replaced by a description of that job.

Corrections: the setup line named patches 0001-0007 for everything, and
2c said the aborted one-batch P4 A/B ran on 0001-0009; it ran on
0001-0008 (engine 1101be8c5f). 2c also notes that all 56 plateaus had a
chunk tail, so the amended preflight is the discriminating test, and the
plateau command now requires four plateaus per log.
@SamMausberg

Copy link
Copy Markdown
Owner Author

@codex review

@SamMausberg

Copy link
Copy Markdown
Owner Author

Verdict: APPROVE (provisional, on 9c1c3aa: Codex is still running on this head. I will confirm or withdraw once it finishes.)

Re-review of the PR's own commits on top of the main merge 076ebb1: 591d060 and 9c1c3aa.

My three blocking items are fixed.

  1. Codex P2 (r4156607665), fixed in 591d060 and answered inline. admission_plateaus.py now prints one count line per server log. It exits 1 when a log has fewer than --min-plateaus plateaus, when a continuation is not inferable, or when a plateau differs from the prediction. I reran the README command on one core (--min-plateaus 4 over the three runs): 12 of 12 logs ok, 56 plateaus, exit 0, and the CSV is byte-identical to the committed p4_admission_plateaus.csv.
  2. Docstring. validate_p4_ab.py now says "655,360 requested".
  3. Test name. The test is now tests/test_moonshot_admission_plateaus.py, with a row in experiments/moonshot/README.md. That row and Script indexes for experiments/profiling, moonshot and repair; fix two stale README statements #126's index row for admission_plateaus.py are both present.

Tests. The three P4 test files pass on one core (37 passed).

The new section 4 provenance holds.

  • Commits 167bf99 and 751a59a are on main, and engines 1101be8c5f and d3a1d447cd exist. The four generators exist at 167bf99.
  • The six committed JSONs from job B are byte-identical (SHA-256) to the raw files they name under ~/vp-data/moonshot/.
  • host_levers.csv and decode_ceiling_try1.csv regenerate byte for byte with summarise.py at this head.
  • The engine corrections (0001-0008 at 1101be8c5f, per-file patch sets) are consistent with section 4.

Suggestions taken. 2c now says all 56 plateaus had C = 1, so the amended preflight is the discriminating test. The capture entry is 129, because the alignment is 1.

Checks. Pre-commit passes on the changed files. The commits are by Samuel Mausberg, with no AI lines. The hostname check is clean over the diff and the PR text. The PR body is #123's own, not hostgap's.

The citation of 591d060 for the CSV generator becomes a main commit once this merges with a merge commit.

@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: 9c1c3aaf25

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

rows: list[dict[str, int | str]] = []
failed: list[str] = []
for run in args.runs:
logs = sorted(run.glob('*/*/server/server.log'))

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 Require every expected server log

If one arm's server.log is absent, this glob simply omits it, while the remaining logs can each satisfy --min-plateaus 4; the command can therefore exit successfully and overwrite the CSV without all 12 logs that the README says were checked. The fresh evidence after the earlier fix is that only discovered logs are validated—there is still no comparison against each run's lever_sweep_log.jsonl or an expected arm count—so require exactly the configurations recorded for every supplied run before reporting success.

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 b07bdb0. Each run directory must now hold lever_sweep_log.jsonl, and the script requires exactly one server log for every configuration it lists (label with # as _), and none outside it; a missing or extra arm fails the run before any plateau counts. New tests cover a recorded configuration without a log and a log outside the record. The evidence CSV regenerates byte-identical.

A missing arm's server.log was silently left out by the glob, so the
check could pass with fewer logs than the run had. Each run directory
must now hold lever_sweep_log.jsonl and exactly one server log per
configuration it lists, with no logs outside it (Codex review of #123).
The evidence CSV regenerates byte-identical.
@SamMausberg

Copy link
Copy Markdown
Owner Author

@codex review

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

ℹ️ 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 on lines +119 to +123
arms = [
json.loads(line)['config'].replace('#', '_')
for line in record.read_text().splitlines()
if line.strip()
]

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 Require the complete expected configuration set

When lever_sweep.py is interrupted before later configurations run, its JSONL contains only the completed prefix because records are appended after each arm (experiments/moonshot/lever_sweep.py:113-133). These lines then treat that prefix as the entire expected set, so an incomplete P4 A/B directory containing one recorded log with four matching plateaus exits successfully even though the reproduction expects eight A/B logs or two preflight logs. The fresh evidence after the prior fix is this incremental construction of lever_sweep_log.jsonl; require an independently supplied expected configuration list/count rather than deriving completeness solely from that file.

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 fd8f028. The expected set now comes from the declared plan, not from the record: each run must be given as --expect RUN=LABEL,... (the configurations it was launched with, in order; a run without one, or a plan without a run, fails). The record must list exactly the plan, in order, each with exit 0, so an interrupted run whose JSONL holds only the completed prefix fails; the run must also hold one server log per planned configuration and none outside it. The README command gives the three plans (the A/B in run_p4b.sh's declared A B B A order, the two preflights). New tests cover an interrupted run and a run without a plan; the CSV regenerates byte-identical.

lever_sweep appends a record only after each configuration finishes, so
an interrupted run's lever_sweep_log.jsonl holds just the completed
prefix, and taking the expected set from it let an incomplete run pass.
Each run is now checked against its declared configurations, given as
--expect RUN=LABEL,... (the launch plan): the record must list exactly
those, in order, each with exit 0, and the run must hold one server log
per configuration and none outside the plan (Codex review of #123). The
README command gives the plans; the CSV regenerates byte-identical.
@SamMausberg

Copy link
Copy Markdown
Owner Author

@codex review

#128 adds a column to the sweeps table, so host_levers.csv would no
longer regenerate byte for byte with a later summarise.py; the README now
names e47f0e5, where both CSVs were checked (reviewer's note).
@SamMausberg

Copy link
Copy Markdown
Owner Author

@codex review

@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: 54535045b4

ℹ️ 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/moonshot/README.md Outdated
after the run, before the summary step.

`p4_admission_plateaus.csv` (2c, the 127 plateau) is read from the server logs of the three
void P4b attempts on CPU, by `admission_plateaus.py` at commit 591d060:

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 Attribute the reproduction command to a compatible revision

Checking out the stated 591d060 revision and running the command below fails because that version of admission_plateaus.py has no --expect option; the option was introduced in fd8f028. Update the cited revision (or separately identify the original-generation and current reproduction revisions) so the documented command can actually regenerate this evidence.

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 03bac1b: the README now says the CSV was first written at 591d060 and that the command below, with --expect, needs admission_plateaus.py from fd8f028 on; it regenerates the CSV byte for byte (checked at fd8f028).

Comment on lines +317 to +320
- Running-limit amendment (2026-10-01 at 14:29 UTC, before any further run): both arms
set `--max-running-requests 129` with the client at concurrency 128, so at most 128
requests are ever in the server. The limit at the last pass becomes 129 - R - 1, and the
wave reaches 129 - C = 128 with a chunk tail and min(129, 128) = 128 without one. The

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 Update the declared pool limit to 129

This amendment makes 129 the active running-request limit, but the same served-A/B declaration still says at lines 220–223 that p4_pools pins --max-running-requests 128. Because that pool bullet already incorporates the later KV and mamba amendments, it reads as the current configuration rather than merely historical state and now contradicts both this amendment and levers.py; update it to 129 while noting that the void attempts used 128.

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 03bac1b: the declaration's pool bullet now reads --max-running-requests 129 (128 in the three void attempts; running-limit amendment of 14:29 UTC, below), annotated in place like the KV and mamba pins.

@SamMausberg

Copy link
Copy Markdown
Owner Author

Verdict: REQUEST CHANGES (withdraws my provisional approval of 9c1c3aa; two new Codex P2s)

Re-review of b07bdb0, fd8f028 and 5453504.

Verified

  • The plateau audit. It now checks each run against a declared --expect plan: the record must list exactly the plan, in order, each entry exit 0, with one server log per planned configuration and none outside it.
    • The README command passes on one core: 12 of 12 logs ok, 56 plateaus, exit 0, and the CSV is byte-identical.
    • A negative check fails as it should: dropping the exact-replay arm from the 104311Z plan gives exit 1 ("record lists ... plan is ..." and "server log of a configuration outside the plan").
  • Tests. The plateau and validator tests pass, 38 passed.
  • Regeneration sentence. 5453504 names summarise.py at e47f0e5, so Moonshot: commit the sweep levers and the P13 state-rank study #128's added column no longer contradicts it.
  • Checks. The hostname check is clean over git log -p 9c1c3aa..HEAD.

Blocking: both Codex P2s on 5453504 are valid and unanswered.

  1. The command's commit. The README credits the CSV to "admission_plateaus.py at commit 591d060", but the command shown uses --expect, which first exists at fd8f028. Credit the command to fd8f028 (or 5453504). The CSV is byte-identical at both, so saying so would also keep the 591d060 history.
  2. The declaration still says 128. The pin list (lines 220-223) reads "--max-running-requests 128" while the dated amendment makes it 129. The other two pins on those lines are already annotated in place with their history ("655360 (360,448 in the void first run, below)", "132 (128 in the two void attempts, below)"). For consistency: "--max-running-requests 129 (128 in the three void attempts; amendment of 14:29 UTC, below)".

…d8f028

The declaration's pool bullet still named --max-running-requests 128
although the amendment made 129 the active limit; it now reads 129, with
128 noted for the void attempts, like the KV and mamba pins. The
reproduction command needs --expect, which exists from fd8f028 on; the
CSV was first written at 591d060 and is identical at both (Codex and
reviewer on #123).
@SamMausberg

Copy link
Copy Markdown
Owner Author

@codex review

@SamMausberg

Copy link
Copy Markdown
Owner Author

Verdict: APPROVE (provisional, on 03bac1b: Codex is still running on this head. I will confirm or withdraw once it finishes.)

03bac1b fixes both Codex P2s from 5453504, and both threads have replies:

  • The declaration's pool bullet reads --max-running-requests 129 (128 in the three void attempts; running-limit amendment of 14:29 UTC, below), consistent with how the other two pins carry their history.
  • The plateau command is credited correctly: the CSV was first written at 591d060, and the --expect command needs admission_plateaus.py from fd8f028 on and regenerates it byte for byte. I confirmed that at 5453504, and the script has not changed since.

Everything else stands from my review of 5453504: the audit, the CSV identity, the tests and the negative check.

@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: 03bac1b0d5

ℹ️ 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 on lines +216 to +220
if args.csv:
with args.csv.open('w', newline='') as handle:
writer = csv.DictWriter(handle, fieldnames=FIELDS, lineterminator='\n')
writer.writeheader()
writer.writerows(rows)

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 Preserve the CSV when the audit fails

When a declared server log is missing, has too few plateaus, or otherwise fails validation, this block still truncates and rewrites --csv before the subsequent nonzero exit; for example, a missing expected log replaces an existing CSV with a header-only file while returning 1. The fresh evidence after the earlier exit-status fix is that CSV writing still precedes if failed: sys.exit(1). Write to a temporary file and replace the destination only after all checks pass, so a failed regeneration cannot destroy the last valid evidence.

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 9331c15: the script now exits 1 before touching --csv when any check fails, so an existing CSV is left as it was; the file is written only when every check passes. Tests cover a failed audit with an existing CSV (unchanged) and a passing one (written). The evidence CSV regenerates byte-identical.

A failed audit still truncated and rewrote --csv before exiting 1, so a
missing log could replace the evidence with a header-only file. The
script now exits before writing when any check fails, leaving an
existing CSV untouched (Codex review of #123). Tests cover both cases;
the CSV regenerates byte-identical.
@SamMausberg

Copy link
Copy Markdown
Owner Author

@codex review

@SamMausberg

Copy link
Copy Markdown
Owner Author

Verdict: APPROVE (provisional, on 9331c15: Codex is still running on this head. I will confirm or withdraw once it finishes.)

9331c15 fixes the Codex P2 "Preserve the CSV when the audit fails". admission_plateaus.py now exits 1 before writing --csv whenever a check fails, so a failed audit cannot replace the evidence. Two new tests cover it, and all 14 pass on one core. The README command still passes (12 of 12 logs ok, 56 plateaus), and the CSV is byte-identical.

Everything else stands from my reviews of 5453504 and 03bac1b.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. You're on a roll.

Reviewed commit: 9331c15ecc

ℹ️ 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
SamMausberg merged commit e5b9367 into main Oct 1, 2026
SamMausberg added a commit that referenced this pull request Oct 1, 2026
…and the running-limit amendment (#123)

From evidence/moonshot/README.md and p4_admission_plateaus.csv (#123).
The third preflight was void like the first two, with the attention
cache at 40% use and 127 of 132 state slots taken. The cause, read from
the engine source: a request whose last prefill chunk runs in the pass
holds its request-table row (lowering the admission limit) and also
counts as one of the pass's requests, so a wave stops at M - 1 = 127
when its last pass carries a chunk tail; all 56 waves in the 12 server
logs did and stopped at 127. That tests the prediction at one limit and
one chunk only; the amended preflight (running limit 129, client at 128,
predicting 128 running) is the discriminating test and is queued. The
register entry p4-declared gains the plateau CSV and its script.
SamMausberg added a commit that referenced this pull request Oct 1, 2026
…and the running-limit amendment (#123)

From evidence/moonshot/README.md and p4_admission_plateaus.csv (#123).
The third preflight was void like the first two, with the attention
cache at 40% use and 127 of 132 state slots taken. The cause, read from
the engine source: a request whose last prefill chunk runs in the pass
holds its request-table row (lowering the admission limit) and also
counts as one of the pass's requests, so a wave stops at M - 1 = 127
when its last pass carries a chunk tail; all 56 waves in the 12 server
logs did and stopped at 127. That tests the prediction at one limit and
one chunk only; the amended preflight (running limit 129, client at 128,
predicting 128 running) is the discriminating test and is queued. The
register entry p4-declared gains the plateau CSV and its script.
SamMausberg added a commit that referenced this pull request Oct 1, 2026
…and the running-limit amendment (#123)

From evidence/moonshot/README.md and p4_admission_plateaus.csv (#123).
The third preflight was void like the first two, with the attention
cache at 40% use and 127 of 132 state slots taken. The cause, read from
the engine source: a request whose last prefill chunk runs in the pass
holds its request-table row (lowering the admission limit) and also
counts as one of the pass's requests, so a wave stops at M - 1 = 127
when its last pass carries a chunk tail; all 56 waves in the 12 server
logs did and stopped at 127. That tests the prediction at one limit and
one chunk only; the amended preflight (running limit 129, client at 128,
predicting 128 running) is the discriminating test and is queued. The
register entry p4-declared gains the plateau CSV and its script.
SamMausberg added a commit that referenced this pull request Oct 1, 2026
Appendix E.5: P4's 127-request plateau explained; running limit amended to 129 (#123)
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