Skip to content

R31

What to build

A capacity summary never attributes mixed candidate wheels to its first input.

Source and evidence

Repository scientific/architectural review, snapshot 86c8517, item R31. Classification: confirmed defect; high severity.

The same builder checks comparison identity, which deliberately excludes candidate wheel/source identity to allow comparisons between candidates. That identity is insufficient for pooling trials within one candidate summary. Five unique runs from two wheels pass validation and select capacity, while candidate_identity attributes the entire summary to the first wheel. Require identical candidate identity within a summary; continue permitting candidate differences between separate summaries. The existing test for comparing different candidates remains appropriate and does not cover this pooling error.

Both findings are reproduced by the reviewed implementation using existing valid synthetic fixtures, without running a capacity benchmark or modifying production sources. The probe exited 0 and its Ruff check passed. make test-focused TEST=tests/unit/test_performance_analysis.py passed all 14 tests. The complete validator and test module were read: count reconciliation, artifact checksums and classification recomputation are substantive safeguards, but they do not establish replicate independence or a single pooled candidate.

Acceptance criteria

  • [ ] Five unique trials from two wheels reject pooling into a single candidate summary.
  • [ ] A single-candidate group validates full candidate wheel/source identity before aggregation.
  • [ ] Comparing separately valid summaries from different candidates remains allowed.
  • [ ] Order permutation cannot change accepted candidate attribution or silently discard mismatched trials.
  • [ ] Preserve Consumer-owned meaning, payload-free evidence, disabled optional-import isolation, safe diagnostics and the non-relaxable Safety Floor.
  • [ ] Run the narrowest observable contract, then applicable committed Make gates. Record every command and outcome; update specifications/compatibility evidence for changed public or wire contracts. Run native Collector verification for changed Collector assets and build for packaging changes.

Design guidance

Use stricter within-summary identity than between-candidate comparison identity. Keep those policies distinct so fixing pooling does not prohibit legitimate upgrades.

Keep prefactoring narrow and verifiable in this slice. Reuse established owners and structural interfaces; introduce a pattern only when it clarifies a real responsibility or variation point. Do not add consumer vocabulary or private payloads to platform code or evidence. Mocked/local results must not claim hosted, production, accelerator or release qualification.

Blocked by

None (can start immediately). Shared-area coordination is useful, but no other review fix is a genuine prerequisite for this slice.

Verification scope

Convert the described counterexample or investigation oracle into an observable test at the lowest suitable public boundary. Prefer bounded operation-count or deterministic interleaving evidence to flaky timing assertions; timing guarantees need a declared tolerance and independently owned cleanup. This ticket authorizes remediation/research, not publication or deployment.