Skip to content

Tests: per-test live budget pool instead of the shared 500 MB one - #742

Closed
xbmc4lyfe wants to merge 2 commits into
mainfrom
private-pool-lifecycle
Closed

xbmc4lyfe wants to merge 2 commits into
mainfrom
private-pool-lifecycle

Conversation

@xbmc4lyfe

Copy link
Copy Markdown
Collaborator

Follow-up to #741: cargo test live_ at full parallelism failed with StreamingMemoryLimit ("shared live PAR reservation") in tens of tests.

Cause

  • parchecker::live_lifecycle_tests start sessions on the process-wide 500 MB LIVE_BUDGET (67 MB each), so more than seven at once exhaust it.
  • articledl::tests::exhausted_live_par_budget_does_not_block_an_ordinary_article_write deliberately drains the whole shared pool, starving every other live test (capture, artwritercore, articledl, parlive write tests) while it runs. Its name contains live_, so it ran in the same filter.

Change (test-only behaviour; production still uses LIVE_BUDGET)

  • parlive::live_pool() returns the shared pool, or in a test the pool installed for that thread (parchecker::TEST_BUDGET_POOL, a cfg(test) thread-local).
  • acquire_session_budget and reserve_control draw from live_pool().
  • The lifecycle Fixture installs a private 500 MB pool per test (cleared on drop); the draining test drains its own pool of the effective size.

Evidence

  • Before (x86_64, 32 cores, live_ filter, 40 runs): 40 of 40 runs failed, with 965 lifecycle failures in total plus capture, artwritercore, articledl and parlive failures. Moving only the lifecycle tests left the draining test's victims failing (37 of 40 runs).
  • After (same, 40 runs): 0 failures.
  • Farm on exact head 54ac359 (Actions unavailable):
x86_64: cargo_exit=0 (cargo test --tests on rustyget-x86-d, 12 test threads, 121s); daemon_exit=0 (45s); 1 / 1 scenarios passed (complementary)
arm64:  cargo_exit=0 (cargo test --tests on rustyget-arm-c, 12 test threads, 151s); daemon_exit=0 (45s); 1 / 1 scenarios passed

Deployment

Test-only change, no deployable artifact: no 6790 deploy applies.

🤖 Generated with Claude Code

https://claude.ai/code/session_01LG44gYUGuwLMB2hw7HQGbM

…the shared 500 MB one

live_lifecycle_tests started sessions on the process-wide LIVE_BUDGET (67 MB each), and
exhausted_live_par_budget_does_not_block_an_ordinary_article_write drained all of it, so
'cargo test live_' at full parallelism failed with StreamingMemoryLimit in tens of tests
(lifecycle, capture, artwritercore, articledl, parlive). parlive::live_pool() now honours a
test thread's own pool (parchecker::TEST_BUDGET_POOL, installed by the lifecycle Fixture and
by the draining test). Test-only; production still uses LIVE_BUDGET.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LG44gYUGuwLMB2hw7HQGbM
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 27, 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-27T01:25:18.704958Z 54ac359 PR opened
ℹ️ 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.

xbmc4lyfe added a commit that referenced this pull request Nov 27, 2026
…the shared 500 MB one (#742)

live_lifecycle_tests started sessions on the process-wide LIVE_BUDGET (67 MB each), and two
tests drained all of it (exhausted_live_par_budget_does_not_block_an_ordinary_article_write,
exhausted_live_budget_does_not_bypass_a_foreign_certified_source), so 'cargo test live_' at
full parallelism failed with StreamingMemoryLimit in tens of tests. parlive::live_pool() now
honours a test thread's own pool (parchecker::TEST_BUDGET_POOL). Test-only; production still
uses LIVE_BUDGET. Farm e4ed39e (same tree): x86_64 and arm64 cargo 0 / daemon 0; live_ x40
at 32 cores: 0 failures (before: 40 of 40).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LG44gYUGuwLMB2hw7HQGbM
@xbmc4lyfe

Copy link
Copy Markdown
Collaborator Author

Landed as signed squash commit 80c3fcd on main (same tree as reviewed head e4ed39e: G2G, farm x86_64 + arm64 cargo 0 / daemon 0). Test-only, no deploy.

@xbmc4lyfe xbmc4lyfe closed this Nov 27, 2026
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