Summary
Dynamo already has change-based CI routing, test markers, domain-specific wait helpers, retries, and result artifacts. These mechanisms solve local problems, but do not share one reliability contract across E2E and integration suites.
This DEP proposes four common contracts:
- wait for observable invariants instead of assuming scheduling order;
- classify failures and allow only explicit, bounded retries;
- capture failure-time evidence before destructive teardown;
- publish comparable quality and capacity records.
Subsystems keep their domain-specific helpers. Adoption is incremental, starting with one deployment and one non-deployment pilot.
Motivation
Recent CI fixes repeatedly addressed the same underlying gaps: tests observed availability before the required state had converged; transport failures and contract failures were reported similarly; cleanup removed short-lived evidence; and existing metrics did not provide one view of first-attempt reliability, failure class, diagnostic completeness, queue time, and GPU cost.
The goal is not another universal test framework. It is a consistent lifecycle for how test harnesses wait, fail, diagnose, clean up, and report results.
Overview

Proposal
1. Invariant-based convergence
Define common sync and async waiting behavior: monotonic deadlines, bounded polling, optional stability windows, explicit transient observation errors, last observation retention, and timeout evidence hooks. Domain modules continue to provide helpers such as wait_for_dgd_ready or wait_for_router_topology.
2. Failure taxonomy and retry envelope
Record failure phase, failure class, and retry scope separately. Any retry must declare its operation, safety assumption, maximum attempts, first failure, and final result. Generic infrastructure recovery must not retry contract violations.
3. Evidence before teardown
A harness that owns destructive cleanup must first capture a bounded, allowlisted failure snapshot. Evidence collection is best effort and never replaces the primary exception. Workflow-level cluster dumps remain a fallback.
4. Quality and capacity telemetry
Applicable suites emit a backend-neutral result record containing timing, requested resources, first and final outcomes, retry information, failure class, evidence status, and cleanup result. Existing JUnit, Datadog, Allure, or OpenSearch-based systems may consume it.
Expected outcomes
- fewer timing failures caused by checking state before convergence;
- faster triage from consistent failure-time evidence;
- recovered retries remain visible instead of looking like clean passes;
- comparable reliability, queue-time, and requested GPU-time data by suite;
- shared behavior without erasing subsystem-specific test semantics.
Non-goals
- Redesign changed-file filters, pytest markers, or CI test tiers.
- Decide a particular compatibility, backend, or topology matrix.
- Replace domain-specific readiness and diagnostic helpers.
- Automatically retry all failures or ban every fixed delay.
- Require a particular metrics vendor.
Detailed design
The issue body remains the stable overview. Ordered comments cover:
- invariant-based convergence;
- failure taxonomy and retry semantics;
- pre-teardown evidence;
- quality and capacity metrics;
- incremental implementation.
Decisions requested
- Are these four contracts the right common boundary?
- Which deployment and non-deployment paths should be the pilots?
- What evidence allowlist, retention, and sanitization rules are required?
- Which existing telemetry sink and team should own the durable view?
- Is incremental adoption sufficient, or does any existing test class need a migration deadline?
References
Summary
Dynamo already has change-based CI routing, test markers, domain-specific wait helpers, retries, and result artifacts. These mechanisms solve local problems, but do not share one reliability contract across E2E and integration suites.
This DEP proposes four common contracts:
Subsystems keep their domain-specific helpers. Adoption is incremental, starting with one deployment and one non-deployment pilot.
Motivation
Recent CI fixes repeatedly addressed the same underlying gaps: tests observed availability before the required state had converged; transport failures and contract failures were reported similarly; cleanup removed short-lived evidence; and existing metrics did not provide one view of first-attempt reliability, failure class, diagnostic completeness, queue time, and GPU cost.
The goal is not another universal test framework. It is a consistent lifecycle for how test harnesses wait, fail, diagnose, clean up, and report results.
Overview
Proposal
1. Invariant-based convergence
Define common sync and async waiting behavior: monotonic deadlines, bounded polling, optional stability windows, explicit transient observation errors, last observation retention, and timeout evidence hooks. Domain modules continue to provide helpers such as
wait_for_dgd_readyorwait_for_router_topology.2. Failure taxonomy and retry envelope
Record failure phase, failure class, and retry scope separately. Any retry must declare its operation, safety assumption, maximum attempts, first failure, and final result. Generic infrastructure recovery must not retry contract violations.
3. Evidence before teardown
A harness that owns destructive cleanup must first capture a bounded, allowlisted failure snapshot. Evidence collection is best effort and never replaces the primary exception. Workflow-level cluster dumps remain a fallback.
4. Quality and capacity telemetry
Applicable suites emit a backend-neutral result record containing timing, requested resources, first and final outcomes, retry information, failure class, evidence status, and cleanup result. Existing JUnit, Datadog, Allure, or OpenSearch-based systems may consume it.
Expected outcomes
Non-goals
Detailed design
The issue body remains the stable overview. Ordered comments cover:
Decisions requested
References