|
| 1 | +# ADR-086: Stop owned test workloads on terminal Aspire failure |
| 2 | + |
| 3 | +Status: Accepted implementation contract; native qualification pending. |
| 4 | +Date: 2026-10-04. Related: REQ/AC-TEST-012..014, ADR-074, ADR-085. |
| 5 | + |
| 6 | +## Decision |
| 7 | + |
| 8 | +Use actual Aspire resource notifications and host stopping cancellation, rather |
| 9 | +than parsing CLI warning text. The disabled dashboard is optional infrastructure |
| 10 | +and cannot determine the test outcome. Original CI37202347856 reports show |
| 11 | +completed native tests with business failures, not a proven AppHost crash. |
| 12 | + |
| 13 | +Register observation before starting the owned application. Race native runner |
| 14 | +completion against the required dependency failure notifications. FailedToStart, |
| 15 | +RuntimeUnhealthy, Finished, Exited or an exit code end a runner wait; an absent |
| 16 | +original exit status is an error. Required long-lived dependencies cannot exit |
| 17 | +successfully during measurement. Derive dependencies from actual WaitAnnotations, |
| 18 | +following their graph once per resource, with bounded tasks proportional to the |
| 19 | +existing fixed topology. Expected WaitForCompletion exits remain valid, while |
| 20 | +wrong or missing exits fail. HealthStatus.Unhealthy by itself is not a terminal |
| 21 | +failure. Preserve native exit codes and fail before the full deadline. |
| 22 | + |
| 23 | +Cancel and join every owned observer on success, failure or cancellation. Observe |
| 24 | +startup concurrently with failure so a resource failure also cancels pending |
| 25 | +startup. Retain the initiating exception rather than replacing it with sibling |
| 26 | +cancellation. Existing stop/dispose and bounded diagnostic retention remain the |
| 27 | +owner's finally responsibility. No detached task or new timeout increase. |
| 28 | + |
| 29 | +Startup readiness for the shared RF3 fixture explicitly uses native |
| 30 | +StopOnResourceUnavailable and cancels/joins other startup waits when one fails. |
| 31 | +This startup guard ends at initial readiness. Continuous comparison guards end |
| 32 | +at runner completion, before intentional node loss/restart regression scenarios. |
| 33 | +Explicit WaitOnResourceUnavailable restart paths stay unchanged. Independent |
| 34 | +database jobs continue their own workloads after another database fails. |
| 35 | + |
| 36 | +## Implementation and verification |
| 37 | + |
| 38 | +1. Root owns requirements, this ADR, shared integration and Git delivery. |
| 39 | +2. progress_runner owns only new AppHost Features/TestInfrastructure native |
| 40 | + lifecycle helpers and new ComparisonTests Features/TestInfrastructure tests. |
| 41 | + Genuine Aspire notifications cover terminal/missing-exit, live dependency |
| 42 | + failure, successful/failed bootstrap, no dependencies, cancellation and task |
| 43 | + settlement. Native failures settle within five seconds of event publication. |
| 44 | +3. Root joins TestSuiteApplication, IsolatedNativeCase and shared ClusterFixture |
| 45 | + startup, with any necessary test friend visibility. vector_runtime reviews |
| 46 | + required resources and planned fault boundaries read-only. Concurrent engine |
| 47 | + CQRS/upgrade code and its dedicated wave fixtures remain with their owner. |
| 48 | +4. Build/format/governance and focused TUnit tests through the canonical Aspire |
| 49 | + entry, then retain exact-source Linux CI reports. Full unit/scalar/recovery/RF3 |
| 50 | + and native benchmark qualification remain required; unrelated failures are |
| 51 | + reported honestly. Source/native service tests do not prove a Docker crash |
| 52 | + was exercised. A real failure artifact supplies environmental-path evidence. |
| 53 | + |
| 54 | +Graph: CONTRACT -> NATIVE HELPERS/TESTS -> JOINS -> REVIEW -> EVIDENCE. |
| 55 | +Acceptance mapping is in TestInfrastructure. No production contract, package, |
| 56 | +data-format or topology migration. Rollback reverts only these lifecycle joins |
| 57 | +and helpers; the canonical Aspire entry and existing outcomes remain required. |
| 58 | +Frontend N/A: developer and CI lifecycle only. |
| 59 | + |
| 60 | +```mermaid |
| 61 | +flowchart LR |
| 62 | + Start[Owned AppHost start] --> Race[Native runner and required resources] |
| 63 | + Race --> Exit[Original runner exit] |
| 64 | + Race --> Failure[Terminal required resource failure] |
| 65 | + Exit --> Join[Cancel and join observers] |
| 66 | + Failure --> Join |
| 67 | + Join --> Evidence[Original failure and diagnostics] |
| 68 | + Evidence --> Cleanup[Stop and dispose owned resources] |
| 69 | +``` |
0 commit comments