R12
What to build¶
Paired slice selection scales linearly per slice and trial while preserving exact membership.
Source and evidence¶
Repository scientific/architectural review, snapshot 86c8517, item R12.
Classification: confirmed defect; high severity.
For each slice and trial, _append_paired_slice_trials() builds the selected case
tuple, then scans it with any(observation.case is case ...) for every successful
observation. A slice covering all N cases needs N(N+1)/2 identity comparisons per
candidate per trial. At the allowed 100,000-case ceiling that is 5,000,050,000
comparisons for just one candidate, one slice, one trial; paired execution calls
this for both candidates. Bounds on retained summaries and candidate executions
do not bound this quadratic work to an operable amount.
The retained paired slice probe profiles boolean yields from the real helper's generators and counts identity tests. N=20/40/80 produced 210/820/3,240 comparisons, exactly matching the formula. All observations were selected in each run. This is an operation-count experiment, not a wall-clock benchmark; profiler overhead is not presented as application latency.
Acceptance criteria¶
- [ ] Selection preserves original case identity, observation order and independent candidate success/failure accounting.
- [ ] An operation-count contract at increasing case sizes demonstrates O(N) expected membership work instead of N(N+1)/2 scans.
- [ ] Overlapping/empty slices and equal-valued distinct case objects preserve their existing meanings.
- [ ] No private membership or case payload enters serialized reports.
- [ ] 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¶
Build an identity/index membership set once per slice and share cohesive selection knowledge with the single-trial path. Avoid equality-based membership and unnecessary strategy hierarchies.
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.