Skip to content

test(session-runtime): keep fake summarizer under default budget - #4521

Merged
ScriptedAlchemy merged 2 commits into
renovate/modelcontextprotocol-client-2.x-lockfilefrom
fix/lcm-summary-frontier-test-flake
Oct 25, 2026
Merged

ScriptedAlchemy merged 2 commits into
renovate/modelcontextprotocol-client-2.x-lockfilefrom
fix/lcm-summary-frontier-test-flake

Conversation

@ScriptedAlchemy

@ScriptedAlchemy ScriptedAlchemy commented Oct 24, 2026 •

Copy link
Copy Markdown
Owner

Stack order (merge first → last): #4473 → #4478 → #4521 → #4526 → #4515 → #4510 → #4516 → #4524 → #4489 → #4488 → #4485

This PR is layer 3/11, based on #4478. Next: #4526.

Merge bottom to top using merge commits. After each parent merges, retarget its child to master before merging the child; this preserves the ancestry already integrated and avoids reintroducing conflicts.

Fixes #4518

Problem. lcm_effects::tests::refresh_begins_at_the_committed_frontier_after_background_summaries_publish fails intermittently on loaded runners with timed out waiting for background summaries to publish.

Root cause. Not a production ordering bug. The test pinned its fake cursor-agent script with timeout_secs = 5, the smallest admitted value. Under load the /bin/sh child is starved for more than 5 s, the provider kills it, and the convergence queue parks the session as unavailable / cursor_agent_unavailable. That state is only requeued when the summarizer binding changes, so the 30 s poll can never see a summary node. I confirmed this by dumping the queue row and the provider error on timeout (timed out waiting for .../cursor-agent) in every failing run.

Fix. The test no longer sets the 5 s provider budget, so the provider default applies and scheduling delay cannot kill the stand-in. The same pin in parked_sessions_converge_once_the_summarizer_becomes_available_without_restart had the same exposure and gets the same change. No poll timeout was raised and no assertion changed.

Verification. Test binary run directly, 150 concurrent copies at a time on an 18-core machine, --exact with the full path (1 passed confirmed):

failures
before 187/300, then 113/150
after 0/150, 0/300

At 300 concurrent copies each run takes 80 to 100 s and any timed wait fails, with or without this change, so that load is not meaningful.

bazel test //crates/tracedecay-session-runtime:unit_test passes and bazel build --config=clippy //crates/tracedecay-session-runtime/... is clean.

🤖 Generated with Claude Code

@changeset-bot

changeset-bot Bot commented Oct 24, 2026 •

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 37cd045

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

The fake cursor-agent in the LCM effects tests ran under a 5 s provider
timeout, the smallest admitted value. On a loaded runner the /bin/sh child
is starved past 5 s, the provider kills it, and the session is parked as
cursor_agent_unavailable until the summarizer binding changes. The test then
waits out its 30 s poll for summaries that can never publish.

Use the provider default budget so the stand-in is not killed by scheduling
delay. The polling waits are unchanged.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@ScriptedAlchemy
ScriptedAlchemy force-pushed the fix/lcm-summary-frontier-test-flake branch from 671af53 to 1a151ef Compare October 24, 2026 23:23
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.

test flake: refresh_begins_at_the_committed_frontier_after_background_summaries_publish times out under load

1 participant