Repository navigation
test(tracker): [#1419] stop the integration fixture with the final production shutdown API - #2971
Merged
josecelano merged 7 commits intoNov 20, 2026
Conversation
…n per component Co-Authored-By: Claude Fable 5.2 <[email protected]>
…uite so it proves the configured deadline Co-Authored-By: Claude Fable 5.2 <[email protected]>
…f PR 2961 Co-Authored-By: Claude Fable 5.2 <[email protected]>
…inal production shutdown API The fixture called JobManager::cancel() itself, waited with its own fixed 10 seconds and discarded the component outcomes. It now calls app::begin_shutdown in shutdown(), restart() and Drop, waits with the configured [application.shutdown] deadline, and panics when a component did not stop gracefully, naming the components. Co-Authored-By: Claude Fable 5.2 <[email protected]>
… when a component does not stop A new target, lifecycle-fixture-shutdown-assertion, adds a component that never stops through a new fixture method and requires that shutdown() panics naming it within a bound that only the configured deadline can meet. The spec records the prose-first Arrange-Act-Assert review of the test. Co-Authored-By: Claude Fable 5.2 <[email protected]>
Co-Authored-By: Claude Fable 5.2 <[email protected]>
… in the test guide Co-Authored-By: Claude Fable 5.2 <[email protected]>
josecelano-bot
temporarily deployed
to
coverage
November 19, 2026 19:16 — with
GitHub Actions
Inactive
Member
|
ACK f2cabbf |
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues remain for the production-aligned shutdown fixture changes.
No open issues 🎉
What changed in this PR
Aligns the main-application integration fixture with the final production shutdown API, completing R8 and AC8a of issue #1419. Production code remains unchanged; the issue’s closure review remains a separate follow-up.
Changes:
- Uses production shutdown initiation, the configured deadline, and graceful-outcome assertions for fixture shutdown and restart.
- Adds a negative integration test requiring a panic naming a hung component within six seconds.
- Updates fixture documentation, records validation evidence, and carries forward the final review fixes from PR #2961.
| File | Description |
|---|---|
tests/scaffold.rs |
Documents production-aligned shutdown and failure assertions. |
tests/lifecycle/fixture_shutdown_assertion.rs |
Tests hung-component reporting and the configured shutdown deadline. |
tests/common/workspace.rs |
Centralizes graceful shutdown and adds component injection for tests. |
tests/AGENTS.md |
Updates fixture lifecycle guidance and the test inventory. |
docs/pr-reviews/pr-2961-review/PR-REVIEW.md |
Records the final review round and its resolutions. |
docs/issues/open/1419-allow-multiple-integration-tests-at-main-app-level/ISSUE.md |
Marks R8 and AC8a complete and records test evidence. |
docs/issues/open/1419-allow-multiple-integration-tests-at-main-app-level/completion-plan.md |
Labels the earlier plan as historical and links the current shutdown work. |
Cargo.toml |
Registers the new shutdown-assertion integration test target. |
Review effort: Balanced
Contributor
|
Post-merge note: this pull request requested a review from this account and was closed without one at its final head. A post-merge review will not be done: All 116 executable lines it added are tests, benchmarks or test support with no production behaviour, and 116 of them are still present. |
This branch was previously deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Completes task R8 and acceptance criterion AC8a of issue 1419 (sub-issue order 5 of EPIC 2392, Test isolation). The main-app integration fixture now stops the tracker with the final production shutdown API that EPIC 1488 delivered, and it checks the result. The plan and the maintainer's decisions D1 to D5 were merged with pull request 2961.
Related to #1419
The issue stays open: R9 (the closure review and the move of the specification to
docs/issues/closed/) follows in its own pull request after this one merges.What changed
tests/common/workspace.rs(TrackerApplicationFixture):shutdown()andrestart()callapp::begin_shutdowninstead ofJobManager::cancel()(D1), wait with the configured[application.shutdown]deadline instead of a fixed 10 seconds (D2), and panic when a component did not stop gracefully, naming the components (D3). One private helper,stop_gracefully, holds the sequence.Dropcallsapp::begin_shutdown(D5). It still cannot await or check outcomes.spawn_component, which adds one extra component to the running application through the publicJobManager::reserveandJobManager::spawn.New target
lifecycle-fixture-shutdown-assertion(tests/lifecycle/fixture_shutdown_assertion.rs, one[[test]]entry in the rootCargo.toml) (D4): it adds a component that never stops to a tracker with a 3-second shutdown deadline and requires thatshutdown()panics naming it within 6 seconds. The bound makes the test fail if the fixture ignores the configured deadline.No production code changes. No existing suite changes its call site.
Documentation:
tests/AGENTS.md, the module documentation oftests/scaffold.rs, and the status line ofcompletion-plan.mddescribe the new sequence.ISSUE.mdrecords the prose-first review of the new test, the evidence E1 to E5, AC8a as met and R8 as done.Carried over from pull request 2961
That pull request was merged while the fixes of its last review round (findings F10 and F11 of review 5981075592) were being pushed, so they are the first three commits here: the wording of the D5 line, the bound on the elapsed time in the plan (F10, which the new test implements), and round 4 of the review audit
docs/pr-reviews/pr-2961-review/PR-REVIEW.md.Validation
Toolchain:
rustc 1.100.0,cargo 1.100.0,devprofile, Linux x86_64; the pre-commit gate also uses the nightly Rust toolchain for its formatting step.cargo testinvocation; each test finished in 0.11 to 2.05 seconds, so no component consumed the 25-second deadline.cargo test --test metrics-port-zero -- --nocaptureand-- --test-threads=1pass (1.04 and 1.05 seconds).cargo test --test lifecycle-fixture-shutdown-assertionpasses in 3.03 seconds; the panic nameshealth_check_apiandhung_component.cargo machete,linter all, documentation tests).🤖 Generated with Claude Code