Skip to content

3.x.x: long soak automation: a one-lifetime soak plan for the load harness, a weekly 5.5 h soak and a deployment soak report (#575) - #588

Merged
djh58 merged 7 commits into
3.x.xfrom
djh58/prism-b575-soak
Sep 30, 2026
Merged

djh58 merged 7 commits into
3.x.xfrom
djh58/prism-b575-soak

Conversation

@djh58

@djh58 djh58 commented Sep 29, 2026 •

Copy link
Copy Markdown
Member

Refs #575, #556

#575 item 2, long soak automation. Before this, the longest automated PRISM run was about twelve minutes. This PR adds:

  • a one-lifetime soak mode for the load harness;
  • a weekly 5.5 h preset for it;
  • a deployment soak report that holds a live testnet4 deployment to the same gates hourly.

docs/prism-soak.md is the reference.

Server change, needs full review: a new gauge, qbit_prism_process_open_fds, added beside qbit_prism_process_resident_memory_bytes. It comes from the same process collector and reads -1 when unknown. The server makes itself non-dumpable at start, so /proc/<pid>/fd is closed to every other process of its user; the only way to read its descriptor count is to have it count its own. The observability contract, cardinality and registry tests and the generated metrics inventory are updated. The PR also adds a test-only cargo feature, soak-leak-mutant, which keeps 16 KiB per accepted share. No build or image enables it.

What changes

qbit-prism-load --plan soak (soak_driver.rs). A soak preset has a soak block that names checked-in presets. Their workload flags (plan, rates, arrival, tips, blocks, churn, storms) are looped over the soak preset's own cluster and population for one server lifetime. Each preset runs with its own phases, with these exceptions:

  • nothing restarts or kills a frontend;
  • the deliberately degraded slow_database phase is left out. Looped, its backlog has to drain before the next cycle starts, and it can outlast the 25 s drain limit; a local run aborted there.

Phases are named c<cycle>.<preset>.<phase>. The whole plan is validated before anything starts: a looped preset that kills a frontend, or needs more sessions than the soak's listeners are sized for, is refused.

  • Samples, every sample_seconds:

    • each frontend's RSS, descriptors and threads;
    • connections per frontend and connections idle in a transaction over 60 s;
    • pg_wal size, the next share_seq, and every partition's state and size;
    • the largest relations and payout divergences;
    • ACK latency since the previous sample.

    A value that can't be read is null with the reason, never zero.

  • Rollover: at rollover_minutes the share sequence is set to rollover_margin_rows below its partition's bound (setval, only ever upward). The live load then crosses into the lead partition itself.

  • Retention: every archive_every_minutes the operator's own qbit-prism-server share-archive commands run against the live cluster. They seal, archive and verify every partition the sequence has passed, then detach and drop the ones plan clears. Each command has a 10-minute timeout.

  • Reconciliation: every partition that left the ledger is read back:

    • detached ones as they stand;
    • dropped ones through share-archive restore, un-attached.

    The exact reconciliation includes them. An acknowledged share must be in PostgreSQL or in an archive that restores row for row.

  • Only existing settings are shortened: PRISM_SHARE_PARTITION_ENSURE_INTERVAL_SECONDS for the frontends, and share-archive --window-multiple / --retention-days for the retention passes.

Soak gates (soak.rs), shared by qbit-prism-load-gate and the deployment report:

  • the least-squares slope of RSS's per-window peaks. A 400k-window block landing steps RSS by about 800 MiB for minutes at a time, so a per-sample fit fails healthy servers;
  • RSS within 2x the warm-up peak (the bound in prism-capacity-readiness.md);
  • the descriptor slope;
  • per-client connection peak and quarter-to-quarter drift;
  • zero connections idle in a transaction over 60 s;
  • bounded pg_wal;
  • a minimum number of rollovers and of archived-and-dropped partitions;
  • one PID per process;
  • no new payout divergence.

Unknown inputs fail. On regtest the harness gate still applies as well: exit 0 with exact reconciliation, no durability finding, zero shortfall in every phase, and the tip-delivery budgets.

Presets and lanes (all in test/e2e-scenarios.toml):

preset lane load rollovers / archived
soak-weekly weekly (new 41 5 * * 6 schedule) 13 cycles of 25.5 min: mainnet-shape-130-addresses, rental-churn-bursts-and-storms, tip-delivery-2000-miners-400k-2fe-retarget; 5.5 h; timeout 355 min 4 forced; gated >= 3 / >= 2
soak-short dispatch 19 min of tip-delivery (no block landings); the leak gate 1 forced; the 400k-window partition sealed, archived and verified under load
soak-smoke nightly (opt-in soak_smoke) and dispatch 4 cycles of pr-smoke, 3.6 min 2 / 2, restored and reconciled

Per PR: the gated soak_sampling runs in 0.5 s against the shard's PostgreSQL. It samples a fresh, migrated PRISM schema and the test process, forces a rollover and draws past the bound, and holds the real samples to the soak gates: they pass on one crossing and fail when asked for two. soak_plan checks the presets plan as stated.

qbit-prism-soak-report (soak_report_main.rs). It takes a Prometheus URL and a read-only database URL, from flags or from PRISM_SOAK_PROMETHEUS_URL / PRISM_SOAK_DATABASE_URL; no endpoint is in the repository. Hourly (or --once from cron) it:

  • appends a sample;
  • evaluates every sample so far against soak-gates/testnet4.json;
  • writes soak-report.md.

Its reconciliation check is committed >= acknowledged: the servers' acknowledged-share counters against the accepted ledger rows over the same span. It is scrape-lag safe, so a gap can hide a loss but never invent one. The docs cover the database grants and how to start and read a multi-day testnet4 soak.

Workflow (prism-load-nightly.yml, in this commit; it must be synced to main byte-identical):

  • A third schedule whose plan selects weekly, with its own concurrency group, so the soak never holds the nightly queue.

  • The live-nightly run step now runs each listed <package>::<binary> with its own ids, so qbit-prism-load::soak_smoke joins the live_regtest variants. Every binary runs, and the step fails if any failed.

  • Job conditions:

    trigger jobs that run
    17 2 * * * plan (nightly), build, run, live-nightly
    43 3 * * 0 live-weekly only
    41 5 * * 6 plan (weekly), build, run
    dispatch plan (inputs), live-nightly if live, live-weekly if weekly
  • actionlint is clean.

Other:

  • prism_load_matrix.py gains a weekly selection (all stays nightly plus manual).
  • check_e2e_scenarios.py gains the weekly lane (weekly presets, wired to the new schedule).
  • prism-load-run.sh appends the soak samples to the job summary.

#291's soak criteria on #278's metrics (#556)

#291 criterion #278 family this soak still for #556
memory bound process_resident_memory_bytes (the harness reads the same VmRSS) gated: window-peak slope, 2x warm-up peak the bound's calibration (first weekly runs)
restart count none; the PID (regtest), resets of accepted_shares_total (deployment) gated: one lifetime, frontend_restarts 0 restarts under faults (#554)
late wakes runtime_lag_seconds, runtime_task_stalled, runtime_poll_lag_seconds not sampled gate them per sample
pause / lag and ACK distributions share_ack_seconds ACK p50/p99 per sample, reported; per-phase p99 in the side report gate the distribution
lock-wait distribution database_advisory_lock_wait_seconds, database_pool_acquire_seconds per-phase advisory-lock waits in the side report; connections gated gate the distribution
sustained accepted shares accepted_shares_total gated: zero shortfall per phase; acks per sample at 2 h steady-state rate on 16 vCPU
live solves blocks_total, block_submit_seconds 26 scheduled landings; gated: no payout divergence, tip delivery a pending-candidate restart (#554)
exact reconciliation — gated: including restored archives —

#556 still needs:

The sampler, the gates, the one-lifetime loop and the rollover/retention driver here are the base to build that on.

Cost

where added
Per PR soak_sampling 0.5 s, plus one small test binary's compile (about 15-20 s in its shard); soak_plan under 0.1 s
Nightly soak_smoke about 4.2 min in live-nightly (252 s locally)
Weekly about 5 h 40 min of one 8 vCPU runner plus the shared release build: about 350 runner-minutes, about $5.60 a week at $0.016 per 8 vCPU minute (about $24 a month)

Evidence

All runs were local, on PostgreSQL 16 with fsync on.

  • soak_sampling: passes in 0.53 s. It fails against a rollover mutant (the sequence is not advanced) and against a gating mutant (the rollover counter never counts a crossing; the gate reads "0 bound(s) crossed").

  • soak_smoke (nightly): passes in 252 s on this base. It makes 2 rollovers; p0 and p1 are sealed, archived, verified, detached and dropped under load, then restored for an exact reconciliation. Against a server mutant whose descriptor gauge never reads, it fails on the descriptor gate alone.

  • Leak gate, soak-short: the healthy and leak-mutant servers ran concurrently under the shared heavy lock, pinned to 4 cores together (host load1 median 5.8, max 15.9).

    RSS window-peak slope (bound 1536 MiB/h) vs warm-up peak (bound 2x)
    healthy fe-0 / fe-1 +880 / +817 MiB/h, pass 1.35x / 1.38x, pass
    leak fe-0 / fe-1 +4269 / +3945 MiB/h, FAIL 2.43x / 2.40x, FAIL

    Both reconciled exactly, with flat descriptors (231) and 16 connections per frontend. Under the 4-core pin both also missed the tip-delivery budget and showed shortfall in one warm-up; that is CPU starvation, not the soak.

  • Findings:

    • Each 400k-window block landing lifts a frontend's RSS by about 800 MiB (520 to 1,300 MiB, once to 2.2 GiB, later back to 0.9 GiB).
    • A healthy server grows 0.6 to 0.9 GiB/h in its first 20 minutes as caches fill. A short run can therefore only catch a gross leak. The sensitive gate is the weekly's 16 MiB/h after an hour, and that bound is uncalibrated; a dispatched soak-weekly run on this branch will set it.
  • Retention at 400k: sealing two landed 400k-window audits took about 20 s, archiving the 480k-row partition 3.6 s and verifying it 3 s, all under load.

  • qbit-prism-soak-report, against a real PRISM database and a stub Prometheus:

    • without pg_monitor, WAL reads unknown and fails; after the grant it reads;
    • with the scrape-aligned spans, an exact match passes and one share beyond committed plus the scrape spread fails;
    • a resets() restart is counted as a new lifetime;
    • a read with no other client is a real zero, not unknown.
  • Checks: fmt; clippy -D warnings (also with the feature); qbit-prism-load lib, soak_plan, realism, harness and churn; server observability and metrics; prism_load_matrix and check_e2e_scenarios unittests; check_e2e_scenarios, check_prism_settings, check_gate_env_reads, check_toolchain_pin, check_deleted_test_map; generate_prism_metrics --check.

Review fixes (818e308)

/code-review found four issues, all fixed:

  • A deployment soak's warm-up is now per lifetime.
  • The reporter keeps lifetime and counter across a missed read.
  • Committed rows are counted per interval while live, so retention can't fake a loss.
  • Every soak churn phase is reported (soak.churn_phases) and gated, not only cycle 1.

soak.rs is split into soak/{mod,sample,evaluate,tests}.rs, and evaluate() into per-gate helpers.

Adversarial-review fixes (ccd0b74)

An independent adversarial review cleared the new gauge: its expiry, its invalidation, and unknown versus zero. It found four gate issues, all fixed:

  • Aligned reconciliation spans: the deployment reconciliation counts committed rows between the counter readings' own scrape times (timestamp()); the check is committed plus the scrape-spread rows >= acknowledged. The old 120 s head start could hide a small loss.
  • Restart detection: restarts are detected with resets().
  • Dark processes: a process whose series vanishes fails its trends.
  • Unread divergences: an unreadable divergence table fails the gate.

The registry test now also asserts -1 for an unreadable descriptor directory and after a failed collection.

Review

Engineering practices checked:

  • EP-OBSERVABILITY: unknown is never zero, for the new gauge, every sample field and the gates. An empty connection read is a real zero.
  • EP-ERRORS: per-command timeout; a failed step fails the soak; restore and detached-partition reconciliation; the live-nightly loop runs every binary before failing.
  • EP-CONFIG: one server configuration per lifetime; looped workloads validated against it before start; the ensure interval reaches the frontends (asserted).
  • EP-VALIDATION: the soak block and the gates use deny_unknown_fields and bounded ranges.

🤖 Generated with Claude Code

…rness, a weekly 5.5 h soak and a deployment soak report (#575)

Issue #575 item 2. The longest automated run was about twelve minutes.

- qbit-prism-load --plan soak: a soak preset's `soak` block names checked-in
  presets whose workload flags are looped over the soak preset's own
  cluster and population for one server lifetime (no frontend restart or
  kill, no degraded-database phase; phases named c<cycle>.<preset>.<phase>).
  Every sample_seconds it samples each frontend's RSS, descriptors and
  threads, the database's connections per frontend, idle-in-transaction
  count, pg_wal size, share sequence, partition and relation sizes, and the
  ACK latency since the last sample. At rollover_minutes it advances the
  share sequence to just below its partition's bound so the live load
  crosses into the next partition, and every archive_every_minutes it runs
  the operator's share-archive seal, archive, verify, detach and drop under
  the load. At the end every partition that left the ledger is read back
  (dropped ones through share-archive restore, un-attached) and the run's
  exact reconciliation includes them.
- soak gates (soak.rs), shared by the harness gate and the deployment
  report: the slope of RSS's windowed peaks (a 400k-window block landing
  steps RSS by about 800 MiB, so per-sample fits fail healthy servers) and
  of descriptors after the warm-up, RSS within 2x the warm-up peak,
  per-client connection peak and drift, no connection idle in a transaction
  over 60 s, bounded pg_wal, minimum rollovers and archived partitions, one
  lifetime, no new payout divergence. Unknown readings fail, never pass.
- presets: soak-weekly (13 cycles of mainnet-shape-130-addresses,
  rental-churn-bursts-and-storms and tip-delivery = 5.5 h, 4 rollovers,
  retention every 10 min, schedule weekly, timeout 355 min), soak-short
  (19 min of tip-delivery, manual; the leak gate) and soak-smoke (the
  nightly opt-in gated test soak_smoke). Per PR, the gated soak_sampling
  test samples a fresh PRISM schema and its own process, forces a rollover
  and holds the samples to the gates in under a second.
- qbit-prism-soak-report: the same gates hourly over a live deployment from
  a Prometheus URL and a read-only database URL (flags or environment),
  writing a pass/fail Markdown report; acknowledged shares are checked
  against committed ledger rows. docs/prism-soak.md covers the gates, the
  weekly job and how to start a multi-day testnet4 soak.
- qbit-prism-server: a qbit_prism_process_open_fds gauge beside the RSS
  gauge (the server is non-dumpable, so no other process of its user can
  count its descriptors), and a test-only soak-leak-mutant feature that
  keeps 16 KiB per accepted share, which fails soak-short's RSS gate.
- prism-load-nightly.yml: a Saturday schedule whose plan selects `weekly`,
  its own concurrency group, and a live-nightly step that runs each listed
  package and binary (soak_smoke joins the live_regtest variants).
  prism_load_matrix.py gains `weekly`; check_e2e_scenarios.py the weekly
  lane; test/e2e-scenarios.toml the three soak scenarios; prism-load-run.sh
  appends the soak samples to the job summary.

Refs #575, #556

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@djh58
djh58 requested a review from kiwidream September 29, 2026 18:30
@blacksmith-sh

This comment has been minimized.

djh58 and others added 4 commits September 29, 2026 14:46
…nt counters, every churn phase gated, soak module split (#575)

Review of #588 (Refs #575, #556):

- A deployment soak's warm-up is now each lifetime's own: a server
  restarted after the warm-up warms up again, so the 2x warm-up-peak bound
  no longer reads unknown for the rest of the soak and the new lifetime's
  cold start is not fitted as a trend.
- qbit-prism-soak-report keeps a process's lifetime and its last counter
  reading from whichever earlier sample had them: a sample that could not
  read the counter neither starts a lifetime nor drops the stretch from
  the acknowledged count.
- Committed shares are counted interval by interval while each interval's
  rows are live, so a partition the operator's retention later removes
  cannot make committed < acknowledged.
- Every churn phase of a soak gets its own report (soak.churn_phases) and
  is held to the churn budgets; the churn section was only cycle 1's.
- soak.rs is split into soak/{mod,sample,evaluate,tests}.rs and evaluate()
  into one helper per gate group; soak_sampling samples only its own
  connections on the shard's shared database.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ciliation, dark processes and unread divergences fail, resets() restarts (#575)

An independent adversarial review of #588 (Refs #575, #556):

- qbit-prism-soak-report counted committed rows from 120 s before the
  counter baseline, a surplus that could hide a smaller loss. Both sides
  now cover the same span: the first reading is the baseline, and each
  sample adds the counters' growth and the accepted rows between the two
  readings' scrape times (timestamp(), the earliest among the processes).
  The check is committed plus the rows of the processes' scrape spread
  >= acknowledged; --scrape-slack-seconds is gone. A sample that cannot
  read the counters or the ledger advances neither side.
- A counter that reset since its last reading (resets()) is a restart even
  when the new process's count has already passed the old reading.
- A process whose series vanishes stays in the samples with every figure
  unknown, and a trend whose latest sample cannot read the process fails.
- The payout-divergence gate fails when any sample could not read the
  table, instead of passing or disappearing.
- The registry test asserts qbit_prism_process_open_fds reads -1 for an
  unreadable descriptor directory and after a failed collection (a
  mutant that drops it from the collector's invalidation now fails).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Resolves test/prism-nightly-gated-tests.txt: keeps the soak smoke id and #586's clock-jump and disk-exhaustion ids, sorted.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Brings in #590's real-node mode and resolves where it meets the soak:

- run.rs execute_with_preset: #590's node_mode and args rebinding first,
  then the soak plan over the rebound args.
- run.rs side report: #590's node_block, plus the soak entry.
- run.rs block scheduling: #590's rule (the tips plan lands its scheduled
  blocks in warm_up, every other plan in steady_state) is kept, on the
  phase's kind rather than its name, as holds_scheduled_blocks. A soak's
  c<cycle>.<preset>.<kind> phases therefore land their looped preset's
  blocks where that preset would, and each segment refreshes its block
  budget on the same rule. soak_plan asserts the weekly soak's 26 landings.
- launch_environment's map is bound mut for the soak's
  PRISM_SHARE_PARTITION_ENSURE_INTERVAL_SECONDS, inserted only when a soak
  runs; the fake-node frontend environment golden is unchanged.
- The soak presets pin --node fake, as #590 requires of every preset.
  --node qbitd refuses --plan soak by name: the looped segments are parsed
  from fake-node presets.
- The fake-node side report key golden gains the soak key.
- README preset table and test/prism-gated-tests.txt keep both sides,
  the gated list sorted.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@djh58

djh58 commented Sep 29, 2026

Copy link
Copy Markdown
Member Author

Review ledger: head f1b55b8 (CI green)

f1b55b8 is a signed merge of 3.x.x (#590 real-node mode, #591 and #594 Stratum fuzzing) into this branch, with no rebase or force-push. Its CI run is all green.

Reviews run

Round Findings Disposition
/code-review at medium effort (818e308) 4 All fixed. A deployment soak's warm-up is per lifetime. The reporter keeps lifetime and counter across a missed read. Committed rows are counted per interval while live, so retention cannot fake a loss. Every soak churn phase is reported (soak.churn_phases) and gated, not only cycle 1.
Independent adversarial review (ccd0b74) 5 All fixed. (1) The deployment reconciliation counts committed rows between the counter readings' own scrape times, and checks committed plus the scrape-spread rows >= acknowledged. The old 120 s head start could hide a small loss. (2) Restarts are detected with resets(). (3) A process whose series vanishes fails its trends. (4) An unreadable divergence table fails the gate. (5) The registry test asserts that qbit_prism_process_open_fds reads -1 for an unreadable descriptor directory and after a failed collection. The review cleared the gauge itself: its expiry, its invalidation, and unknown versus zero.

Merge resolutions (f1b55b8)

# Where Resolution
M1 execute_with_preset #590's node_mode and args rebinding come first, then the soak plan over the rebound args.
M2 side report #590's node_block, plus the soak entry.
M3 block scheduling #590's rule is kept: a tips plan lands its scheduled blocks in warm_up, every other plan in steady_state. It now matches the phase's kind rather than its name, as run::holds_scheduled_blocks. A soak's phases are named c<cycle>.<preset>.<kind>, so a name match would have scheduled no soak landings at all. Each soak segment refreshes its block budget on the same rule. soak_plan asserts the weekly soak's 26 landings: 2 per cycle, from mainnet-shape-130-addresses' steady_state. The name-matching mutant fails that assertion (left: 0, right: 26).
M4 launch_environment Bound mut, so the soak can insert PRISM_SHARE_PARTITION_ENSURE_INTERVAL_SECONDS, which it does only when a soak runs. #590's fake-node frontend-environment golden still passes unchanged.
M5 README preset table, test/prism-gated-tests.txt Both sides kept; the gated list is sorted.

Three further changes were needed for the merged tree to pass:

Leak proof (soak-short, local, PostgreSQL 16 with fsync on)

The healthy and leak-mutant (soak-leak-mutant, 16 KiB kept per accepted share) servers ran concurrently, pinned to 4 cores together.

RSS window-peak slope (bound 1536 MiB/h) vs warm-up peak (bound 2x)
healthy fe-0 / fe-1 +880 / +817 MiB/h, pass 1.35x / 1.38x, pass
leak fe-0 / fe-1 +4269 / +3945 MiB/h, FAIL 2.43x / 2.40x, FAIL

Both reconciled exactly, with flat descriptors (231) and 16 connections per frontend.

Weekly bounds: PROVISIONAL

The soak-weekly bounds after the first hour (warmup_minutes 60) are provisional until calibration run 36612534287 (a dispatched soak-weekly on this branch) finishes:

  • RSS: the slope of the per-window peaks, over 25.5 min windows with at least 6 of them, must stay at or below 16 MiB/h; RSS must stay within 2x the warm-up peak.
  • Descriptors: the slope must stay at or below 2 per hour.

A healthy server grows 0.6–0.9 GiB/h in its first 20 minutes as caches fill, so these bounds cannot be set from a short run. A follow-up adjusts them from that run's samples.

Verification of the merge (local)

  • fmt, and workspace clippy -D warnings, also with soak-leak-mutant.
  • qbit-prism-load lib, soak_plan, realism, and harness (136).
  • Gated soak_sampling, load_smoke, real_node and quorum_replication; check_gate_manifest over them: all 5 of the crate's gated tests executed.
  • check_e2e_scenarios, check_gate_env_reads, and the Python unit tests.
  • The nightly soak_smoke: 255 s, 2 rollovers, archived, restored and reconciled.

The merge adds no per-PR CI time: the new soak_plan assertions take under 0.1 s, and there is no new gated test. This PR's own per-PR cost is soak_sampling (0.5 s) plus one small test binary's compile (about 15–20 s in its shard).

🤖 Generated with Claude Code

@djh58

djh58 commented Sep 30, 2026

Copy link
Copy Markdown
Member Author

Calibration run: soak-weekly on 44d8426 (run 36612534287, 5.5 h)

The harness gate passes. The soak gates pass on everything except resident memory.

gate result
harness exit, exact reconciliation (restored archives included), zero shortfall in all 104 phases, tip budgets pass
partition rollovers 4 crossed (>= 3)
partitions archived, detached and dropped under load p0, p1, p2 (>= 2); 19 retention steps, no error
one server lifetime pass on both frontends
open descriptors flat at 233 on both
database connections peak 16 per frontend, drift +0.06 / 0.00
idle in transaction > 60 s 0
WAL peak 1040 MiB (<= 2048)
payout divergences 0
RSS window-peak slope after 1 h fe-0 +134 MiB/h, fe-1 +24 MiB/h (bound 16): FAIL
RSS vs warm-up peak fe-0 2.10x (bound 2x): FAIL; fe-1 1.16x

The RSS steps coincide with the preset's block landings (400k-window audit builds), not with rollover or retention.

  • fe-1 plateaus at about 3.3 GB after about 2 h.
  • fe-0 is still ratcheting at 5.5 h.

Both look like allocator high-water retention rather than a per-landing leak. Filed as #600 with the series and the open questions.

The bounds stay unchanged, and this PR merges as it is. A follow-up marks the weekly soak's RSS rows as an expected failure naming #600, so the job stays green while every other gate holds. They turn back into a real gate once #600 is resolved.

Brings in #596's run-load label, skip-unchanged guard, scheduled failure
notice and per-preset host fingerprint, and resolves where they meet the
soak's Saturday schedule:

- on: the three crons (nightly, Sunday live-weekly, Saturday soak) plus
  #596's pull_request labeled trigger.
- concurrency: a labelled PR run keeps #596's group per PR and label;
  every other run keeps the soak's split, prism-load-soak for the
  Saturday cron or a soak-weekly/weekly dispatch, prism-load-nightly
  otherwise.
- The skip-unchanged guard does not apply to the soak. Its comparison
  step runs only on the nightly cron, so on Saturday the guard job passes
  straight through to plan (which selects weekly), build and run. A soak
  measures drift over one server lifetime and its bounds are still being
  calibrated, so another lifetime on an unchanged commit is a second
  sample, not a repeat; and the tested-commit artifact the guard compares
  with records what the nightly presets ran, not the soak. The soak never
  records a tested commit (the report job's marker steps are nightly-only).
- report: a failed Saturday soak opens or comments on the
  prism-load-nightly-failure issue like any scheduled run, labelled
  "weekly soak" rather than "nightly".
- live-nightly keeps #588's per-binary loop, so soak_smoke still runs
  nightly, under #596's guard condition. Neither live job nor the fuzzing
  runs on the Saturday cron or on a labelled PR.
- prism-load-run.sh: #596's gate-exit-code and host.json summary beside
  the soak's soak-report sample table.
- README and docs/prism-soak.md: the skip and failure-notice wording
  covers both weekly schedules; the soak doc says why it is never skipped.

Job conditions after the merge:

  trigger          guard         plan/build/run      live-nightly  live-weekly  fuzz  report
  17 2 * * *       compares      nightly (unless     yes           -            yes   yes
                                 skipped)
  43 3 * * 0       -             -                   -             yes          -     yes
  41 5 * * 6       pass-through  weekly (soak)       -             -            -     yes
  dispatch         pass-through  inputs.preset       if live       if weekly    if    -
                                                                                fuzz
  run-load label   pass-through  nightly on the      -             -            -     -
                                 merge ref
  other label      -             -                   -             -            -     -

The soak's bounds are unchanged.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@djh58
djh58 merged commit 72efbcb into 3.x.x Sep 30, 2026
20 checks passed
Anatolie added a commit that referenced this pull request Sep 30, 2026
…596, #588, #597)

Adds #588's Saturday 5.5 h soak schedule and its live-nightly step that runs every listed test binary, so qbit-prism-load::soak_smoke runs beside the live_regtest variants, and #597's L6 shipped-images lane on the Sunday schedule. Byte-identical to 3.x.x at 1932cb3.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
djh58 added a commit that referenced this pull request Oct 1, 2026
… candidate backlog under load, nightly and weekly on the real node (#554) (#635)

* 3.x.x: fail the database over, fill its WAL volume and restart over a candidate backlog under load, nightly and weekly on the real node (#554)

The second half of #554's faults, in qbit-prism-load's `faults` phase. Each
is injected while the sessions keep mining and held to its criteria on top
of the run's own reconciliation. No server code changes.

- primary-kill: a barrier shows the standby flushed the primary's position,
  replication is cut, the primary keeps acknowledging for `cut` s and is
  stopped immediately, and the async standby is promoted. Every acknowledged
  share the new primary lacks is listed; none may predate the barrier, and
  each must be absent from what the standby had received.
- primary-switch: writers fenced, the standby replays through the old
  primary's flush position, then the switch. Nothing may be lost.
- block-failover: the relay holds a found block's submitblock while
  replication is cut and the primary stopped. With #529's standby wait on,
  the reservation must be on the promoted primary, and the block must reach
  the node once and land within 30 s of the promotion (#585).
- wal-disk-full: #575's DiskFullInjector fills the primary's pg_wal volume
  until PostgreSQL stops, then frees it. Nothing acknowledged may be lost or
  acknowledged while it is down. The frontends must serve again without a
  restart, and every /metrics must show #575's paging condition.
- candidate-backlog: the relay answers submitblock with qbitd's warmup error
  (#526) while found blocks pile up, every frontend is restarted, the relay
  heals. Every backlog row must reach a terminal state, and none may reach
  the node twice.

For these, the managed cluster streams its standby through a replication
link the harness can cut. Every writer (the frontends and the harness's side
pool) reaches the primary through a writer endpoint, and the public reader
reaches the standby through a read endpoint. A promotion moves the endpoints
and rebuilds the standby; nothing is restarted. The run excuses, from its
durability finding, only the acknowledged shares a failover's verdict proves
lie in the replication gap.

faults-short-real-node (nightly) gains every new fault but the full WAL
volume. faults-long-real-node (weekly, #588's Saturday selection, 16 vCPU)
runs all twelve with 2,000 sessions. faults-failover-fake-node runs the five
on dispatch. No per-PR test is added.

Refs #554

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* 3.x.x: install fuse2fs in the load-run job for a preset that fills the WAL volume (#554)

faults-long-real-node, on the Saturday `weekly` selection beside the soak,
and faults-failover-fake-node, on dispatch, run #554's wal-disk-full fault.
That fault mounts the primary's pg_wal on a small ext4 image with fuse2fs,
without root, as #575's disk-full scenario does. The run job now installs
fuse2fs and fuse3 when the preset's --faults lists wal-disk-full, and the
header and the dispatch input name the new weekly preset and its cost.

Refs #554

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* 3.x.x: close the #554 fault checks review found could pass or flake, and finish an abandoned failover (#554)

Review of #635 (/code-review medium, a quality review and an adversarial
review) found checks that could pass without proving their claim, a flake,
and a cleanup gap. No server code changes.

- candidate-backlog passed even if every backlog row was abandoned at the
  relaunch. It now requires one backlog block to land, offered once.
- block-failover took its barrier before waiting up to 30 s for the found
  block, so that whole window counted as the replication gap. The barrier
  is now taken after the held call arrives, just before the cut. The held
  call goes to the node within 800 ms of arriving, inside the frontend's
  1 s submitblock deadline, however long the stop takes.
- wal-disk-full now starts its down intervals and its outcome-unknown
  window at the fill's start, so a PANIC during the fill is counted. An
  acknowledgement inside a down interval fails the check only when its
  share is absent from PostgreSQL, since a late answer to an earlier
  commit is not a lie.
- An abandoned failover waits for its in-flight stop or promotion, promotes
  once, heals a cut link and moves the writer endpoint, so the run's end
  still finds a primary.
- The gap key's constant is renamed to match its value; the frozen set's
  lookback is named and leaves re-offers out; a unit test pins the backlog's
  unfinished states to the server's CandidateState::UNFINISHED_SQL.

Refs #554

Co-Authored-By: Claude Opus 5.5 <[email protected]>

---------

Co-authored-by: Claude Opus 5.5 <[email protected]>
Anatolie added a commit that referenced this pull request Oct 16, 2026
 (#590, #596, #588, #597, #552, #551, #553, #554) (#601)

* main: sync the PRISM load-harness nightly workflow from 3.x.x (#590, #596)

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* main: sync the PRISM load-harness nightly workflow from 3.x.x (#590, #596, #588, #597)

Adds #588's Saturday 5.5 h soak schedule and its live-nightly step that runs every listed test binary, so qbit-prism-load::soak_smoke runs beside the live_regtest variants, and #597's L6 shipped-images lane on the Sunday schedule. Byte-identical to 3.x.x at 1932cb3.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* main: re-sync the PRISM load-harness nightly workflow from 3.x.x (#552, #551, #553, #554, #582)

The file is 3.x.x's copy byte for byte again, as of 3.x.x c95febb; the
last change to it there is bd1ddeb (#663). Since 1932cb3 (#597), five
3.x.x changes landed in it:

- #552 (#613): the `bridging` job runs the short plan on the fake and
  the real node on one runner, nightly, on the run-load label and on a
  dispatch with the new `bridging` input.
- #551 (#606): every preset job builds a trend row; on a schedule the
  `evidence` job (the one job with `contents: write`) appends the rows to
  the orphan `ci-evidence` branch, applies the report-only regression
  rule, promotes the soak's and flagged runs' bundles to the rolling
  `ci-evidence/YYYY-MM` pre-release, and keeps one
  `prism-load-regression` issue. PR and dispatch runs get the read-only
  `evidence-preview` instead.
- #553 (#618): the live nightly and weekly lists gain the chain-event
  scenarios under 2,000 sessions; the workflow's comments say so.
- #554 (#635): the run job installs fuse2fs and fuse3 for a preset whose
  faults fill the WAL volume (faults-long-real-node, Saturday).
- #582 (#663): comment only.

Without this, main's scheduled copy (#595) still has no qbitd install
step, so every `--node qbitd` preset fails with "--node qbitd needs
--qbitd-bin or QBITD_BIN" (scheduled runs 37188928798 and 37287515779).

Co-Authored-By: Claude Opus 5.5 <[email protected]>

---------

Co-authored-by: Claude Opus 5.5 <[email protected]>
Co-authored-by: Robert Clarke <[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