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)

← ADR-0058 · ADR-0060 →

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

Consequences

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.

No other ADR is named in this record.

Rulings cited

None.

Specs cited

None (or no spec page exists for the ones named).