Skip to content

test(soak): gate worker memory growth and add an opt-in completion stall (0.6) - #694

Merged
hardbyte merged 4 commits into
release/0.6.6from
brian/soak-memory-gate-0.6
Nov 13, 2026
Merged

hardbyte merged 4 commits into
release/0.6.6from
brian/soak-memory-gate-0.6

Conversation

@hardbyte

@hardbyte hardbyte commented Nov 8, 2026 •

Copy link
Copy Markdown
Owner

Summary

The persona soak now records the resident memory of the soak process, which hosts every Rust runtime, into memory.csv with the executions so far and the size of the harness ledger. After a warm-up, the least-squares slope of resident memory over executions must stay under 64 MiB per 100k executions, or the run fails with memory_growth.

The harness ledger also grows with every enqueued job, so when the runtimes fall behind the producers (more than 1.25 jobs enqueued per execution after the warm-up) the slope is reported as not evaluated rather than failed. Without this, a host short of CPU failed the gate on harness growth alone.

AWA_SOAK_COMPLETION_STALL_SECONDS (off by default) holds the queue-storage completion tables halfway through the load while claims and handlers carry on. Resident memory may rise by at most AWA_SOAK_COMPLETION_STALL_MEMORY_MIB (default 128) over the stall, or the run fails with memory_growth_under_stall. A stall that was requested but never held also fails the run.

Stall phase status

#686 was closed unmerged, but the same finalization bound reached release/0.6.6 in 0.6.15 (23ff5bb; CHANGELOG "Worker finalization is bounded…"). It has not been shown to keep the stall gate green: on a 4-CPU host under heavy load, two 480 s soaks with a 120 s stall on the current branch rose 424 MiB (Rust personas with chaos and the bursty producer) and 185 MiB (mia, tom, sam, alex, fanout), both over the 128 MiB limit. The stall phase therefore stays off by default and should not be turned on in a release gate until it passes on a representative host.

Testing

  • cargo fmt, cargo clippy -p awa --all-targets --all-features -D warnings clean.
  • persona_soak_test unit tests: 68 passed against PostgreSQL 18.
  • Earlier runs on PG17 before the merge of release/0.6.6: no stall, memory_growth pass at +30 MiB; 120 s stall on the branch before the finalization bound, +845 MiB.

…all (0.6)

The persona soak samples the resident memory of the soak process into memory.csv and fails with memory_growth when the least-squares slope of resident memory over executions, after the warm-up, exceeds AWA_SOAK_MEMORY_SLOPE_MIB_PER_100K (default 64 MiB per 100k executions).

AWA_SOAK_COMPLETION_STALL_SECONDS holds the queue-storage completion tables halfway through the load while claims and handlers continue; memory_growth_under_stall fails when resident memory rises by more than AWA_SOAK_COMPLETION_STALL_MEMORY_MIB over the stall. Off by default.
@coderabbitai

coderabbitai Bot commented Nov 8, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

…emory-gate-0.6

# Conflicts:
#	awa/tests/persona_soak/config.rs
#	awa/tests/persona_soak/mod.rs
A stall that could not take its locks, or a run without a queue-storage schema, left memory_growth_under_stall unevaluated and the run passing.
…roducers

The soak process also holds the harness ledger, which grows with every enqueued job. On a host that cannot keep up, that growth landed on few executions and failed memory_growth with no leak in the runtime. The slope is now reported as not evaluated when more than 1.25 jobs were enqueued per execution after the warm-up, and memory.csv records the ledger size.
@hardbyte
hardbyte marked this pull request as ready for review November 13, 2026 02:01
@hardbyte
hardbyte merged commit 9665adf into release/0.6.6 Nov 13, 2026
15 checks passed
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-13T02:02:12.222956Z b0cc157 Draft marked ready
ℹ️ 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.

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