Skip to content

R4

What to build

Oversized attribute sources are rejected without traversing their full contents.

Source and evidence

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

The public function accepts an Iterable but calls tuple(values) before checking the 64-attribute bound. Rejected input therefore costs O(N) time and retained memory for arbitrary N; an endless source never reaches validation. This is a resource bound defect at an otherwise bounded safety boundary, not a reason to add a generic collection abstraction.

Reproduction: supply a generator yielding 100,000 (f'dimension.{index}', index) pairs and counting yields. The function rejected with the fixed count-error text, but consumed all 100,000 pairs. The observation proves eager consumption; no RSS or wall-clock throughput claim is inferred from it.

Acceptance criteria

  • [ ] A source longer than 64 attributes is rejected after at most 65 yielded entries and is never asked for entry 66.
  • [ ] Empty and exactly-64 inputs preserve sorting, duplicate-name checks and immutable output.
  • [ ] Mapping and iterable forms use the same safety floor, including finite numeric and integer-range checks.
  • [ ] The contract uses an instrumented finite source; no endless generator can hang the suite.
  • [ ] 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

Consume through a small bounded collector before sorting or tuple publication. Reuse existing value validation; no generic collection framework is needed.

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.