Repository navigation
3.x.x: the weekly reduced L3 measures the 20x growth shape report-only: its capacity budgets stop failing the suite (#695) - #847
Merged
Conversation
Codex Review Summary: ✅ CompletedThis 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. |
kiwidream
added a commit
that referenced
this pull request
Nov 11, 2026
…#695) Second local review of the #847 follow-up: - The collation's report-only line, its PASS verdict and verdict.json (`refusals_set_aside` per run) say how many refused valid shares were set aside as the commit deadline's under overload, so a pass never hides that a correctness check failed and was set aside. - A rejection row with no count fails instead of reading as 0; an unnamed phase fails only when the preset gates every phase. - refused_beyond_overload is private and returns its set-aside count; public docs no longer link private items. - The docs and the L3 workflow's warning no longer say report-only runs keep every other budget as the preset has it, and the docs say the shortfall is evidence of overload, not proof. - Tests remove their scratch directories and cover a missing row count. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…y: its capacity budgets stop failing the suite (#695) ## Problem The scheduled weekly L3 (`prism-load-l3.yml`, suite `l3-reduced`) has failed three weeks running: 2026-10-26 (run 40326852601), 11-02 (run 41475045229) and 11-09 (run 42652897646). Each time only `mainnet-shape-2600-addresses-r1` failed, #695's known capacity ceiling: about 420/s against its 1,000/s target, tip-to-last-notify p99 above its 5 s budget, with harness exit 0 and exact reconciliation. "Collate the suite" then failed, so the weekly run could not flag a new regression. #555 decision 5 says the decision-7 points and the mainnet shapes in the reduced L3 are capacity-envelope points, not D1 verdicts. ## Change A suite may now name presets in `report_only` (`crates/qbit-prism-load/presets/suites.toml`); `l3-reduced` names one, `mainnet-shape-2600-addresses`. The preset's own gates and budgets are unchanged, and every other preset still gates. **What report-only exempts:** only the run's capacity budgets, which are its shortfall and every latency budget the preset sets (tip-to-last-notify p99 and median, churn tip delivery, new sessions' first job). **What it does not exempt:** everything else. A report-only run still fails the suite unless: - it reached its gate, meaning an artifact of this build's run of this preset from a clean tree, and a gate exit of 0 or 1; - the harness exited 0, meaning the run completed and reconciled exactly; - it has no durability finding; - every gated phase ran; - every tip was measured (a tip some session never got work on still fails); - unanswered submits are within the preset's budget; - refused valid shares in a gated phase are within the preset's budget, except refusals answered `share was not confirmed by the database` in a phase short of its rate (see below). **Refused valid shares and unanswered submits (follow-up to an independent verify).** The 20x preset first set both budgets to null, so the gate added neither check, and a valid-share refusal regression (the #716/#779 class) on it would have left the suite green. Now: - `mainnet-shape-2600-addresses` budgets both at 0. - History, read from each run's `gate.md` and `load-harness-report.json`: unanswered submits were 0 in all five runs of the preset (#695's dispatches 37403127199 and 37410760555 on 10-06, and the weekly runs 40326852601, 41475045229 and 42652897646). Refused valid shares in its gated phases were 34,670 and 2 on 10-06, 11,513 on 10-26, and 0 on 11-02 and 11-09. - On 10-26 every one was the server's answer when a share's commit deadline passes before COMMIT: `ledger-confirmation-failed`, `share was not confirmed by the database`. The frontend logs show `share commit deadline passed before COMMIT was sent` for each, bar three lock timeouts. That is how the append sheds load past its capacity, so a flat 0 would make the weekly run red on capacity again. - So, in a report-only run only, the collation sets aside exactly that answer, and only in a gated phase whose shortfall exceeds the preset's budget. Every other refused valid share stays gated at 0: that answer in a phase that kept its rate, `current chain state is unavailable` (the #716 class), `share outcome is not yet known`, `share was not committed because its commit gate closed`, and any refusal the phase counts that its rejection table doesn't explain. A phase with no shortfall, refusal count, rejection table or row count fails. - How many refusals were set aside is shown in the report-only line and the PASS verdict, and recorded per run as `refusals_set_aside` in `verdict.json`. - The matrix and the collation refuse a report-only preset with no budget (null, missing, not a u64) for refused valid shares or unanswered submits. - **What this cannot see:** the server sends the same answer for any failed ledger write. A ledger failure in a phase that is also short of its rate is therefore not gated on this point, and the shortfall is evidence of overload, not proof. The first 10-06 dispatch is an example: most of its refusals were #675's payout-revision fence answered as a ledger failure, fixed by #698. A distinct server answer for the commit deadline (qbit-prism-server) would close this. Among the gated presets in `l3-reduced`, only the three 400k points budget refused valid shares (0, `steady_state` only); the other mainnet shapes, session points and rental churn leave them unbudgeted, as before this PR. A run that loses or double-counts an acknowledged share, aborts, skips a phase or leaves no report fails the suite like any other. How each piece carries it: - **`scripts/prism_load_matrix.py`:** - Validates `report_only`: it names only the suite's own presets, each once, and leaves at least one preset gated. It never names a soak preset or a D1 cell, and `l3-full`, the suite a tag runs or promotes, takes none. - Every suite matrix entry carries `gated: true|false`. Non-suite selections (the nightly, a dispatch naming the preset) carry no `gated`, so the preset run on its own is held to its gates as before. - **`.github/workflows/prism-load-l3.yml`:** - Only the "Run and gate the preset" step is `continue-on-error` for a report-only entry. The test is `toJSON(matrix.gated) == 'false'`, because Actions' loose equality makes a missing `gated` equal `false`. - The next step leaves the job green only when the harness exited 0 and the gate gave a verdict of fail, and then adds a `::warning::` and a summary line. A harness failure or a gate with no verdict fails the job. - Checkout, install, download, upload and timeout failures still fail the job. - **`crates/qbit-prism-load/src/collate.rs`** (the `qbit-prism-load-compare --collate` summarizer): - `PlanEntry.gated` defaults to true, so older plans and verdicts parse unchanged. A plan that gates no run, gates some repeats of a preset and not others, or runs a soak or D1 preset report-only is refused. - A report-only run is re-evaluated with `capacity_exempt` budgets: shortfall unbounded, any latency budget the preset sets made infinite, every other budget the preset's. A budget added to the gate later is not opened until it is listed, so the default fails closed. Refused valid shares are judged by `refused_beyond_overload` (above). The run fails the suite on any check that still fails. - In the Markdown, the report-only run stays in every table with its numbers and shortfall. It is labelled `report-only, not gated` in its preset cell, its runs-table gate cell, its D1 cell (which keeps its own text behind the label) and the gates table. A line above the tables says plainly what is and is not exempt. It is never shown as a pass. - `verdict.json` keeps schema v1 and adds `gated_runs` plus, per run, `gated` and `holds_suite`. `complete` is again every planned run reaching its gate. `passed` means every gated run passed and every report-only run held every check but its capacity budgets. - **`scripts/prism_l3_promote.py`:** refuses to promote a verdict whose `gated_runs` is not `planned`, so a tag never carries a partly report-only suite. - **Docs:** `docs/prism-e2e-load-ci.md`, `crates/qbit-prism-load/README.md`, `docs/prism-release-benchmark.md`, the suites.toml header, the `compare_main.rs` doc comment, and the `mainnet-shapes-reduced-l3` scenario in `test/e2e-scenarios.toml`. **Rollout:** schedules run from `main`'s copy of the workflow. Once this lands on `3.x.x`, the weekly "Collate the suite" job passes, because the plan and the collator come from `3.x.x`. But `main`'s workflow has no `continue-on-error`, so the 20x job, and with it the run's overall conclusion, stays red until this workflow change reaches `main`. Main's old final step also prints "every planned run reached its gate and passed it" on that interim run. Both are documented in docs/prism-e2e-load-ci.md. ## Tests run - `cargo test --locked --offline -p qbit-prism-load --test collate`: 14 passed. New in the follow-up: `a_report_only_run_sets_aside_only_its_commit_deadlines_refusals`. The 10-26 shape passes the suite and records 11,513 set aside. The suite fails on the #716 class, a closed commit gate, a refusal the table doesn't explain or the phase doesn't count, the answer in a phase that kept up, a missing shortfall, a missing rejection table, a row with no count, and an unanswered submit. `a_malformed_plan_is_refused` also refuses a report-only preset with null budgets. Earlier cases: - a report-only run's failed budgets are shown and labelled but don't fail the suite; - a gated failure still fails a suite that has a report-only point; - a report-only run fails the suite on harness exit 4 with a durability finding, on a missing gated phase, on an unmeasured tip, and when it never reached its gate (no artifact, or gate exit 2); - a report-only failure is named even when a gated run never ran; - plan validation: no `gated` reads as gated; zero gated runs, mixed gating within a preset, and soak or D1 report-only presets are refused, by both `read_plan` and `collate`. - `cargo test --locked --offline -p qbit-prism-load --test realism`: 24 passed. - `python3 -m unittest tests.test_prism_load_matrix tests.test_prism_l3_promote tests.test_check_e2e_scenarios`: 58 passed. The follow-up adds: the 20x preset budgets both at 0, and a report-only preset whose correctness budget is null, missing, negative, above u64, a bool, a float or a string is refused. Earlier cases: - only the 20x shape is report-only in `l3-reduced`, and `l3-full` gates every run; - a preset run on its own carries no `gated`; - malformed `report_only` is refused: not a list, outside the suite, repeated, nothing left gated, a soak, a D1 cell, or in `l3-full`; - promotion accepts a fully gated verdict and refuses a partly report-only one. - `python3 scripts/check_e2e_scenarios.py`: passes. - `python3 scripts/prism_load_matrix.py suite:l3-reduced`: only `mainnet-shape-2600-addresses-r1` has `gated: false`. - `cargo fmt --all -- --check`: clean. - `cargo clippy --locked -p qbit-prism-load --all-targets -- -D warnings`: clean apart from the three known vendored sqlx-core warnings. - The workflow YAML parses. actionlint was not available locally. ## What CI must cover - actionlint and shellcheck on `prism-load-l3.yml`. - The workspace and Python suites. This PR changes no VERSION, so L3 itself won't run here. A dispatch of the L3 workflow from this branch (`--ref` this branch, `suite` `l3-reduced`, `ref` this branch) would exercise the report-only path end to end, at about $13 of runner time; it is the operator's call. Otherwise the first weekly run after this reaches `main` shows it. Refs #695. Refs #555 (decision 5). 🤖 Generated with [Claude Code](https://claude.com/claude-code) Squashed commits: 255a075 3.x.x: the weekly reduced L3 measures the 20x growth shape report-only, outside the suite verdict (#695) 0d8b00e 3.x.x: a report-only L3 run is exempt from its budgets only, never from completing and reconciling (#695) c4588de 3.x.x: a report-only L3 run is held to every check but its capacity budgets (#695) b65c215 3.x.x: report_only never names a soak preset or a D1 cell, and l3-full takes none (#695) 86c1fdd Merge remote-tracking branch 'origin/3.x.x' into orca/695-l3-capacity-point-report-only 891a5a4 3.x.x: a report-only L3 point still gates refused valid shares and unanswered submits (#695) 79ad501 3.x.x: set aside a report-only point's ledger refusals only in a phase short of its rate (#695) fcbc9e3 3.x.x: say and record how many refusals a report-only point set aside (#695) Co-Authored-By: Claude Opus 5.5 <[email protected]>
kiwidream
force-pushed
the
orca/695-l3-capacity-point-report-only
branch
from
November 12, 2026 21:42
fcbc9e3 to
86d4932
Compare
kiwidream
added a commit
that referenced
this pull request
Nov 13, 2026
…#842's median gate measures it (3.x.x is red since #847 and #854 both landed) ## Problem `3.x.x` is red since #847 and #854 both landed (CI run 43456385763 on 3d48a8f): "Rust tests" and "Rust PRISM PostgreSQL and multi-instance contracts (shard 3)" fail in `qbit-prism-load --test collate`, and every PR that takes the base in fails the same way. ``` test a_report_only_points_failed_budgets_are_shown_but_never_fail_the_suite ... FAILED test a_report_only_run_sets_aside_only_its_commit_deadlines_refusals ... FAILED test a_report_only_run_that_did_not_reconcile_fails_the_suite ... FAILED ``` Each PR was green on its own base. Together they are not: - #854 gave `mainnet-shape-650-addresses` a median gate (`tip_last_notify_median_budget_ms: 3000`, #842). A median is only measured when the report says how many tips its phases planned (`external_tips_planned`), so a run that lost tips cannot pass on the ones it kept. - #847 added tests that use that preset as the gated run beside a report-only point. Their synthetic report has one tip and no `external_tips_planned`, so the collation now reports the gated run as `tip to last session's notify, median over tips (unmeasured: phase warm_up does not record its planned tips (external_tips_planned))` and fails a suite the tests expect to pass. It is a test-fixture gap, not a defect in the gate or the collation: a report without the key is rightly unmeasured. ## Change `crates/qbit-prism-load/tests/collate.rs`: the synthetic report's first phase records the one tip the report holds (`external_tips_planned: 1`), and the other phases record none. The report now says what a current harness says, and the median gate measures its one tip (600 ms against 3,000 ms). No code outside the test changes. ## Tests - `cargo test --locked -p qbit-prism-load --test collate`: 14 passed, 0 failed (on 3d48a8f without this change, CI has the three above failing). - `cargo fmt --all -- --check`: clean. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Squashed commits: 32c308d 3.x.x: the collate tests' synthetic report records its planned tip, so #842's median gate on the 650-address preset measures it Co-Authored-By: Claude Fable 5.2 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The scheduled weekly L3 (
prism-load-l3.yml, suitel3-reduced) has failed three weeks running: 2026-10-26 (run 40326852601), 11-02 (run 41475045229) and 11-09 (run 42652897646). Each time onlymainnet-shape-2600-addresses-r1failed, #695's known capacity ceiling: about 420/s against its 1,000/s target, tip-to-last-notify p99 above its 5 s budget, with harness exit 0 and exact reconciliation. "Collate the suite" then failed, so the weekly run could not flag a new regression. #555 decision 5 says the decision-7 points and the mainnet shapes in the reduced L3 are capacity-envelope points, not D1 verdicts.Change
A suite may now name presets in
report_only(crates/qbit-prism-load/presets/suites.toml);l3-reducednames one,mainnet-shape-2600-addresses. The preset's own gates and budgets are unchanged, and every other preset still gates.What report-only exempts: only the run's capacity budgets, which are its shortfall and every latency budget the preset sets (tip-to-last-notify p99 and median, churn tip delivery, new sessions' first job).
What it does not exempt: everything else. A report-only run still fails the suite unless:
share was not confirmed by the databasein a phase short of its rate (see below).Refused valid shares and unanswered submits (follow-up to an independent verify). The 20x preset first set both budgets to null, so the gate added neither check, and a valid-share refusal regression (the #716/#779 class) on it would have left the suite green. Now:
mainnet-shape-2600-addressesbudgets both at 0.gate.mdandload-harness-report.json: unanswered submits were 0 in all five runs of the preset (3.x.x: mainnet-shape-2600-addresses (20x growth) misses its shortfall and tip-p99 gates: share appends queue on ORDER_LOCK at 420-675 shares/s #695's dispatches 37403127199 and 37410760555 on 10-06, and the weekly runs 40326852601, 41475045229 and 42652897646). Refused valid shares in its gated phases were 34,670 and 2 on 10-06, 11,513 on 10-26, and 0 on 11-02 and 11-09.ledger-confirmation-failed,share was not confirmed by the database. The frontend logs showshare commit deadline passed before COMMIT was sentfor each, bar three lock timeouts. That is how the append sheds load past its capacity, so a flat 0 would make the weekly run red on capacity again.current chain state is unavailable(the 3.x.x: a share under a tip-change lease is refused 'commit gate closed' when the authority try_read meets a writer, which can drop a valid share's credit and fires PrismShareAppendFailures #716 class),share outcome is not yet known,share was not committed because its commit gate closed, and any refusal the phase counts that its rejection table doesn't explain. A phase with no shortfall, refusal count, rejection table or row count fails.refusals_set_asideinverdict.json.l3-reduced, only the three 400k points budget refused valid shares (0,steady_stateonly); the other mainnet shapes, session points and rental churn leave them unbudgeted, as before this PR.A run that loses or double-counts an acknowledged share, aborts, skips a phase or leaves no report fails the suite like any other.
How each piece carries it:
scripts/prism_load_matrix.py:report_only: it names only the suite's own presets, each once, and leaves at least one preset gated. It never names a soak preset or a D1 cell, andl3-full, the suite a tag runs or promotes, takes none.gated: true|false. Non-suite selections (the nightly, a dispatch naming the preset) carry nogated, so the preset run on its own is held to its gates as before..github/workflows/prism-load-l3.yml:continue-on-errorfor a report-only entry. The test istoJSON(matrix.gated) == 'false', because Actions' loose equality makes a missinggatedequalfalse.::warning::and a summary line. A harness failure or a gate with no verdict fails the job.crates/qbit-prism-load/src/collate.rs(theqbit-prism-load-compare --collatesummarizer):PlanEntry.gateddefaults to true, so older plans and verdicts parse unchanged. A plan that gates no run, gates some repeats of a preset and not others, or runs a soak or D1 preset report-only is refused.capacity_exemptbudgets: shortfall unbounded, any latency budget the preset sets made infinite, every other budget the preset's. A budget added to the gate later is not opened until it is listed, so the default fails closed. Refused valid shares are judged byrefused_beyond_overload(above). The run fails the suite on any check that still fails.report-only, not gatedin its preset cell, its runs-table gate cell, its D1 cell (which keeps its own text behind the label) and the gates table. A line above the tables says plainly what is and is not exempt. It is never shown as a pass.verdict.jsonkeeps schema v1 and addsgated_runsplus, per run,gatedandholds_suite.completeis again every planned run reaching its gate.passedmeans every gated run passed and every report-only run held every check but its capacity budgets.scripts/prism_l3_promote.py: refuses to promote a verdict whosegated_runsis notplanned, so a tag never carries a partly report-only suite.docs/prism-e2e-load-ci.md,crates/qbit-prism-load/README.md,docs/prism-release-benchmark.md, the suites.toml header, thecompare_main.rsdoc comment, and themainnet-shapes-reduced-l3scenario intest/e2e-scenarios.toml.Rollout: schedules run from
main's copy of the workflow. Once this lands on3.x.x, the weekly "Collate the suite" job passes, because the plan and the collator come from3.x.x. Butmain's workflow has nocontinue-on-error, so the 20x job, and with it the run's overall conclusion, stays red until this workflow change reachesmain. Main's old final step also prints "every planned run reached its gate and passed it" on that interim run. Both are documented in docs/prism-e2e-load-ci.md.Tests run
cargo test --locked --offline -p qbit-prism-load --test collate: 14 passed. New in the follow-up:a_report_only_run_sets_aside_only_its_commit_deadlines_refusals. The 10-26 shape passes the suite and records 11,513 set aside. The suite fails on the 3.x.x: a share under a tip-change lease is refused 'commit gate closed' when the authority try_read meets a writer, which can drop a valid share's credit and fires PrismShareAppendFailures #716 class, a closed commit gate, a refusal the table doesn't explain or the phase doesn't count, the answer in a phase that kept up, a missing shortfall, a missing rejection table, a row with no count, and an unanswered submit.a_malformed_plan_is_refusedalso refuses a report-only preset with null budgets. Earlier cases:gatedreads as gated; zero gated runs, mixed gating within a preset, and soak or D1 report-only presets are refused, by bothread_planandcollate.cargo test --locked --offline -p qbit-prism-load --test realism: 24 passed.python3 -m unittest tests.test_prism_load_matrix tests.test_prism_l3_promote tests.test_check_e2e_scenarios: 58 passed. The follow-up adds: the 20x preset budgets both at 0, and a report-only preset whose correctness budget is null, missing, negative, above u64, a bool, a float or a string is refused. Earlier cases:l3-reduced, andl3-fullgates every run;gated;report_onlyis refused: not a list, outside the suite, repeated, nothing left gated, a soak, a D1 cell, or inl3-full;python3 scripts/check_e2e_scenarios.py: passes.python3 scripts/prism_load_matrix.py suite:l3-reduced: onlymainnet-shape-2600-addresses-r1hasgated: false.cargo fmt --all -- --check: clean.cargo clippy --locked -p qbit-prism-load --all-targets -- -D warnings: clean apart from the three known vendored sqlx-core warnings.What CI must cover
prism-load-l3.yml.This PR changes no VERSION, so L3 itself won't run here. A dispatch of the L3 workflow from this branch (
--refthis branch,suitel3-reduced,refthis branch) would exercise the report-only path end to end, at about $13 of runner time; it is the operator's call. Otherwise the first weekly run after this reachesmainshows it.Refs #695. Refs #555 (decision 5).
🤖 Generated with Claude Code