Skip to content

3.x.x: repeat runner-probe runs per class and summarise their variance for the regression rule (#542) - #605

Merged
Anatolie merged 6 commits into
3.x.xfrom
Anatolie/542-noise-tooling
Sep 30, 2026
Merged

Anatolie merged 6 commits into
3.x.xfrom
Anatolie/542-noise-tooling

Conversation

@Anatolie

@Anatolie Anatolie commented Sep 30, 2026 •

Copy link
Copy Markdown
Member

Refs #542

This PR adds tooling only. Nothing has been dispatched. The measurement and the per-lane class pick stay open until the user approves the Blacksmith spend (run plan below).

Why

Today neither workflow can repeat a run of one commit. The nightly takes its runner from each preset, and prism-load-runner-probe.yml runs each class once per cache backend. So #542's noise floor, the "≥ 10 repeats per runner class" in #487 S2, could not be measured.

What changes

.github/workflows/prism-load-runner-probe.yml

  • New dispatch inputs:
  • The plan job validates every input before any probe runner starts (EP-VALIDATION/EP-CONFIG). It checks against the presets of the commit the jobs will build, and resolves deprecated names. It refuses:
    • unknown classes or presets;
    • real-node presets (the probe builds no qbitd);
    • counts that are malformed or out of range;
    • more than 64 probe jobs;
    • any job that would need more than 360 minutes.
      It also writes the dispatch's spend ceiling to its summary.
  • Timeouts share one budget (EP-ERRORS):
    • Each run ends at its preset's timeout_minutes. measure --timeout-seconds kills the run's process group, and the step then kills leftover postmasters by data directory and removes the clusters before the next run.
    • The run step's timeout is the sum of the run timeouts, plus 5 minutes of slack and 1 minute of cleanup allowance per run.
    • The job's timeout is setup + build + runs + reports. So a hung run still leaves the row written and uploaded.
    • plan and collate now have their own timeout-minutes.
  • The run loop catches each run's status (the step is bash -e), so a failed gate or a timeout does not stop the runs after it. Rows cover every planned run, including ones that never ran, which show as unknown. The verdict fails on a planned run with no measurement or on a timeout.
  • collate writes variance.json next to the table, with a Markdown view in its summary. Its upload now runs even if the table or variance step fails.
  • With actions-cache, only repeat 1 saves the target cache, so N repeats don't evict other workflows' caches.
  • The run plan and the per-lane pick rule are in the header comment.

scripts/prism_load_probe.py

  • New variance subcommand. It writes the JSON document qbit.prism.runner-probe-variance.v1, for 3.x.x: Trend branch, evidence promotion and the regression rule (#487 S6) #551's regression rule:
    • Groups: per class × preset × fsync-cost band (fdatasync µs/op from each run's pg_test_fsync.txt, doubling bands from 125 µs; a VM's band is the median over its runs), plus a per class × preset all group.
    • Per metric, with a unit and clock label:
      • all: n, unknown, median, MAD, CV, min and max over every run;
      • vm_to_vm: the same over per-VM medians;
      • run_to_run: median MAD and median CV within each VM.
    • Metrics: wall time, seed time, peak host memory, headroom, tip p99, and per phase shortfall, achieved rate and ACK p50/p99. ACK values are read only when the report says milliseconds.
    • A run counts as measured only with harness exit 0, provenance passed, a gate exit of 0 or 1, and no timeout. A failed gate (exit 1) still counts as measured, because its shortfall is the evidence. Missing jobs, unrecorded runs and failed runs count as unknown, never zero, with a reason for each (EP-OBSERVABILITY).
    • size_evidence per class × preset gives fits as true, false or null.
    • The document also records the disk facts from host.json (write cache, FUA, model) per group, and each VM's band.
    • It refuses rows from more than one commit, or two rows for the same job.
  • New verdict subcommand, replacing the inline Python. measure --timeout-seconds records timed_out and exits 124 on a timeout.
  • Rows move to qbit.prism.runner-probe-row.v2, which adds the repeat, the commit, and a list of runs per preset. v1 rows are upgraded when read, and any other row schema is refused (EP-COMPAT).
  • matrix also prints presets, in_job_repeats, runs_minutes, job_minutes and the ceiling. String outputs are printed bare, without JSON quotes.

crates/qbit-prism-load/README.md: one paragraph in the probe section.

Run plan (not dispatched)

GitHub dispatches only main's copy of the workflow, so this change must be mirrored to main first (the coordinator's sync). The workflow's concurrency group keeps one run going and one pending, and a newer dispatch replaces a pending one, so send each dispatch only after the previous one has started. Pin every phase to one 3.x.x commit <sha>.

Costs are at $0.004 per 2 vCPU minute, list price, before free minutes. The ceilings are what matrix prints (every job at its timeout). The estimates use #541/L2's measured 8–13 min per 20k run and #473's ~20 min per 400k cell.

Phase Dispatch (gh workflow run prism-load-runner-probe.yml -R Qbit-Org/qbit-mining-bootstrap -f ref=<sha> -f target_cache=sticky-disk -f fsync_vms=0 …) Jobs × runs Ceiling Estimate
A. 20k noise floor -f classes=8,16,32 -f presets=throughput-20k-window-1fe -f repeats=10 -f in_job_repeats=2 30 jobs (10 per class), 60 runs 60,785 min, $243 $39–56
B. post-#273 memory on 32 vCPU -f classes=32 -f repeats=3 -f presets=throughput-400k-window-1fe-async,throughput-400k-window-2fe-async,throughput-400k-window-4fe-async 3 × 3 13,369 min, $53 ~$14
B2. #555's 5,000 and 10,000-session points as B with -f presets=<#555's 5,000-session preset>,<#555's 10,000-session preset> once #555 checks them in (named by #555, not created here) 3 × 2 ~$42 at 60-min timeouts ~$12
C. P5 step down B's and B2's presets with -f classes=16, only for those whose 32 vCPU peak leaves 16 vCPU its headroom 3 × 3, 3 × 2 $27 + $21 ~$13
D. L2's other nightly presets on 8 vCPU -f classes=8 -f repeats=3 -f presets=throughput-400k-window-1fe-async,tip-delivery-2000-miners-400k-2fe-retarget,mainnet-shape-650-addresses, then …=mainnet-shape-130-addresses,rental-churn-bursts-and-storms,throughput-20k-window-1fe-500-addresses,short-plan-fake-node 2 × (3 × 3–4) $15 each $2–3 each
Total ~$415 ~$80–100

Per-lane pick

From each phase, download the prism-probe-table artifact and read variance.json. A lane's class is the smallest class on which every preset the lane runs has size_evidence.fits == true. That means:

  • every planned run was measured (harness exit 0, provenance passed, a gate verdict of 0 or 1, no timeout);
  • zero shortfall in every phase the preset gates, on every run (the generator offered the full rate on its reserved cores);
  • at peak, at least max(25 % of MemTotal, the preset's --min-mem-available-mib) stayed available on every run, each against its own VM's MemTotal.

null (a run unknown) is not a pass: rerun that class before picking.

Lane Evidence Candidates
L2 A + D 8, then 16
L3 reduced B + B2 + C (400k at 1/2/4 frontends, the session points) 16, then 32
L3 full Stays on 32 unless 400k at 4 frontends fits 16 in C; only then are its 200k/500k presets probed on 16 the same way 16, then 32
L4, L5, L6 The probe runs no real node or Compose stack, so the same rule is applied to those lanes' own first runs: host.json and peak memory, shortfall where the harness drives the load, memory only for L6 from #487's table class downwards

Comparing run-to-run CV with VM-to-VM CV then decides the shape of #551's rule. Where VM CV is well above run CV, use #511's same-VM A/B; otherwise, a trailing same-class median per fsync band. Each lane's measured cost is its jobs' billed minutes (gh run view <id> --json jobs) × the class multiplier × $0.004, which replaces #487's timeout ceilings.

Verification

  • python3 -m unittest tests.test_prism_load_probe tests.test_prism_load_matrix tests.test_check_e2e_scenarios tests.test_docs_lab_prism_references: 217 tests, OK. The 20 new probe tests cover:
    • plan bounds and refusals, the ceiling, alias resolution and the CLI outputs;
    • a timeout that kills a grandchild, and exit 124;
    • v2 rows with in-job repeats, units, the measured/unmeasured rules, and v1 upgrade versus unknown-schema refusal;
    • variance statistics, unknown counting for missing jobs and failed runs, bands, the fits rules (gated versus ungated shortfall, headroom, preset floor), refusal of mixed commits and duplicate rows, and the CLI;
    • the verdict.
  • python3 scripts/check_e2e_scenarios.py: OK.
  • actionlint (with shellcheck) on the workflow: clean.
  • A local simulation of the probe job's shell steps (run loop → row → verdict) and the collate steps (expected → table → variance), with a stubbed prism-load-run.sh, 3 planned repeats and one missing. The table names the missing job, and variance counts its runs as unknown.
  • Not verified: any real Blacksmith run. The workflow itself has not executed (by decision), so the sticky-disk and cache behaviour with concurrent repeats, the postmaster cleanup after a timeout, and the real reports' field values are untested on a runner.

🤖 Generated with Claude Code

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 30, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-30T19:51:33.850943Z a7a8a1b New commits
ℹ️ 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: a0c8e57b7b

ℹ️ 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 scripts/prism_load_probe.py Resolved
Comment thread tests/test_prism_load_probe.py Resolved
@Anatolie

Copy link
Copy Markdown
Member 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: e3621760c1

ℹ️ 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 scripts/prism_load_probe.py Resolved
Comment thread scripts/prism_load_probe.py Resolved
@Anatolie

Copy link
Copy Markdown
Member 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: 417f4904fd

ℹ️ 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 scripts/prism_load_probe.py Resolved
@Anatolie

Copy link
Copy Markdown
Member 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: bb9301224d

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

@Anatolie

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Bravo.

Reviewed commit: b9c0293cec

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

Anatolie and others added 5 commits September 30, 2026 15:44
…e for the regression rule (#542)

The runner probe could run each class only once per cache backend, so the
harness's noise could not be measured. The probe workflow now takes
`presets`, `repeats` (separate jobs per class, for the VM-to-VM spread) and
`in_job_repeats` (runs per preset in one job, for the run-to-run spread),
validated with the checked-in presets before any probe runner starts, with
per-run timeouts that end the run's process group and a job timeout that
covers setup, build, every run and the reports.

`scripts/prism_load_probe.py variance` writes a versioned JSON document
(qbit.prism.runner-probe-variance.v1): per class, preset and fsync-cost
band, median, MAD and CV over every run, over per-VM medians and within
each VM, with n and unknown counts (missing or failed runs are unknown,
never zero), and each class's runner-size evidence for the per-lane pick.
Rows move to v2 (repeat, commit, a list of runs per preset); v1 rows are
still read. The run plan and the pick rule are in the workflow header.

Refs #542

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…1 runs as unknown when they failed (#542)

The run step's shell is bash -e, so a gate exit 1 or a timeout ended the
loop before its status was read: every later preset and repeat went
unrun and the timeout cleanup never ran. The status is now caught.

v1 rows are upgraded with each run's unmeasured reason, so a failed v1
run is unknown in the variance and not a sample. A job's own summary table
shows the presets its row ran, not the defaults. With actions-cache, only
repeat 1 saves the target, so repeats do not evict other workflows'
caches.

Refs #542

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…t wait on zombies when ending a run (#542)

size_evidence compared every run's headroom with a quarter of the
smallest MemTotal in the class, so a larger VM short of its own quarter
could pass. Each run is now held to max(fraction x its own MemTotal, the
preset's floor).

end_group counted a zombie left by a PID 1 that reaps slowly as a live
member of the group, so it waited the whole grace and the timeout test
failed in such containers. Liveness now reads process states from /proc.

Refs #542

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…every headline metric in a fully unknown group (#542)

A run whose harness exited 0 but whose gate exited 2, panicked or never
started was counted as measured; only gate exits 0 and 1 are verdicts
(prism-load-run.sh), so any other is now an unknown run.

A group whose every run was unknown emitted no metrics at all. The run
metrics and each gated phase's metrics are now always listed, with n 0
and the unknown count.

Refs #542

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…group (#542)

A preset whose gates name no phases (pr-smoke, the soak presets) gates
every phase it drives, so its unknown group now lists the phases any of
its runs reported, with n 0 and the unknown count.

Refs #542

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@Anatolie
Anatolie force-pushed the Anatolie/542-noise-tooling branch from b9c0293 to 8ed255d Compare September 30, 2026 19:44
…ot one (#542)

Each run that times out can spend about 40 s ending its process group,
its postmasters and its clusters, and the run step had one fixed five
minutes of slack for all of them, so a plan of many short runs could
time the step out before the last run wrote its measurement. The slack
is now five minutes plus one per planned run; the run plan's ceilings
are recomputed.

Refs #542

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@Anatolie
Anatolie force-pushed the Anatolie/542-noise-tooling branch from 8ed255d to d007cdb Compare September 30, 2026 19:47
@Anatolie
Anatolie merged commit 97534f4 into 3.x.x Sep 30, 2026
30 checks passed
Anatolie added a commit that referenced this pull request Sep 30, 2026
…spread, trend the bridging job, file the soak under its own lane, and document the evidence lane (#551)

- prism_load_regress.py reads qbit.prism.runner-probe-variance.v1 (#605):
  all.cv of the run's own #542 fsync band, else the class's all-band group;
  other schemas and versions refused by name; numbers #542 does not measure
  stay provisional and are named. The fixture is written by
  prism_load_probe.variance itself, and a test keeps it in step.
- The evidence action passes test/prism-load-variance.json once checked in.
- #613's bridging job gets a job row (L2) and joins the evidence job's needs.
- The Saturday soak's rows are lane `weekly` (the manifest's), not L5.
- docs/prism-e2e-load-ci.md: the evidence, trend and regression sections.

Refs #551

Co-Authored-By: Claude Opus 5.5 <[email protected]>
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