Home / Projects / Orchestrata Ultimate / Decisions / ADR index / ADR-0059
ADR-0059: REQ propagation in generated tests is uncapped — traceability is not sampled
| field | value |
|---|---|
| Status | Accepted — Accepted (Mohamed's ruling) |
| Date | 2026-09-22 |
| Register | factory (docs/adr, 4-digit ids) |
| Source | docs/adr/0059-req-propagation-is-uncapped.md — permalink at 9c90c0209 (unchanged on master since that commit) |
| Wiki register entry | ADR-0059 (wiki status: Accepted) |
The record
Status: Accepted (Mohamed's ruling) · Date: 2026-09-22
Context
EnhancedTestGenerator reads @traces(spec=, story=, reqs=[...]) off a source
symbol and re-emits it on the generated test, which is how a generated test
enters the RTM at all. Until 2026-09-15 the reader truncated that list:
meta["reqs"] = reqs[:3]
The truncation sat in _extract_traces — the PARSE step, not the render step —
so the dropped ids were gone before anything downstream could see them. A symbol
tracing four requirements produced a test citing three, and the fourth appeared
in the RTM as untested. Nothing reported the loss.
Commit f260b6e73 (IR-1, item G-3 uncapped REQ propagation) removed the cap
and recorded the casualty it had measured: "the old reqs[:3] cap silently
dropped traceability (measured: priority lost REQ-004-US-009-017)". The cap's
own comment justified it by describing an unrelated defect — reqs joined into a
single malformed reqs=["A, B, C"] string, which the real @traces validator
rejects. Keeping a real list fixed that; capping it at 3 was an unrelated
constraint that rode along and survived.
One old-tree test still asserts the removed behaviour —
tests/test_orchestrata_tools_test_generator.py::TestEnhancedTestGeneratorModule::test_generate_module_single_class_import_and_traces
asserts a 3-element literal and assert "REQ-001-004" not in source. Session 270
flagged the contradiction and left a freeze ruling owed rather than picking a
side unilaterally.
Decision (Mohamed, verbatim)
"rule the REQ cap uncapped and fix that test"
As law: REQ propagation from source @traces to generated tests is uncapped.
Every requirement id a symbol declares is carried to the generated test, in
declaration order. There is no maximum, no sampling, and no silent truncation
anywhere on that path. The test asserting a cap of 3 asserted a defect and is
corrected to the contract, not the reverse.
Alternatives rejected
- Restore the cap of 3. It exists nowhere in a spec and has no stated purpose; the only recorded effect is a requirement disappearing from the RTM. Truncated traceability is worse than none, because it still looks complete.
- Cap, but warn on truncation. A warning on the generator's stderr does not reach the RTM, which is the artifact the loss corrupts. Anything short of carrying the ids leaves a requirement reported as untested.
- Cap at a higher number. Any finite cap is the same defect with a larger threshold; the question is not where truncation starts but whether the path is lossless at all.
Consequences
_extract_tracesreturns everyreqselement;_traces_decoratorrenders all of them. Both are already in this state — this ADR ratifies the shipped behaviour and forbids re-introducing a bound.- A generated test's REQ citations are a faithful projection of its source's, so RTM coverage derived from generated tests is no longer under-counted.
- The old-tree test is rewritten to assert the propagation PROPERTY — all
declared ids present, in order — rather than a literal 3-element string. Its
surrounding assertions (that class-level and method-level
@tracesdecorators are emitted at all) guard a genuine past defect and are kept intact. - No gate enforces the absence of a cap; this ADR plus the rewritten test are the enforcement. A future cap would have to delete a passing assertion to land.
Provenance
Mohamed, 2026-09-22, ruling verbatim above, in response to the session-271
reconciliation surfacing the contradiction. Evidence: commit f260b6e73
(2026-09-15, "G-3 uncapped REQ propagation") and its diff removing
meta["reqs"] = reqs[:3] from
src/orchestrata_tools/test_generator/enhanced_generator.py; the handoff
decision recorded on session 270 ("REQ-cap freeze ruling owed"); the current
_traces_decorator, which joins all of meta["reqs"] with no slice.
Related ADRs
No other ADR is named in this record.
Rulings cited
None.
Specs cited
None (or no spec page exists for the ones named).