R29
What to build¶
Within-request duplicates consume unique-identity quota only once.
Source and evidence¶
Repository scientific/architectural review, snapshot 86c8517, item R29.
Classification: confirmed defect; medium severity.
Quota preflight counts each identifier absent from the previously retained set, without deduplicating new identifiers within the current request. Several copies of one new ID count as several new unique IDs, although insertion retains only one. A valid duplicate delivery can therefore be rejected near quota and reported as an invalid request, altering the measured loss/retry behavior.
The second retained probe scenario supplies three copies of one new span identity with a unique quota of two. It raises “counting sink item identity bound exceeded” even though retaining the request would use one unique entry. No socket or provider is involved in either probe scenario.
Acceptance criteria¶
- [ ] Three copies of one new ID fit a unique quota of two and produce one unique plus correct total/duplicate counts.
- [ ] Mixed existing/new/duplicate IDs obey exact quota boundaries; genuinely excessive unique IDs reject.
- [ ] Preflight and insertion occur atomically under the existing state lock.
- [ ] Per-signal identity semantics and retry accounting remain consistent.
- [ ] 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¶
Compute distinct new identifiers against retained state, then update unique/total/duplicate counters in one transaction-like critical section.
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.