R34
What to build¶
Capacity cannot pass when required resource/queue/error measurements were not acquired.
Source and evidence¶
Repository scientific/architectural review, snapshot 86c8517, item R34.
Classification: confirmed defect; high severity.
the reviewed implementation maps scrape failures to an empty mapping; Docker
stats defaults and parsing failures similarly yield zeros. Sampling still appends
apparently valid records. build_report requires only nonempty samples, source
latencies and enough timing events to declare measurements_complete. Missing
queue capacity becomes zero occupancy, absent refusal/error metrics become zero
deltas, and missing CPU/RSS become zero usage. The retained synthetic probe fed
empty before/after metrics and three such default records into the actual report
builder. It returned pass with measurements_complete=true, and the raw validator
accepted it. This can falsely confirm a capacity point without the measurements
needed to rule out saturation. Track successful acquisition and required families
explicitly; unknown measurements must classify the trial as inconclusive.
The probe mocks only identity/file-writing seams and supplies synthetic delivery
counts/timestamps; it does not demonstrate a particular live scrape failure.
.venv/bin/python -m docs.reviews.missing_capacity_metrics_probe exited 0.
Initial probe lint found import-order and line-length issues; after correction,
uv run --frozen ruff check retained synthetic probe passed.
make test-focused TEST=tests/delivery/test_performance_harness.py passed three
tests. Those tests inspect source strings and asset existence rather than exercise
interruption, missing metrics, enforcement of bounds or lifecycle behavior.
The full 1,382-line orchestrator was inspected. Further evidence limitations: the supplied wheel is hashed but not installed or executed; the generator image identity is recorded although actual traffic uses local Python protobuf generation. Payload size, attributes and batch_size in workload files do not control the one-item synthetic requests. Warmup is capped at ten items/s with no convergence test. Workload wall/resource/disk budgets are declared but only Collector CPU, memory and PIDs are enforced; subprocess commands have no timeout, no live queue/disk abort exists, and executor submission retains up to 500,000 futures and payloads. This finite item bound can still entail substantial queued memory and drain time (ten seconds per timed-out request in worker batches).
Environment stability and generator throttling are hardcoded true/zero; sink headroom uses delivery equality rather than resource measurements. The first eligible p99 becomes the baseline even if that point failed another criterion. Interrupts are re-raised after cleanup, so no raw inconclusive report is written on that path. Network creation precedes the cleanup try block. Sampling joins have deadlines but do not verify thread termination. These leads remain distinct from R34's directly reproduced false pass and need prioritization in the final architecture/evidence assessment. No capacity search, soak or perf-smoke Docker execution was performed in this segment.
Acceptance criteria¶
- [ ] The retained empty-scrape/zero-default fixture no longer passes or claims measurements_complete=true.
- [ ] Track required metric-family and Docker-stat availability, parse failure, gaps and counter resets explicitly.
- [ ] A measured true zero remains distinguishable from unknown; complete healthy fixtures still pass.
- [ ] The raw validator independently rejects or marks inconclusive contradictory acquisition/classification claims.
- [ ] 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 typed acquisition availability and a required-measurement policy through sampling, report building and validation. Never manufacture zero from failure. Bind classification to observed coverage, not just a nonempty samples list.
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.