Skip to content

test(app-server): widen the default test startup budget - #2231

Merged
eric8810 merged 1 commit into
mainfrom
dim/2230-startup-budget
Nov 26, 2026
Merged

eric8810 merged 1 commit into
mainfrom
dim/2230-startup-budget

Conversation

@eric8810

Copy link
Copy Markdown
Collaborator

Summary

Two CI failures reported startup timeouts in tests that do not test the startup deadline:

  • 8 transport_flow tests (mcp_import::*, product_protocol::mcp_*) panicked in launch_with after the default 10 s ServerConfig::startup_timeout.
  • agents::sessions::tests::exists_answers_loaded_unloaded_closed_and_deleted hit the same timeout.

The default 10 s budget measures the runner when the whole suite is loaded. transport_flow::launch_inner now raises the budget to 30 s only when the test left the default in place; tests that set 1 s, 2 s or 50 ms for deadline behavior keep their values. The one agents::sessions case gets the same 30 s test budget. The product default is unchanged.

Fixes #2230. Part of #2217.

Design rule checklist

  • Scope: n/a — test-only change; no part, state or lifecycle.
  • Commands and results: n/a — no module state changes.
  • Handover: n/a — no handover points.
  • Timeline before callbacks: n/a — no Timeline writes.
  • Infrastructure: n/a — Timeline, Dispatcher, assembly and facades unchanged.
  • Core mechanisms: n/a — no plugin-specific handling.
  • Batch: n/a — no facts are written.
  • Context: n/a — no context inputs.
  • No reading another plugin's internal state: n/a.
  • Cross-language faces: n/a — no service or face changes.
  • Business configuration: n/a — no loader rows.
  • Missing mechanism capabilities: n/a.
  • Timeline facts: n/a.

Documentation

  • No accepted ADR is modified or deleted.
  • No other module's design is changed.
  • No delivery status is added to an ADR, index or roadmap.

Verification

  • transport_flow mcp_import:: — 16 passed.
  • transport_flow product_protocol::mcp_ — 11 passed.
  • agents::sessions::tests::exists_answers_loaded_unloaded_closed_and_deleted — passed.
  • process_startup_timeout_names_the_rows_that_are_not_active — passed in 2.02 s, so the 2 s test still uses its own bound.
  • cargo clippy --locked -p dim-app-server --tests -- -D warnings — passed.
  • cargo fmt --all -- --check — passed.

@eric8810
eric8810 marked this pull request as ready for review November 26, 2026 10:23
@eric8810

Copy link
Copy Markdown
Collaborator Author

Marked ready for review. This is the test-only startup budget that unblocks the 8 transport_flow and agents::sessions timeouts in #2229; explicit 1 s/2 s/50 ms deadline tests keep their bounds.

@Simon-He95 Simon-He95 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed at 65c225a0. Test-only; the product startup_timeout default stays 10 s. launch_inner raises the budget only when the caller left ServerConfig::default, and the deadline cases keep their explicit 1 s / 2 s / 500 ms bounds (transport_flow.rs:582, :690, :722, :750, :771), so process_startup_timeout_* still exercises the deadline. The agents::sessions case sets its own 30 s. CI is green at this head. LGTM.

@zerob13 zerob13 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved at 65c225a00e2c54be043de592d52570639ca6c7c8.

The larger startup allowance applies only to test setup. The product default stays at 10 seconds, and the existing short, explicitly bounded deadline tests retain their own limits. Exact checkout CI passed Linux, selected macOS and ci-ok, including the affected existence, MCP and explicit deadline cases; Windows was not selected. This verifies the affected tests on that run, not the root cause of the earlier SQLite stall. Nonblocking: a future test explicitly exercising the product's exact 10-second default should bypass the helper's equality-based override.

@eric8810
eric8810 merged commit 3a8113c into main Nov 26, 2026
@eric8810
eric8810 deleted the dim/2230-startup-budget branch November 26, 2026 10:34
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(app-server): give test assembly a load-tolerant startup budget

3 participants