Repository navigation
3.x.x: load-harness realism, checked-in presets, a nightly workflow and a per-PR smoke run (#521 item 6) - #536
Conversation
…nd a per-PR smoke run (#521 item 6) qbit-prism-load gains a realistic population, all of it off by default so every existing run takes its old code paths byte for byte: - --recipients N and --recipient-weights uniform|zipf:s|pareto:a| whale:f+<dist>: distinct payout addresses whose sessions and seeded window shares follow the weights. The window's recipients are the live sessions' addresses, with the programs the server derives for them. - --session-hashrate-sigma and --session-difficulty vardiff:<ratio>: each session asks for its own difficulty with d= in its Stratum password. The configured difficulty is the window difficulty over the mean offered multiplier, so the window keeps its length. - --template-bits: a harder fake network, so a three-order spread over a 400k window stays above 2^-32, the least a share target can express. The entry check refuses a spread below that floor. - --arrival bursty:cv1,cv60,max: per-second and per-minute rate bursts. - --pool-fee-bps: the pool fee on, as mainnet runs it. - --seed: every draw is reproducible. - --plan tips: warm-up only, with no artifact. The side report records the generated and driven population per address, and each phase's realised arrival. Presets in crates/qbit-prism-load/presets pin every result flag. The harness and a test both refuse a preset that omits one or leaves it to a default. There are 16: the #271 D1 20k fixture, #275's tip-delivery benchmark, a 500-address variant of each, #473's eight D1 cells exactly as run on a193705 (pre-#497 admission), mainnet-floor, growth-5x, growth-20x and the smoke preset. qbit-prism-load-gate holds a run to its preset's gates: exit 0, reconciliation, per-phase shortfall, #473's rule where asked, and the tip-to-last-notify p99. It prints #473's verdict-table columns. .github/workflows/prism-load-nightly.yml runs the nightly presets on 8 vCPU runners, and any selection on dispatch. It records pg_test_fsync, uploads the reports and writes a job summary. Its live-nightly job runs the opt-in live_regtest variants listed in test/prism-nightly-gated-tests.txt and proves them with the gate manifest. The per-PR smoke run is a gated test that drives the smoke preset against a debug server and adds about a minute to its shard. Refs #521, #473 Co-Authored-By: Claude Opus 5.5 <[email protected]>
…nciliation as the harness defines it (#521) A preset flag pinned false or null is left off the expanded command line, so clap never saw it twice. The command line could then set it and run a different workload under the preset's name and SHA-256: --recipients, a burst, --mid-flight-kill or --database-url on tip-275, for example. expand_command_line now refuses any flag the preset pins, whatever its value. The gate failed a run whose reconciliation had a committed share without an acknowledgement, although the harness explains each one and exits 0 for a submit whose answer the drain window cut off. It now gates acknowledged shares missing from PostgreSQL. It reports those commits beside their explanations. An unexplained commit is still a durability finding, and a divergence inside the run still exits 5, and both remain gated. Refs #521 Co-Authored-By: Claude Opus 5.5 <[email protected]>
Review ledger (head
|
| # | Finding | Disposition |
|---|---|---|
| 1 | A preset flag pinned false or null is left off the expanded command line, so the command line could still set it and run another workload under the preset's name and SHA-256 |
Fixed in 19aefecb. expand_command_line refuses any flag the preset pins, whatever its value. The test covers a set flag, a flag pinned off and a null one |
| 2 | The schedule, and possibly dispatch, only fire from the default branch (main) |
Planned. After this merges, a follow-up PR to main carries prism-load-nightly.yml alone, identical to this one, with ref defaulting to 3.x.x |
| 3 | The README still said the gate fails on reconciliation unexpected |
Fixed in 19aefecb, with the gate change below |
Found by the local preset runs, fixed here.
- The gate failed a run whose only reconciliation difference was a share PostgreSQL committed after the drain window cut off its answer. The harness explains that case and exits 0. The gate now fails on acknowledged shares missing from PostgreSQL. It reports committed-without-acknowledgement beside its explanations, since an unexplained one is a durability finding and a divergence inside the run exits 5, and both of those stay gated. (
19aefecb) - Before
44cb1099was signed, a vardiff whale displaced the seeded window within a minute. The configured difficulty is now the window difficulty over the mean offered multiplier. - Before
44cb1099, a three-order spread over a 400k window would have needed share difficulties below 2^-32.--template-bitsfixes that, and the entry check refuses such a spread. - The first mainnet-floor run found 3.x.x: with the pool fee disabled, the first sub-floor balance stops all work building (silent mining stall) #525: with the fee off, dust recipients below the payout floor stalled new-tip work 12.7 s on both frontends. The realism presets now run mainnet's 200 bps fee.
Mutants that fail the smoke test. A server that holds new-tip delivery 6 s leaves tips unserved and causes shortfall. A server that ignores d= exits 8 (premise contradicted).
Local preset runs. Release builds, private PostgreSQL 16 with fsync on. The host is shared, so these are indicative and not qualification numbers. The exclusive benchmark lock was starved for about an hour, so mainnet-floor ran under the shared lock.
| Preset | Lock | Gate | Tip to last notify p99 | Notes |
|---|---|---|---|---|
| mainnet-floor | shared | pass | 684 ms, 6 tips | whale 83.9% of accepted work, difficulty spread 3.00 orders, window 400,000 -> 400,222, no #525 deferral |
| tip-275-realistic | exclusive | pass | 721 ms, 8 tips | 1 commit explained as drain-ended |
| d1-20k | exclusive | fail | 581 ms | steady_state shortfall 30,473: #473's rule not met on this host |
| growth-5x | exclusive, but the quiet gate timed out at 1-min load 11.7 | fail | 7,955 ms | warm-up shortfall 9,230; contaminated by other load, indicative only |
| d1-473-400k-fe2-async | exclusive | aborted | 987 ms | steady_state shortfall 178; the frontend restart then aborted on a host shared-memory fault, not a CI concern |
The same gates run nightly on the 8 vCPU runners once the workflow is on main, so these numbers get their CI baseline there.
… (#538) GitHub fires schedule triggers, and offers workflow_dispatch, only for workflows on the default branch. This adds prism-load-nightly.yml to main, byte-identical to the copy merged to 3.x.x in #536. Its jobs check out the ref input, which defaults to 3.x.x. The presets, scripts, gate and composite actions they run therefore come from 3.x.x, and nothing else changes on main. Refs #521 Co-authored-by: Claude Opus 5.5 <[email protected]>
…uilds from #536 to #568 launched (#511) From 0c8842e (#536) up to 65c9751 (#568) the harness has --pool-fee-bps but leaves the fee off at 0, so the comparison FAILed a base in that range at every throughput preset. A fee-off frontend now satisfies a pinned 0, as legacy-flags.json already accepts; a fee off at a nonzero pin or an enabled fee at another rate still fails. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Refs #521 (item 6: the nightly and on-demand load harness, the per-PR smoke run, and the harness realism added to it), #473.
What
Harness realism. Every option is off by default. A run that names none takes the old code paths, so its usernames, passwords, seeded window rows, round-robin offers and token bucket are byte for byte what they were. A test pins that.
--recipients N,--recipient-weights uniform|zipf:s|pareto:a|whale:f+<dist>--session-hashrate-sigma,--session-difficulty vardiff:<ratio>d=in its Stratum password, which the server honours with vardiff off. The configured difficulty is the window difficulty over the mean offered multiplier, so the average live share weighs what a seeded share does and the window keeps its length--template-bits--arrival bursty:cv1=,cv60=,max=--pool-fee-bps--seed,--plan tips,--presetThe side report gains a
populationblock. It records the distributions asked for, and per address the generated weight, sessions, seeded window shares, and accepted live shares and work, with top-1/top-10/Gini concentration and the difficulty spread. Each phase gains anarrivalblock: offers per second and their 1 s and 60 s coefficient of variation.Presets.
crates/qbit-prism-load/presets/*.jsonpin every result flag; the harness and a test both refuse a preset that omits one or leaves it to a default. Each preset also names its runner, timeout, schedule and gates.d1-20k,d1-20k-realistic(#271's D1 20k fixture at its pre-#497 admission, and with 500 Zipf(1.1) addresses)tip-275,tip-275-realistic(#275's tip-delivery benchmark with--retarget-bits, and with 500 addresses)d1-473-400k-fe1-async(#473's production-window D1 baseline cell, exactly as run on a193705)mainnet-floor(130 addresses, 85% whale over a Zipf tail, three orders of difficulty, bursty arrivals peaking at 400/s, 400k window, 200 bps fee) andgrowth-5xgrowth-20xsmokeGate.
qbit-prism-load-gateholds a run to its preset:shortfallwithin budget in each gated phase;The D1 presets gate only the 500 shares/s
steady_state. The 2,000/s burst is reported in #473's verdict-table columns, not gated: #473 found no configuration that meets it. The other presets gate warm-up,steady_stateandreconnect, not the deliberately degradedslow_database.Workflow.
.github/workflows/prism-load-nightly.ymlruns on schedule, and onworkflow_dispatchwith inputs for the presets, the ref, and overrides of the tip and shortfall budgets. Per preset it:pg_test_fsyncon the filesystem the harness puts its cluster on;.github/scripts/prism-load-run.sh, which reproduces a nightly run anywhere;A
live-nightlyjob runs the opt-inlive_regtestvariants listed intest/prism-nightly-gated-tests.txtwith--ignored --exact: #523's-reindexcrash variant and #524's 130-payee weighted recipients. It proves them executed withcheck_gate_manifest.py. The schedule fires from the default branch, so a follow-up PR tomainwill carry this file alone.Per-PR smoke. The gated test
qbit-prism-load::load_smoke::the_smoke_preset_serves_every_session_every_tip_and_reconcilesruns thesmokepreset against a debug server and holds it to the preset's gates: every session gets work on every tip within 5 s, and reconciliation is exact. The preset is one frontend, 100 sessions over 20 addresses under a 60% whale and a Zipf tail with a two-order difficulty spread, a 20k window, and 3 retargeting tips. CI cost: about 55-70 s on its shard (about 22-37 s building the debug server beside the test's own build, then about 30 s running).Verification
cargo fmt --checkandcargo clippy -p qbit-prism-load --all-targets -D warningsare clean.qbit-prism-loadtests pass: 136 harness, 21 realism/preset/gate, smoke, and quorum.d=(exit 8, premise contradicted).Local preset runs (release builds, private PostgreSQL 16 with fsync on; a shared development host, so indicative rather than qualification numbers):
steady_stateshortfall 30,473: #473's rule not met on this hostFollow-ups in this lane: connection churn and rentals with a
rental-churnpreset (next PR), and scenario 5's dense-cadence soak wired intolive-nightly.🤖 Generated with Claude Code
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.