Skip to content

Repository review

Snapshot: 86c8517 (2026-09-30). The worktree was clean at review start. Status: review complete for this snapshot; confirmed defects prevent certification of repository-wide scalability.

The review has identified 36 confirmed findings: 14 high and 22 medium severity. All 252 tracked files have inspection entries, with no missing, extra or duplicate ledger paths. The principal risks are deadline/cleanup containment, invalid or mismatched evidence reaching acceptance decisions, statistical independence, and work/memory bounds. Existing design patterns are substantive; more pattern classes alone would not improve these contracts. Production behavior is unchanged.

Prioritize containment and evidence-integrity repairs before performance tuning. For scalability, remove the quadratic paired-slice scan, enforce joint bootstrap budgets, bound duplicate-latency and recording retention, and make capacity reports reflect actual measured resources and workload shape. Keep each repair behind its existing ownership seam and add a contract reproducing its observed failure.

Method and acceptance criteria

Review production Python, Collector assets, verification scripts, tests, packaging, and CI against the repository's ownership and safety contracts. Trace public entry points to validation, resource acquisition, execution, failure handling, and cleanup. For performance findings, identify input size, complexity, allocations, concurrency, and bounds; use reproducible experiments rather than inferring speed from style. Distinguish reproduced defects from hypotheses and architectural judgement. Patterns need a concrete responsibility or variation point; pattern count is not evidence of scalability. A complete review requires a file-level coverage inventory, contract checks, and explicit limitations for environment-dependent evidence.

Confirmed findings

R36: lifecycle reset failure breaks report construction when slices are declared (medium)

Location: src/telemetry/performance/execution/evaluator.py:1454-1467 and src/telemetry/performance/execution/evaluator.py:1650-1662.

The LifecyclePhaseError branch increments overall failed cases but omits matching slice failure counts. Slice reduction retains the full eligible count, and SliceResult rejects the resulting non-conserving accounting. With default continue-on-error behavior, a reset failure should become safe failed evidence; adding an otherwise valid slice instead makes evaluation raise a validation exception. This prevents consumers from retaining the intended failed report and violates failure isolation.

Retained reproduction: docs/reviews/lifecycle_slice_probe.py runs one case, one trial, no warmups, an explicit dataset identity and a seeded lifecycle adapter whose reset fails. Without a slice it returns status=failed, failed_executions=1. With an all-cases slice it raises ValueError: slice execution counts do not reconcile. Both runs use the same candidate and reset. The probe exited 0 on the configured Python 3.14.7 environment, and its Ruff check passed.

Fix direction: update each affected slice's failure denominator for lifecycle errors through the same accounting owner used by ordinary invocation failures. Add an observable contract for reset failure with overlapping slices, checking conserved counts and a returned failed report.

R1: partial IPC frames bypass the isolation receive deadline (high)

Location: src/telemetry/performance/execution/isolation.py:247-249.

poll() only establishes read readiness. The subsequent recv_bytes() blocks until the entire frame is available; the monotonic deadline is no longer checked. A child stopped during transmission can leave its parent stuck indefinitely, preventing the finally block from terminating the child. The byte limit limits allocation, not receive duration. This defeats the isolation containment boundary.

Reproduction on macOS, Python 3.14.7: create a one-way multiprocessing pipe; write struct.pack('!i', 8) + b'R' to the writer file descriptor; keep the writer open; call _receive_frame(reader, live_process_double, 0.05) on a thread. After a 0.2-second join the thread remained blocked (observed 0.201 seconds). Closing the writer released the reader, and the thread was joined successfully. The process double's is_alive() returns true; no child is left running. This tests the real pipe receiver, not an emulated recv_bytes().

Fix direction: keep deadline enforcement independent of a blocking frame receive, with explicit ownership and cleanup of the reader and child. Add a partial-frame contract test and verify the parent returns within a bounded tolerance. Review cross-platform behavior before choosing a transport implementation.

Primary reference: Python's Connection documentation documents blocking receive operations and polling separately.

R2: candidate TimeoutError is misclassified as an evaluator deadline (medium)

Location: src/telemetry/performance/execution/async_evaluation.py:255-271.

The except TimeoutError catches both the timeout context's translated cancellation and an exception raised by candidate setup, invocation, or teardown. A candidate that immediately raises TimeoutError is reported as PER_CALL_TIMEOUT, with error_type=None, rather than FAILED with error_type='TimeoutError'. This corrupts failure counts and deadline evidence used to assess candidates.

Reproduction: an adapter with the asynchronous, lifecycle, and context capabilities, no-op setup/teardown, and invoke() raising TimeoutError('candidate failure'); run asyncio.run(evaluate_async_candidate(adapter, [1])). Observed result: candidate_timeout: per_call_timeout None. No deadline elapsed.

Fix direction: retain the timeout context and inspect its expiration state before classifying a caught exception. Add contract cases for candidate-raised TimeoutError and actual deadline expiration. Do not retain exception messages.

Primary reference: Python's asyncio timeout documentation exposes Timeout.expired() to inspect whether the deadline expired.

R3: child cleanup returns while the child is alive (high)

Location: src/telemetry/performance/execution/isolation.py:265-268.

_reap() waits briefly, sends terminate, waits one second, and returns without checking liveness again or escalating. On POSIX a child can ignore SIGTERM. The public function's guarantee that every child is joined or terminated before returning is therefore too weak to guarantee containment: repeated attempts can leave processes running and consuming resources.

Reproduction: a spawned child installs signal.SIG_IGN for SIGTERM, signals a multiprocessing Event to acknowledge readiness, and sleeps in a loop. Calling _reap(child) took 1.102 seconds and returned with child.is_alive() == True. The experiment explicitly killed and joined the child afterward (exit code -9), then closed the process handle. This was a real spawned process, not a double.

Fix direction: verify exit after termination; on supported platforms escalate to kill, join, and close handles. Preserve caller interrupts while ensuring cleanup. Add a POSIX-specific resistant-child contract, with independent test cleanup. The scope is the direct child; descendant-process containment is not promised.

R4: attribute count validation happens after unbounded materialization (medium)

Location: src/telemetry/core.py:849 (attributes() tuple construction).

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.

Fix direction: consume at most 65 entries before rejecting. Preserve deterministic sorting, duplicate detection, and finite-input behavior. Test a source that fails if asked for its 66th entry, rather than testing an actual endless source.

R5: teardown failures replace caller cancellation (medium)

Location: src/telemetry/performance/execution/adapters.py:347-351 (execute_async()).

The finally block awaits teardown without preserving a pending exception. A teardown RuntimeError replaces a CancelledError from invocation. Direct callers therefore observe an ordinary failure instead of cancellation, breaking structured cancellation semantics. The analogous synchronous finally block can also replace an invocation exception, despite its docstring promising propagation.

Reproduction: successful setup, invoke awaiting an unset asyncio Event, teardown raising RuntimeError. Create a task for execute_async(), yield once, cancel it, and await it. Observed exception class: RuntimeError. The task completed; no background work was left running.

Fix direction: define precedence explicitly and preserve cancellation/interrupts when cleanup also fails. Keep secondary failures available through an appropriate safe diagnostic or causal mechanism. Test both cancellation plus cleanup failure and ordinary candidate failure plus cleanup failure at the public adapter boundary.

R6: stdlib log extras bypass numeric attribute safety validation (medium)

Location: src/telemetry/otel.py:313-320 and _bounded_attribute().

The handler checks broad scalar types and passes integers/floats through unchanged. It does not reuse the core's finite-float and signed-64-bit integer validation. Approved attribute names therefore do not establish approved attribute values. This violates the repository invariant that emitted attributes pass the existing schema and safety path.

Reproduction: register measurement as an event attribute, create ordinary LogRecords whose extra is respectively NaN, infinity, and 2**80, then call the real _OtelLogHandler.emit() with a capturing provider. All three reached the provider unchanged. A follow-up with a real LoggerProvider, synchronous in-memory exporter and the installed OTLP encode_logs() preserved NaN/infinity as protobuf double values. The oversized integer attribute was omitted with a value-out-of-range SDK log; the healthy fourth record retained its integer value. All four records survived encoding, so batch loss was not observed. No network export was attempted; handler and provider were closed after the experiment.

Fix direction: normalize permitted list extras and redacted strings, then validate the resulting values using the shared safety path before emitting. Add tests with a real SDK/export boundary to determine whether invalid extras can affect healthy records in the same batch.

R7: timed-out shutdown abandons cleanup after a prior flush (medium)

Location: src/telemetry/otel.py:913-915 (shutdown's existing-worker wait).

Shutdown marks the runtime closed before waiting for an existing flush worker. If that wait expires, it returns without arranging provider shutdown. The old worker only flushes; when it eventually finishes, no code shuts down providers. Further shutdown calls return immediately because the runtime is closed. This can retain exporter/processor resources in a process that continues serving or recreates runtimes. A finite caller deadline should not lose eventual cleanup.

Reproduction using the repository's _runtime_with_providers fixture: block a provider flush on an Event; use a 10 ms shutdown timeout; invoke force_flush, then shutdown; release the Event and join the worker; invoke shutdown again. Observed provider_shutdowns_after_worker_exit: 0, worker_alive: False. The existing timeout test checks closed state and worker reuse but never checks eventual provider shutdown after release.

Fix direction: represent pending shutdown explicitly and arrange serialized cleanup when the existing worker returns, without multiplying lifecycle workers or blocking callers beyond their deadline. Add a release-after-deadline contract.

R8: contradictory complete reports can pass Assessment (high)

Location: src/telemetry/performance/core/reports.py:317-325 (COMPLETE validation).

The report reconciles aggregate/trial counts but does not require zero failed executions for COMPLETE. That branch only checks retained failure records and measurement-name coverage. A report with one planned invocation, zero successful invocations, one failed invocation, old scores, and no failure records passes construction and JSON loading. Assessment then trusts its COMPLETE status and can return PASS. This is an untrusted persisted-evidence correctness defect; it does not require a candidate execution bug.

Reproduction: create the healthy isolation-fixture report; use dataclass replace to set its trial's successful_cases=0/failed_cases=1 and the matching report successful_executions=0/failed_executions=1, retaining COMPLETE status and score. Serialize and load through load_report_json() (the same reader called by the public file loader). Observed loaded_status: complete failed_executions: 1; assess(loaded, (ThresholdRule.at_least('quality', 'score', 0.5),)).passed was True.

A related constructor/reader inconsistency was confirmed: replacing elapsed_ns with -1 succeeds and serializes -1, while reading those same bytes raises ValueError. Thus frozen report construction does not currently establish all reader invariants.

Fix direction: centralize report invariants across constructor and reader; validate COMPLETE against execution counts, non-negative scalar values, bounded indices, and retained failure evidence. Add adversarial round-trip and Assessment contracts. Do not infer authenticity of private outputs from validation; the target is internal consistency of the public aggregate evidence.

R9: small reports can request billions of bootstrap draws (medium)

Location: src/telemetry/performance/core/reports.py:349-355, src/telemetry/performance/core/statistics.py:80-83, and evaluator summary creation.

Per-field ceilings do not impose a joint resampling work budget. A legal plan with 100 trials, 256 Measurements, and 100,000 bootstrap resamples requests 2.56 billion score draws in report validation alone. Each replicate also validates and sorts its scores for the median. Evaluation first computes those intervals and then the report constructor recomputes them, repeating this work. The 16 MiB input byte cap does not meaningfully bound this amplification.

Experiment: construct constant-score trial/summary evidence at those accepted ceilings; temporarily replace the report module's bootstrap function with a counting function returning the correct constant interval. Construction accepted 256 calls with total len(scores) * samples == 2,560,000,000; serialized size was 892,841 bytes. Restore the function in finally. This measures requested work at the real validation seam, not actual execution of billions of draws.

A separate real bounded call (100 scores, 1,000 resamples, seed 1) took 0.019124 seconds locally. This single observation is characterization only; no production capacity estimate or large-workload runtime extrapolation follows from it.

Fix direction: preflight aggregate score visits and retained estimates before evaluation and loading, following the paired-resampling work-budget approach. Preserve validation of imported evidence; use an explicit trusted assembly path only if it can avoid duplicate computation without letting unvalidated summaries cross the publication boundary. Test the cross-product ceiling, not only each field.

R10: finite paired inputs produce non-finite estimates (medium)

Location: src/telemetry/performance/core/resampling.py, _estimate(), replicate difference computation, and _relative_value().

Input and callback results are checked for finiteness, but intermediate sums, differences, ratios, and final result fields are not. Two scores of 1e308 overflow the default sum even though their arithmetic mean is representable. Separately, finite callback estimates of -1e308 and 1e308 yield an infinite difference, and estimates of 1e-308 and 1e308 yield an infinite relative ratio. The public function returns a normal typed result containing those infinities/NaNs after executing every requested replicate. The result dataclass adds no validation.

The retained resampling probe isolates all three paths, using only two rows and 100 resamples. It reported respectively 8, 3, and 3 non-finite result fields; the difference and ratio cases had finite point estimates because their explicit first-value reducer avoided the default sum. Every input was finite. No network, subprocess, or private dataset is involved.

Publication through AggregateMeasurementComparison does separately check finiteness, so this observation is an in-process API violation and late rejection, not proof that those values can be persisted in a comparison document.

Fix direction: use numerically stable reduction where the result is representable, validate derived point and replicate values, and reject or explicitly classify unrepresentable differences/ratios before returning evidence. Apply the same derived-value checks to corpus resampling. Add regression cases for representable means and unrepresentable effects, not just non-finite input values.

R11: default paired inference treats repeated cases as independent (high)

Location: core/paired.py:reduce_paired_measurements() and analysis/comparison.py:estimate_paired_differences() in telemetry.performance.

Reduction flattens all trial/case observations into one score vector. Default CASE resampling then treats each row as an independent case, even when repeated trials reuse the same private case and deterministic candidate. The inference helper already has original case positions but does not collapse, group, or reject these known repeats. It emits a PAIRED_POPULATION_INTERVAL claim with an inflated independent count. This can make confidence-based Assessment more permissive without collecting additional independently sampled cases.

The retained paired repetition probe runs the same two cases through deterministic candidates producing differences -1 and +1. With one repetition, default inference reports independent_count=2 and an absolute interval of [-1, 1]. With twenty repetitions, default inference reports count=40 and [-0.30000000000000004, 0.30000000000000004]. Explicit GROUP resampling using the original case positions preserves count=2 and [-1, 1] in both runs. All four runs use 1,000 resamples and seed 9; no candidate randomness was introduced.

The scientific interpretation is pseudoreplication: these repeated observations are not independent new case samples. See the original Hurlbert paper on inferential use of non-independent replicates. The code-specific diagnosis comes from the retained experiment, not from a general claim that all repetitions are invalid. Independent run variability can be legitimate under a different declared estimand and sampling model.

Fix direction: preserve case identity in the private inference unit model and require an explicit repeated-measure policy. Resample whole case blocks across trials, use a justified hierarchical design, or reject default case inference on repeated cases until that policy is supplied. Do not silently average cases for arbitrary Consumer aggregation. Test independent-count and interval invariance for deterministic repeats and clarify the population versus execution estimand.

R12: paired slice selection performs quadratic identity scans (high)

Location: src/telemetry/performance/execution/evaluator.py:1192-1196.

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.

Fix direction: build an identity-based membership set once per slice, or carry validated case indices into the paired observation-selection path. Membership lookup then costs O(1) expected per observation rather than O(slice size). The ordinary _run_trial() path already uses sets of case indices; make this shared knowledge cohesive without adding an unnecessary hierarchy. Verify identity and ordering behavior with contract tests and a comparison-count scaling probe.

R13: confidence Assessment accepts evidence from a different run (high)

Location: src/telemetry/performance/analysis/assessment.py:955-984.

_compatible_comparison_document() checks descriptive report identities, not the actual report contents that produced the comparison. Two distinct runs can share those identities while producing opposite results. The confidence rule therefore accepts a stale comparison and can pass a currently regressed candidate. Assessment artifact digests are calculated after this decision; they do not establish that the supplied comparison derives from the supplied reports.

The retained Assessment linkage probe runs the same candidate twice under the same candidate and dataset identities. A stateful candidate produces paired intervals [1, 1] and [-1, -1] against a constant baseline. The report bytes differ. Assessing the second run with its own comparison fails the 0.5 improvement gate, while using the first run's comparison passes it. Both comparison documents come from actual paired evaluations and resampling; the probe does not forge a comparison record.

Fix direction: carry immutable source-report content digests in comparison evidence and verify both against the Assessment inputs before evaluating a rule. Descriptive identity compatibility remains useful alongside this check. This is internal evidence consistency, not proof that Consumer identity attestations are true. Add a contract test with distinct runs sharing the same identities.

R14: required-slice family analysis exceeds its shared work budget (medium)

Location: src/telemetry/performance/analysis/slices.py:300-329.

The family preflight sums only requested slice sizes and omits the factor of two for baseline/candidate score visits used by the core preflight. It then invokes pointwise inference for every declared slice, including unrequested members. Each interval independently passes the same budget; cumulative work can exceed it.

The retained slice family work probe declares two two-case slices, requests only one, and uses 1,000 resamples with a 4,000-score-visit budget. A wrapper delegates to the real resampler and counts visits by the core's own accounting formula. The function returns COMPLETE with one requested slice, after 8,000 actual score visits. The initial 2,000-budget probe was rejected by the stricter per-interval preflight; raising it to exactly one interval's cost isolates the missing shared budget rather than bypassing the core validation.

Fix direction: select requested memberships before resampling and apply the same two-vector accounting formula to the cumulative family cost. Share this accounting with the core preflight to prevent divergence. Test a strict subset of declared slices and multiple requested slices whose individual costs fit but sum does not.

R15: peak-counter ownership permits concurrent resets on one device (high)

Location: src/telemetry/performance/execution/resources.py:278-287,320.

PyTorchPeakSampler.start() checks a shared set, invokes the backend reset, then adds the device to that set. The check and claim are not atomic, and an external backend call separates them. Two callers can both reset and become active owners. Stopping either removes the shared ownership entry while the other remains active, allowing further overlapping resets. This contradicts the documented exclusive device ownership needed to keep device-wide peak evidence scoped to one run.

The retained peak ownership probe uses two threads and an injected reset method with a two-party barrier. Both checks complete before either reset returns. Both starts succeed: simultaneous_owners = 2. Each owner is stopped in cleanup. This proves the concurrency defect in the ownership mechanism, not CUDA qualification or the accuracy of any hardware counters. Existing unit and contract tests exercise only sequential ownership conflicts.

Fix direction: reserve ownership atomically before invoking the reset, roll back the reservation on reset failure, and release only the current owner's reservation. Use a small synchronized ownership registry; do not hold its lock across unrelated device backend calls. Test concurrent starts, reset failure, and stop/start races.

R16: batch cardinality validation materializes all oversized outputs (medium)

Location: src/telemetry/performance/execution/batch.py:252-254.

The splitter returns a Sequence, but evaluate_batches() copies all of it to a tuple before checking that its length matches the actual batch. An invalid output sequence can impose arbitrary traversal and retained memory despite a small validated batch size. The retained batch cardinality probe supplies a valid Sequence implementation with 100,000 outputs for a two-case batch. It records all 100,000 element reads before the batch is classified failed. This is a bounded operation-count experiment; it does not claim a measured memory peak or run an endless source. The existing bad-cardinality test uses one output for two cases and therefore does not test excess-output work.

Fix direction: reject an incompatible Sequence length before copying, and cap materialization at the expected size plus one if permissive iterable support is retained. Preserve the whole-batch failure and original-index alignment contracts. Add an oversized lazy Sequence test that asserts rejection without full traversal.

R17: open-loop serving cleanup hangs after deadline or caller cancellation (high)

Location: src/telemetry/performance/serving/runner.py:567-581.

After the drain deadline, workers are cancelled, but the finally block queues one stop marker per original worker before gathering them. The workers can exit without consuming those markers. When queue capacity is smaller than worker count, putting further markers waits forever on a full queue. Caller cancellation also enters this cleanup without cancelling the workers: a cooperating client waiting indefinitely receives no cancellation, and the coordinator waits for it. The configured drain deadline does not bound either cleanup path.

The retained serving cleanup probe uses an ordinary cancellable async client, two workers and queue capacity one. The arrival window is 2ms. With a zero drain deadline, the run remains unfinished after 100ms even though all children have exited. In a separate run, cancelling the coordinator after the client enters leaves the run unfinished after 100ms and one child alive. The experiment independently cancels and gathers all remaining tasks after each observation. These are observed stalls plus a control-flow explanation, not a claim that a cancellation-resistant client can be forcibly terminated.

Fix direction: distinguish normal completion from exceptional/cancelled cleanup. On deadline or caller cancellation, cancel and await the owned workers directly; send stop markers only to live workers that are expected to consume them. Ensure cleanup cannot block on a queue with no readers and preserve caller cancellation. Test queue capacity below worker count, cancellation during production/drain, and exceptions from injected clocks or sleep hooks.

R18: report-store parsing does not use the digest-verified snapshot (medium)

Location: src/telemetry/performance/tooling/history.py:415-429.

_read_document() reads and hashes bytes, then calls load_report(path), which opens the file again. Replacing the file between those reads lets get(digest) return a different valid report under the requested digest. The store's own immutable writer does not normally replace an existing document; this requires external filesystem mutation or repair concurrent with the read. Nevertheless, the advertised corruption check must validate the bytes actually returned. MLflow export also relies on this method to associate a report with its digest.

The retained history snapshot probe creates an isolated temporary store with an original report. A wrapper at the second-read boundary replaces the file with a valid replacement report, then delegates to the real loader. get(original_digest) returns replacement, and hashing its canonical bytes does not match the requested digest. The temporary store is removed after the experiment; no existing history or remote service is touched. This controlled interleaving proves the check/use race without a flaky timing test.

Fix direction: parse the already verified byte buffer using load_report_json(). Read at most the document cap plus one before hashing, so corrupted oversized files cannot require unbounded allocation. Test replacement between read and parse and assert that the returned report matches the verified snapshot.

R19: HTML rendering splits escaped label pipes into evidence columns (medium)

Location: src/telemetry/performance/tooling/presentation.py:298-305.

The intermediate presentation stores Markdown table lines. _text() escapes literal pipes with a backslash, but the HTML renderer's _table_cells() splits on every pipe without recognizing those escapes. A valid Measurement label containing a pipe becomes two cells and shifts its numeric evidence into the wrong columns. This changes the presentation of a valid report, not the stored numeric values or HTML script safety.

The retained HTML column probe evaluates the public label quality|name with score 1 and unit ms. HTML contains six headers but seven data cells: quality\\, name, 1, ms, [1, 1], 1, percentile_bootstrap. The Score column receives name; Unit receives 1; Interval receives ms. The existing HTML contract uses exactly this pipe-containing label but only checks that generic units, intervals and escaping occur somewhere in the output. It does not verify label preservation or column correspondence.

Fix direction: keep typed table rows/cells in the presentation model and render Markdown and HTML independently, or make the Markdown cell parser correctly recognize escaped delimiters. A small structured presentation boundary solves this real coupling problem; a general Markdown framework is unnecessary. Verify equal header/data cell counts and exact label, score and unit placement.

R20: probability adapters misinterpret declared class order (high)

Location: src/telemetry/performance/integrations/sklearn.py:363-370,490-502,672-679.

Binary ROC AUC selects probabilities for the declared positive_class but sends original string labels to sklearn. The dependency interprets scores as belonging to the greater label, so selecting the lesser label reverses the result. Calibration passes class-ordered columns through unchanged even when their declaration is not lexicographic. Sklearn's log-loss and Brier implementations interpret those columns in lexical order. The report retains finite scores and COMPLETE status despite incorrect class semantics. Revisions that hash declaration order do not fix its runtime interpretation.

The retained class-order probe uses installed sklearn 1.8.0, two balanced classes, and correct-class probability 0.9 on each case. With explicit supported average="macro", ROC AUC is 1 for positive yes but 0 for positive no; the pairwise ranking oracle is 1 for either declaration. Reversing both class order and columns leaves predictions identical but changes log loss from 0.10536051565782628 to 2.3025850929940455 and Brier from approximately 0.02 to 1.62. The independent oracles are -log(0.9) and (1-0.9)**2 + (0-0.1)**2. Sklearn emits ordering warnings for calibration, but the evaluator still publishes the wrong finite result. Existing tests change identity order without evaluating the reordered scorer.

These expectations follow the dependency's documented binary ROC score convention and log-loss column ordering. The numerical evidence above is from the installed 1.8.0 package, not an assumption that the current online version is installed locally.

Fix direction: translate targets into declared class indices and consistently remap probability columns at the dependency boundary. For binary ROC, explicitly encode membership in the chosen positive class. Share the validated mapping across ROC/calibration/reliability paths. Verify permutation invariance and both positive class choices with independent score oracles, not only calls to the same dependency.

R21: default ROC AUC configuration cannot score valid binary evidence (medium)

Location: src/telemetry/performance/integrations/sklearn.py:254,367,550.

The adapter defaults to average="binary" for all classification metrics and accepts that setting for ROC AUC. It forwards it to roc_auc_score(), whose accepted averaging modes exclude binary. On otherwise valid two-class input, the dependency raises InvalidParameterError; the evaluator returns no ROC score. The current ROC contract tests use only empty, single-class, malformed-shape and non-finite inputs, which fail before the dependency's finite scoring path.

The first scenario in the retained class-order probe uses the default averaging argument with valid normalized probabilities. It records InvalidParameterError. Changing only the averaging setting to macro permits scoring in the subsequent scenarios. The dependency API's averaging contract also documents the supported values.

Fix direction: validate metric-specific configuration at construction and choose an accepted default for ROC, or translate the irrelevant binary averaging setting before delegation. Add a finite successful binary ROC contract using default configuration and invalid-combination preflight contracts.

R22: judge cancellation abandons running provider tasks (high)

Location: src/telemetry/performance/integrations/llm.py:500-580.

The coordinator creates judge tasks and waits for completion without a cleanup block owning those tasks. Cancelling the coordinator propagates cancellation to its caller, but leaves the judge tasks running. These tasks can continue provider requests and incur cost after the operation that owned them has ended.

The retained llm_lifecycle_probe.py starts one cooperative synthetic judge, cancels its coordinator after entry, and observes one live child. Releasing that child confirms it completes after caller cancellation. The probe releases and joins its child; it makes no provider requests.

Fix direction: use structured task ownership or cancel and join every owned task in a finally block, preserving caller cancellation. Add contracts asserting no remaining tasks after caller cancellation and unexpected child failures.

R23: an exhausted retry budget produces invalid judge accounting (medium)

Location: src/telemetry/performance/integrations/llm.py:352,649.

When an attempted judge call fails and its retry cannot reserve budget, the result is marked budget-exhausted with one attempt. Evidence counts neither a completed call nor an error for that result, and derives zero retries. Its count invariant then rejects the evidence: one attempted request cannot reconcile with zero completed, error, and retry counts.

The retained probe uses one request, max_requests=1, max_retries=1, and a judge that raises RuntimeError. Execution raises ValueError with “LLM judge attempt and retry counts do not reconcile” instead of returning partial budget evidence.

Fix direction: distinguish never-attempted skips from attempted calls whose next retry is refused, and reconcile every attempt with terminal and retry counts. Test attempt, unit, and cost budget exhaustion after a failed call, including serialization of the resulting partial evidence.

R24: stream closure can indefinitely delay timeout evidence (medium)

Location: src/telemetry/performance/integrations/llm.py:1071,1137-1148.

After consumption times out, the observer awaits iterator closure outside the timeout context. An async iterator with a cooperative but stalled aclose() can therefore prevent the timeout observation from returning indefinitely. The documented duration is a consumption limit; this finding concerns missing bounded cleanup, rather than claiming that duration promises a total wall-clock deadline.

The retained probe sets a 10 ms consumption limit and uses separately blocked iteration and closure. The observer is still unfinished after 100 ms, waiting in closure. The probe cancels and joins it to avoid retaining experiment tasks.

Fix direction: define a bounded cleanup policy and preserve the original timeout or caller cancellation when cleanup expires. Test stalled cooperative closure; document the limits of interrupting uncooperative Consumer code.

R25: architecture cycle checks omit imported submodules in from-imports (medium)

Location: scripts/validate_architecture.py:35-41,61.

The import scanner records only an ImportFrom statement's containing module, ignoring its imported names. When a name resolves to a project submodule, the dependency graph loses that edge. Thus from telemetry import b in a.py and from telemetry import a in b.py create no recorded a-to-b or b-to-a edges. Relative from . import ... statements have the same gap. The required gate can therefore accept a cyclic module dependency introduced with ordinary import syntax.

The retained import_cycle_probe.py uses the real validator against a temporary two-module package. Explicit module imports produce the expected cycle diagnostic; both from-import variants return no violations. It restores validator globals and removes temporary fixtures. This demonstrates gate incompleteness, not an assertion that the current production package contains a hidden runtime failure.

Fix direction: resolve imported names against the known project-module inventory, adding edges for actual submodules while retaining the containing-module dependency. Add equivalent absolute/relative syntax fixtures and symbol-only imports to avoid mistaking ordinary imported values for modules. Keep dynamic imports explicitly outside the static gate's guarantees unless separately checked.

R26: upgrade evidence claims an outage without observing one (medium)

Location: scripts/verify_upgrade_compatibility.py:72-76,145.

The compatibility verifier targets fixed localhost ports 4317/4318 and always returns collector_unavailable: true. It neither owns a failure endpoint nor checks that delivery failed. An already-running local Collector or OTLP receiver therefore allows successful export while the retained evidence claims business behavior under unavailable delivery. This invalidates the outage-specific claim, although the SQL query and listener cleanup checks can still be valid.

The retained upgrade_outage_probe.py starts a temporary HTTP/protobuf receiver on localhost:4318, invokes the actual verifier, and observes one accepted export request. The result is pass with collector_unavailable: true. It retains only the request count, shuts down its server and joins its thread. No provider or external network is involved.

Fix direction: own an isolated fault-controlled endpoint and assert its failure state and attempted exports, or classify availability as unknown unless observed. Add a contract proving a successful-export endpoint cannot qualify outage evidence; retain the separate business-result and listener-cleanup evidence.

R27: qualification accepts impossible serving percentile ordering (medium)

Location: scripts/qualify_platform.py:237-253.

Serving sample validation checks exact field names and finite nonnegative values, but not the relationship between latency percentiles. It accepts p99 below p95, then qualifies the document if independently computed overhead stays within budget. For percentiles of the same latency distribution, p99 must be at least p95. Contradictory raw evidence can therefore pass a release qualification gate.

The retained qualification_quantile_probe.py changes only the serving p99 fields in the existing valid fixture: disabled p95/p99 become 20/10 ms and enabled become 20.5/10.5 ms. The 5% p99 regression and all other retained derived metrics remain consistent. The actual evaluator accepts the entire document. No workload was executed or performance claim manufactured; this is a synthetic validation probe.

Fix direction: validate cross-field sample invariants before derivation, including latency percentile ordering. Add negative contracts for contradictory percentile values in both modes, plus equal-percentile and zero-latency boundary cases. Declare units/ranges for other sample fields before adding their semantic checks.

R28: counting sink retains unbounded latency data for duplicate deliveries (high)

Location: scripts/performance_sink.py:124-146,168.

The sink bounds retained unique identifiers but appends a latency for every item with a valid scheduled timestamp, including duplicates. Retrying the same identity does not approach the unique-item ceiling and can grow _source_latency_ns indefinitely. Snapshot copies that list, and the HTTP snapshot endpoint serializes it without an output ceiling. The artifact writer's size check occurs after serialization and does not bound the live process. Sink memory/serialization load can distort or terminate a capacity experiment under repeated delivery.

The retained sink_retention_probe.py lowers only the unique quota to two and records one scheduled identity 1,000 times. It retains one unique identity and 1,000 latency values without rejection. The same append path has no sample bound at the production quota; the smaller quota makes the independence explicit.

Fix direction: declare and enforce a latency-retention budget before appending, or use bounded aggregate/sketch/reservoir evidence with explicit sampling semantics. Define whether latency counts attempts or unique deliveries. Bound snapshots and make any evidence truncation observable. Test repeated identities beyond the sample budget and fault-mode retries without uncontrolled memory growth.

R29: duplicate IDs within a request are overcounted against the unique quota (medium)

Location: scripts/performance_sink.py:124-129.

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.

Fix direction: calculate distinct new IDs against the retained set, then update item and duplicate counts consistently under the lock. Add within-request duplicate and mixed-existing/new-ID contracts at exact quota boundaries.

R30: one capacity run can satisfy the five-independent-trial requirement (high)

scripts/validate_performance_report.py:372 groups inputs by scheduled rate and confirms capacity when at least five passing entries exist. It does not reject duplicate run IDs. The documented protocol requires five independent cold starts, but submitting one valid report five times produces trial_count=5, selected capacity=100 and a degenerate 95% interval [100,100]. This is pseudoreplication at the capacity-summary boundary, distinct from evaluation-case resampling in R11. Reject repeated run IDs before grouping; retain evidence that trials represent separate starts. Unique IDs alone cannot prove experimental independence.

R31: a capacity summary combines different candidate wheels (high)

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 docs/reviews/capacity_identity_probe.py 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.

R32: in-memory runtime benchmark retains every emitted item (medium)

scripts/measure_runtime.py:43 uses RecordingTelemetry, whose ordered operation and observation buffers intentionally retain all items for contract testing. The benchmark's 10,000 timing-sample cap at line 130 does not bound those buffers. The retained probe emitted 20,000 metrics and observed 20,000 retained observations. Memory therefore grows O(emitted items), and measured in-memory call cost includes ever-growing recorder allocation/GC pressure. This is a benchmark adapter problem; RecordingTelemetry's test-recorder semantics are appropriate. Use a benchmark-only bounded recording adapter or explicitly describe and bound the capture workload. No default-duration memory benchmark or OOM experiment was run.

R33: runtime benchmark does not enforce its local-only endpoint contract (medium)

scripts/measure_runtime.py:88 rejects only a missing endpoint. A syntactically valid nonlocal URL passes into the enabled public runtime even though the operator guide requires a loopback-only Collector and the design forbids live backend load. The retained probe supplied http://remote.invalid:4318 while replacing the runtime factory with a mock: the complete nonlocal endpoint reached that factory. No network request was made. Validate loopback locality before constructing the runtime; retain remote endpoint support in the general production configuration.

The full 200-line runtime benchmark, its two delivery tests, the local performance design and operator guide were inspected. make test-focused TEST=tests/delivery/test_runtime_performance_modes.py passed two tests; the retained runtime_measurement_probe exited 0 and its Ruff check passed. Existing tests cover the disabled CLI and declared modes/defaults, but not these two contracts.

Additional measurement limits: only the first 10,000 calls are sampled, so their distribution describes the initial prefix rather than the whole repetition. Elapsed time includes flush and shutdown, unlike the emission deadline. Mode and signal CLI flags are optional despite having no defaults, allowing None to fall through branches. Positive-only duration validation accepts infinity (an infinite emission loop) and NaN (no emission); repetitions and duration have no upper limits. These are remaining harness leads, not evidence of measured production overhead. make docs-check passed (52 Markdown files) after these additions. Working-tree status remains only untracked docs/reviews/. Initial lookups of guessed src/telemetry/testing.py and src/telemetry/recording.py paths failed; the actual recorder was located and inspected in src/telemetry/core.py. No transport stress, full-duration runtime measurement or external endpoint test was run in this segment.

R34: missing capacity resource measurements can become a passing trial (high)

scripts/run_performance.py:1040 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 docs/reviews/missing_capacity_metrics_probe.py 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.

R35: nominal capacity workload shape differs from its recorded declaration (medium)

scripts/run_performance.py:377 builds a fixed one-item request with three signal attributes; payload_bytes, attributes and batch_size from the workload are not generation inputs. The offline protobuf probe compared nominal-v1's declarations (512 bytes, ten attributes, batch size 128) with a generated trace request (421 bytes, three span attributes, one span). The precise byte count depends on encoded timestamp widths, but the structural mismatch is deterministic. Including the six resource fields still gives nine attributes, not the documented ten fixed span attributes. Reports hash and record the nominal workload while exercising a different request shape. Capacity and request overhead depend on batching and payload structure, so this prevents the claimed workload from being reproduced. Drive generation from the declared shape, or version the workload to describe the actual one-item traffic and retain measured byte distributions.

.venv/bin/python -m docs.reviews.workload_shape_probe exited 0 without network traffic. Initial Ruff inspection found import ordering; the intentional fixture path initialization was documented, and the subsequent Ruff check passed. All five workload files and both JSON schema files were fully read. The matrix file declares advanced profiles and soaks that the current runner does not implement; the operator guide correctly identifies advanced capacity as follow-on work. The raw JSON schema constrains structure, but time-series objects remain open and there are no array/count ceilings. Summary curve entries require field names without field types or closed properties. These are documentation schemas rather than the executable validator, which adds arithmetic/classification checks and has its own differences (for example, raw validation tolerates extra top-level fields and does not require a checksum before writing). Neither schema alone is proof of provenance, workload fidelity, independence or acquisition completeness.

Identity module and identity/compatibility test modules are fully inspected. make test-focused TEST=tests/unit/test_performance_identity.py passed 30 tests; make test-focused TEST=tests/unit/test_performance_compatibility.py passed five. An initially truncated combined read was followed by bounded reads covering the omitted ranges. Frozen value objects, closed decoders, availability enums and pure comparison policies are useful patterns here: they separate Consumer attestations from collection mechanics and distinguish unknown evidence from known equality. Labels are bounded to 255 characters; execution counts to one million; provenance distribution names to a seven-name allowlist. Validation/serialization is linear in those small bounded fields, with no model introspection or optional-framework imports. Set-based exact-field validation still materializes arbitrary caller mapping keys before rejecting them; decoded report byte bounds limit the file path.

These types attest identity, not artifact contents: model/dataset digests are not opened or recomputed. Label credential detection is a narrow syntactic safety floor, not an assurance that arbitrary safe-looking labels contain no private data. Consumers retain responsibility for choosing public revision labels. Provenance rejects duplicate distribution names and unavailable partial values. Execution collection validates field names/order and availability enum types but does not itself enforce consistency between AVAILABLE status and a non-null identity value. Timing compatibility checks backend/device/precision/thread/batch/concurrency/scope; hardware model, OS, CPU count and runtime-version differences appear in differences but do not block timing compatibility. Quality comparisons emit hardware warnings. This exact policy should be read as control compatibility, not proof of identical timing hardware. No new confirmed finding is promoted from these policy observations.

Configuration-hardening, backend-neutral core, framework and OpenTelemetry translation test modules are fully inspected. Focused Make runs passed 80 configuration tests, 57 core tests, three framework contracts and two translation contracts (make test-focused TEST=tests/unit/test_core.py also exited 0). The framework run emitted one upstream Starlette/AnyIO deprecation warning. Tests establish strict runtime types (including bool/int distinctions), endpoint and TLS contradictions, secret-free errors/fingerprints, reversible owned logging, disabled optional-import isolation, schema cardinality and value ceilings, and correlation/translation through in-memory SDK exporters. FastAPI contracts exercise real TestClient routes, 16 concurrent requests, malformed trace context and private canaries; SQLAlchemy executes a real SQLite query and checks listener removal. These are useful observable boundary tests rather than source-string assertions.

Their scope remains bounded: they do not prove transport capacity, adversarial infinite iterable rejection (R4), simultaneous runtime ownership, real TLS export, or shutdown recovery after provider stalls (R7). Core's 100-thread context test uses barriers/joins without timeouts; a participant failure could hang the test process. Its 10,000-context metric test proves dimension separation in the recorder, not SDK allocation under arbitrary dimension values. The no-consumer-dependency check searches two literal import strings and is not a complete AST dependency policy. Those limitations do not invalidate the specific contracts exercised.

Environment unit/collection contracts and local Grafana artifact tests are fully inspected. Environment tests cover immutable closed identities, explicit unknowns, unsafe labels/counts, required timing-control mismatches, allowlist normalization, discarded hostname/serial fields, reader exceptions and absence of implicit Torch imports. They use synthetic readers rather than hardware discovery or real accelerator execution. Timing tests check three mismatch fields and one unknown; they do not establish hardware-equivalent timing comparisons. Grafana tests check immutable image compatibility, loopback intake, composition through the Safety Floor and distinct signal queue declarations. They are textual artifact checks, not live Grafana ingest, queue-pressure or dashboard evidence. Existing native Collector validation supplies separate composition evidence; no Grafana stack was launched during this review segment. Focused commands all exited 0: make test-focused TEST=tests/unit/test_performance_environment.py (10 passed), make test-focused TEST=tests/contract/test_performance_environment.py (three passed), and make test-focused TEST=tests/delivery/test_local_grafana_artifacts.py (three passed).

Execution-adapter and assessment-status unit test modules are fully inspected. Adapter contracts exercise private value pass-through, exact setup/invoke/teardown order after candidate failure, capability rejection before side effects, positional context validation and cooperative caller cancellation. The cancellation adapter's teardown completes immediately; it does not test teardown failure masking the original cancellation (R5), repeated cancellation or an uncooperative cleanup. The adapter protocol and capability negotiation are useful Strategy/Adapter seams; their conformance tests establish invocation behavior rather than throughput.

Assessment tests cover fail precedence, insufficient versus unavailable evidence, partial candidate rejection, all public outcome serialization, digest linkage, contradictory stated assessment status, and safe scorer failure classifications. The mathematical ROC/R2 cases use explicit synthetic precondition oracles rather than the optional sklearn adapter; they do not prove that adapter's class mapping or actual library invocation (R20/R21). Rejecting a contradictory assessment document differs from validating internal report status/failure consistency (R8). No new confirmed defect is promoted in this inspection segment. make test-focused TEST=tests/unit/test_performance_adapters.py passed five tests; make test-focused TEST=tests/unit/test_performance_assessment_status.py passed 13 tests. Both commands exited 0; production files remain unchanged.

Slice-limit and required-slice unit/Consumer contract tests are fully inspected. Planning tests reject 65 slices, a slice/measurement cross product above 4,096, duplicate labels and attempts to raise the safety ceiling; 64 overlapping slices reuse one candidate invocation. A duck-typed oversize report exercises the final serialized byte check but not allocation before serialization. Inference tests distinguish empty/predicate-failed/suppressed evidence and do not substitute row count for repetition-level independent units. Two identical repetitions can meet the declared variability policy; that does not prove population representativeness.

Required-slice unit tests use manually assembled family/comparison evidence to verify overall improvement cannot override a slice regression, revisions match, and insufficient evidence stays inconclusive. The Consumer contract traverses paired evaluation, aggregate estimation, corrected family inference, diagnostics, assessment and safe serialization with private sentinel inputs. It demonstrates pass/fail/inconclusive behavior without any promotion action. Its four deterministic cases are boundary fixtures, not empirical confidence calibration or proof of scalability at the cross-product ceiling. Previously reproduced R12/R14 remain relevant to workload complexity and family-budget enforcement. Focused Make runs exited 0: tests/unit/test_performance_slice_limits.py nine passed, tests/unit/test_performance_slice_rules.py four passed, and tests/contract/test_performance_slice_rules.py three passed (each through make test-focused TEST=<path>). No empirical coverage simulation or ceiling-sized load benchmark was run in this segment.

Resume contract and capacity-runner unit test modules are fully inspected. Resume tests prove completed trial indices/seeds are reused, only remaining trials construct a candidate, identity mismatch and unsupported private slices reject before the factory, and an explicit replayable CLI factory writes checkpoint and report artifacts. This is useful Memento/checkpoint boundary evidence; it does not exercise a crash during atomic persistence or attest the truth of supplied scores.

Runner tests exercise six real scheduled synthetic sends to an in-process fake, balanced signal allocation and monotonic scheduled/send/ack timestamps. The fake sender has no latency or failure, so this does not characterize backlog, cancelled futures or failure timing. Capacity search uses a deterministic mocked pass/fail threshold and checks at least five near-threshold calls; it does not establish independent cold starts or validate the completed summaries (R30/R31). Workload budget tests check declarations, while resource-cleanup tests search source strings; they do not prove live wall/disk enforcement or interruption cleanup. Docker unit normalization uses one valid synthetic JSON record, leaving acquisition failure classification uncovered (R34). No new finding is promoted in this segment. make test-focused TEST=tests/contract/test_performance_resume.py passed three tests and make test-focused TEST=tests/unit/test_performance_runner.py passed five; both exited 0. No Docker capacity or crash-injection run was performed.

Lifecycle and lifecycle-timing unit tests are fully inspected. They establish one successful setup/teardown around two repetitions, per-trial reset/warmup order, no invocation after setup failure, and capability rejection before side effects. The setup-failure test's name promises teardown will not mask a primary failure, but its observed teardown never runs and never fails; that assertion does not exercise competing teardown exceptions. This is a test-evidence gap, distinct from R5's reproduced asynchronous cancellation masking.

Timing tests prove legacy execution-v1 scope remains explicitly unknown, declared scope round-trips in execution-v2, unknown/mismatched scope blocks timing, and quality receives a warning instead. The adapters have empty setup/teardown and instant identity invocation. These tests verify versioned Consumer declarations and compatibility policy, not actual compilation, cache state, setup duration or device synchronization. Attestation remains necessary, and the shared lifecycle owner supplies a useful Template Method boundary without interpreting model state. make test-focused TEST=tests/unit/test_performance_lifecycle.py and make test-focused TEST=tests/unit/test_performance_lifecycle_timing.py each passed three tests and exited 0. No real model/cache/device timing experiment was run.

Both Consumer example modules and the delayed-label example contract test are fully inspected. The curation store owns selection lookup, revision/test split, consent and redaction before constructing EvaluationCases; generic reports retain only public identity and scores. Store initialization copies all selected records and references, so its memory is O(Consumer corpus), appropriate for this tiny example rather than a streaming production store. Duplicate selection references are not rejected; consent/revision/selection-unavailable branches are not all covered by the two tests. Email substitution is deliberately a synthetic redaction example and does not constitute a general privacy filter or access-control system.

The serving example exercises the public sweep/client/presentation interfaces against an ephemeral loopback TCP server. Each cold/warm point sends one byte and reads two; server/client close writers and server closure is in finally. Those cleanup calls have no explicit timeout, so this tiny loopback demonstration does not resolve R17's general uncooperative serving cleanup defect. One request per point produced displayed p99 evidence marked sufficient, which is an order statistic for this fixture, not a scientifically stable population-tail estimate. There is no capacity or external service claim in the example.

make test-focused TEST=tests/contract/test_performance_curation_example.py passed two tests. .venv/bin/python docs/examples/consumer_serving_sweep.py initially failed because the sandbox prohibited binding a loopback socket; the authorized escalated retry exited 0 and printed complete cold/warm rows at offered/achieved 100 items/s. This verifies example wiring only. No output artifact or payload was retained, and production files remain unchanged.

README, documentation index, security policy, testing/troubleshooting guides, agent-readiness guide and agent-run index/template are fully inspected. They provide coherent ownership and navigation: one runtime per process, Consumer-owned meaning, local synthetic verification, clean installed-wheel checks, opt-in local Grafana and explicit distinction between local and hosted evidence. Security policy requires private synthetic reproducers and states no public reporting channel; this review has neither contacted the maintainer nor disclosed real credentials.

Several prose claims require qualifications already established by executable review: architecture-check does not detect all import forms (R25), and its actual dependency-root list covers FastAPI, gRPC, OpenTelemetry and SQLAlchemy; it does not enforce placement of every optional performance-framework dependency. That qualifies the readiness guide's “optional adapter dependencies outside telemetry.otel” shorthand. Readiness's general statement of no deployment authority must exclude the separately configured documentation workflow; library/image publication remains distinct. Generated evidence is not durable merely because a Make run succeeds: later build/smoke can clear .build, as observed for the Collector logs. The testing guide says coverage is excluded, but git ls-files .coverage confirms a tracked generated coverage database at this snapshot. That is repository hygiene/provenance debt, not source behavior.

Agent-readiness explicitly marks representative-task performance measurement pending and external activation separate from committed mechanisms. Its checklist is a declaration inventory, not proof of every claimed invariant. The template's completion/time/cost/intervention fields and comparable-scope protocol are useful scientific reporting practices; no autonomous-performance baseline was fabricated from this review. External linked research/backlog and public documentation URL were not fetched or treated as verified current hosted state in this segment. Only read-only source/status commands and review-document edits were performed; no additional executable gate was needed for this prose inspection segment. A lookup guessed .github/workflows/docs.yml and returned a missing-file error; the file inventory identifies the previously inspected docs-pages.yml instead.

Configuration specification chapter 4 is fully inspected against the previously reviewed implementation/tests. It accurately distinguishes nested validation from enabled-only requirements, syntax from TLS file access, general hostname support from benchmark-local restrictions (R33), and schema maxima from emission settings. It explicitly states metric value cardinality is not bounded in-process merely by restricting dimension names. Canonical config fingerprints bind reference metadata, not resolved secret contents, so credential rotation intentionally does not change configuration identity. Fixed configured queue ceilings are not a proof of bounded callback materialization or eventual shutdown (R4/R7). Consumer integration and extraction/cutover guides are also fully inspected. Their composition-root/adapter seam preserves Consumer vocabulary and keeps framework ownership explicit. Migration declares intentional input hardening rather than silently preserving unsafe behavior. The cutover sequence avoids two provider stacks and keeps durable Consumer business evidence out of telemetry rollback. These are deployment instructions and historical ownership declarations, not evidence that the external Consumer checkout completed its tests or wheel cutover. No Consumer repository, package registry or historical scratch ticket was accessed to validate those external claims in this segment. Only source/prose reads, working-tree inspection and review-document updates were performed; no new gate or production edit was needed for this documentation-only inspection.

Paired-difference unit tests are fully inspected. They verify direct shared resampling of effects (rather than subtraction of unrelated score intervals), objective-oriented sign reversal, non-mean aggregate preservation, zero-denominator relative interval unavailability, payload-free comparison serialization and corrupt/nonfinite aggregate rejection. These deterministic two-case fixtures are useful arithmetic oracles. They use one default repetition and 100 draws: they do not establish empirical confidence coverage, adequate tail resolution, robustness under heavy-tailed samples or case/repetition hierarchy correctness (R11). The persisted artifact intentionally retains aggregate inference and source links, not private pairs, so independent recomputation requires separately retained Consumer-owned observations. Rejecting corrupt aggregate fields does not establish current-report binding for an otherwise valid stale artifact (R13). make test-focused TEST=tests/unit/test_performance_difference.py exited 0 with 11 passing tests. No new confidence-coverage simulation was performed in this segment; previously retained hierarchy/cost/overflow probes remain the stronger evidence for their corresponding findings.

Paired-execution unit tests are now fully inspected, closing the previous partial read. Four private cases with seeded shuffled ordering retain exact original indices and candidate alignment; a failure on candidate A still executes the hard case for B and withholds complete paired score evidence. Repeated seeded execution proves deterministic interleaving and both candidate-first orders. Complete case measurements retain private aligned numeric scores/aggregate callable only in process; corpus measurements remain explicitly unsupported for paired inference, and missing dataset identity rejects before either candidate runs.

These contracts validate alignment, closed availability and privacy boundaries. They do not prove that observations across repetitions are independent cases (R11), candidate state is reset between invocations, candidate randomness reaches plain callables, or scoring work stays within joint budgets (R9/R14). Reusing the same immutable EvaluationCase object is an alignment guarantee, not a deep copy of potentially mutable private inputs; Consumer candidates must avoid cross-pair mutation or supply an ownership/reset policy. Serialized reports deliberately cannot reconstruct private paired uncertainty. No new defect is promoted here. make test-focused TEST=tests/unit/test_performance_paired.py exited 0 with seven passing tests. No mutable-input interference or large-case workload experiment was performed in this segment.

Torch contract module is now fully inspected, closing its partial coverage entry. It uses fake backend/device/event/model objects, including the CPU path. Tests establish inference-mode entry/exit, selected-device synchronization on candidate failure, Consumer-established eval state, event recording on the supplied stream, event wait and milliseconds-to-nanoseconds conversion, timing-mode incompatibility, and CPU rejection of CUDA-event mode. This is useful Adapter conformance and timing-policy evidence, not real Torch CPU execution or accelerator calibration. The real-device marker contains an unconditional skip, not a provisioned-device test body; enabling that marker alone cannot produce CUDA qualification. make test-focused TEST=tests/contract/test_performance_torch.py passed five tests and skipped that one hook. No actual CPU model, CUDA build/device or stream overlap experiment ran here; peak-reset concurrency remains separately reproduced in R15.

Safety specification chapter 3 is now fully inspected, closing its partial entry. It usefully distinguishes schema/name privacy from arbitrary value privacy, SDK emission bounds from Collector deletion, explicit identity attestations from private-content hashes, and private pair observations from published aggregates. Consumers remain responsible for safe-looking labels/scores and bypass-producer log bodies. Dimension-name limits do not bound distinct values. Those distinctions should be preserved when fixing the confirmed defects.

Several absolute behavioral claims are contradicted by retained probes rather than by prose interpretation: bounded input envelope size does not bound iterable materialization (R4); bounded batch output does not bound splitter allocation (R16); stream duration does not bound iterator closure (R24); cancellation does not always terminate judge child tasks (R22); digest verification followed by a separate path read is not a verified-byte snapshot (R18); incomplete/contradictory report state can support assessment (R8); and linked aggregate identity is not fully bound to current report contents (R13). The documented per-call resampling work caps do not establish all evaluator joint budgets (R9/R14), and paired CASE sampling does not preserve hierarchy across repeated cases (R11). These are implementation/specification gaps already represented by confirmed findings; they should not be counted again as independent prose defects.

The statement that explain_compatibility's execution identities are external inputs “rather than a report extension” is stale relative to the same chapter's versioned execution-v1/v2 sections. The nested Value schema/Batch evaluation safety headings also separate the value table from its intended heading. Neither affects executable behavior. Only source/status reads and review updates were performed in this segment; no new test or external semantic-convention lookup was needed.

Traceability/inventory chapter 11 is fully inspected. Its responsibility map correctly separates immutable contracts, execution, analysis, integrations, serving and tooling and identifies Collector assets as a separate distribution boundary. Guarantee rows are navigation to evidence, not proof that each named test covers adversarial limits: confirmed findings qualify bounded names/values, flush/shutdown, unavailable-Collector verification and exact performance identity claims. Existing source inventory omits some support scripts (documentation build, operational/release/Consumer validators) and the documentation workflow, so it is a selected responsibility map rather than an exhaustive file manifest. The review coverage table is the snapshot's exhaustive tracked-file accounting.

The blanket “CI does not deploy artifacts” statement applies to verification.yml; docs-pages.yml separately deploys generated documentation on main after configured Cloudflare secrets. The “no dashboard/alert rule ... shipped” statement requires distinguishing portable operational view/alert specifications in operations/platform.toml from vendor-provisioned live rules. These distinctions prevent treating local fixtures as deployed operational or release evidence. Tail-sampler plaintext trust, external quotas/DNS, at-least-once duplication, separate Collector packaging and lack of vocabulary registry are explicitly documented and consistent with the inspected boundaries. No new runtime defect is inferred from these navigation/prose gaps. This segment used read-only source and status inspection plus review edits; no hosted deployment was contacted.

Evaluation unit test module is fully inspected. Small Consumer-ranking fixtures exercise case/corpus/custom structural Measurements, warmup/repetition accounting, seeded order, safe failure isolation, fail-fast propagation, objective-aware threshold/regression rules, name-set compatibility, report round-trip/nonfinite rejection and duplicate/empty ranking semantics. Latency is checked only for nonnegative values; throughput only for positivity. These tests establish public interface behavior rather than timing accuracy, confidence coverage or scalability at configured ceilings. A corrupted numeric field is rejected, but report cross-field contradictions remain outside this fixture (R8). The invalid execution plan test covers warmup/invocation bounds, not joint bootstrap score visits (R9). Structural Measurement and Rule protocols are useful Strategy seams that keep Consumer scoring/acceptance meaning outside platform mechanics. No new defect is promoted from this test inspection. make test-focused TEST=tests/unit/test_performance_evaluation.py exited 0 with 11 passing tests. No additional capacity/timing experiment ran in this segment.

Historical ML backlog-refinement handoff is fully inspected. It records planning and tracker audits (37 epics/77 tasks, relation counts), explicitly separates acceptance criteria from implemented/qualified code, and reports that production, Docker and device checks were not run. Its next-action/open-work statements are dated handoff context, not current implementation status: the present checkout already contains much of the described identity/inference/adapter work. No Linear readback was performed for this review segment, so historical issue counts, statuses, relations and approvals remain unverified external state. The handoff's warning that exact versions/device support require executable qualification is consistent with the fake Torch tests and skipped real-device hook inspected here. This record is not one of the fresh-environment representative implementation baselines required by the agent-readiness measurement protocol. Only read-only repository inspection and review-document edits occurred; no new gate was run.

Implementation guide is fully inspected. Its pattern table maps real seams to pressures: structural ports/adapters for dependency direction, facade/factory/null object for lazy disabled selection, immutable values for closed contracts, context managers for scoped ownership, exporter decorator for framework privacy, Measurement/Rule strategies for Consumer meaning, and Collector pipelines/bulkheads for ordered processing and destination isolation. These patterns already exist; adding abstract classes, registries or service locators solely to increase the pattern count would obscure ownership and hot-path cost. A static create() selector is more precisely a simple factory than an inheritance-based Factory Method, but the useful composition boundary is clear regardless of terminology.

The educational flow predates optional performance integrations: statements that the entire performance package never emits telemetry/has no runtime dependency need narrowing to its dependency-free evaluation core (explicit telemetry bridge is present). Assertions that context managers preserve all business exceptions, shutdown flushes/stops providers, incomplete evidence never passes and input bounds precede work must be qualified by R5/R7/R8/R4. Those confirmed mechanisms matter more than pattern labels. Frozen schemas do not make private Consumer input/output objects deeply immutable. Snapshot recorders have O(retained items) memory and are useful test doubles rather than production-capacity adapters (R32).

The guide appropriately admits common intake is a shared bottleneck and that bulkheads do not imply unlimited availability. Its no-global-provider and explicit framework ownership explanations align with inspected implementation/tests. No production architecture was changed in this review-only segment; the report's architecture recommendations will prioritize bounded work and explicit resource ownership over ornamental pattern proliferation.

Tracked .coverage is inspected as a generated SQLite artifact rather than source code: 196,608 bytes, schema version metadata and integrity checked read-only. Its filesystem timestamp is September 22, predating this review, and it is tracked despite coverage outputs being described as excluded. No raw path strings or recording command were printed: only counts and selected version/branch metadata were queried. Coverage records are observations about an earlier run, not proof that current source lines are scientifically correct or scalable. File paths and line/arc records can become stale after the performance package refactor; this database must not be used as current coverage evidence without regeneration tied to source revision and test configuration. It was neither modified nor deleted. Read-only SQLite queries exited 0: integrity_check=ok, coverage version 7.16.1, branch recording enabled, 13 file records (all absolute paths; eight performance package paths), one context, zero line-bit rows and 4,375 arc rows. These counts describe artifact contents only. No test/toolchain command was run in this segment.

Historical PRF-1 verification catalog is fully inspected. It explicitly labels planned tests/locations and historical baseline commands as design, not completed implementation evidence. Its seam-based approach (public workflows, installed imports, actual cleanup/persistence boundaries) is sound and avoids one test per extracted file. Several planned adversarial cases are precisely what current tests do not prove: dynamic/relative import detection (R25), simultaneous primary and teardown failure (R5), exclusive peak reset (R15), timed-out child containment (R1/R3), current comparison linkage (R13), and hostile presentation characters (R19). Passing the present suite cannot be substituted for completion of these specific planned oracles.

The catalog recommends small 100-draw fixtures for functional tests and separately qualified optional/hardware cells. That is appropriate for deterministic behavior but does not validate confidence-tail precision or scientific coverage. Its traceability table references V-02 although no V-02 section exists in this file; the compact-interface V-01 and ownership V-19 describe related coverage. Historical absolute interpreter paths and 41-module counts are snapshot-specific navigation, not current environmental authority. No historical approval or CI/device outcome is inferred. This segment only read source/status and updated review documentation.

Historical PRF-1 specification is fully inspected. Its 15 requirements and 36 user stories preserve public behavior while deepening ownership and narrowing the recommended interface. Co-located validated report codecs, pure contracts, explicit effects, shared canonical objects and distinct specialist results are cohesive architectural goals. Preserving behavior also preserves pre-existing defects unless separately scoped; today's confirmed safety/statistical findings must not be dismissed because a relocation was behavior-compatible.

The document contains migration-policy tension: it promises direct legacy imports and lists removing old imports out of scope, yet later calls for removal of old implementation routes and dedicated compatibility tests. It also first requires reviewed fixed legacy byte fixtures, then its companion catalog declines a frozen compatibility corpus. Current root export identity evidence cannot prove every removed historical direct route or canonical byte promise. These are historical scope/verification ambiguities rather than new confirmed current-code regressions. The source baseline, contract number and module/export counts are explicitly dated; compatibility.toml and current files remain authoritative. No issue approval, external Consumer compatibility, historical matrix result or permission to implement is inferred from this planning document. Only inspection and review documentation updates occurred in this segment.

Historical PRF-1 refactor plan is fully inspected. It gives every original module a disposition and orders pure contracts/records below execution and analysis, with effects at explicit integration/tooling seams. The 22-name interface is a discoverability facade exposing canonical objects, not a competing implementation. Keeping specialist async/batch/serving results distinct avoids a universal runner that would erase timing and ownership differences. These are substantive deep module decisions rather than a raw file-count target.

Historical commitments are not current proof: the plan promises legacy direct routes and class qualified names, while current canonical layout/root identity checks establish only their inspected surfaces. Environment collection currently lives in core despite the plan placing collection effects outside pure core; its explicitly called standard-library behavior does not create import-time host probes, but the ownership plan and implemented location differ. Dynamic import/ layer enforcement planned here is stronger than the current validator (R25). Completed-directory moves do not establish every planned acceptance oracle or remove the remaining large evaluator's orchestration complexity. No historical approval, migration execution, Consumer usage audit or rollback evidence is claimed. This segment read the complete plan in two bounded ranges and updated the review; no production edit or new executable gate was performed.

Historical ML research contract inspection

Read all 133 lines of docs/research/ml-evaluation-integrations.md, 126 lines of docs/research/ml-evaluation-statistics-and-provenance.md, and 130 lines of docs/research/ml-inference-execution.md. Each explicitly identifies its content as research or planning recommendations rather than implemented, approved, or hardware-qualified behavior. Their references to the former performance/evaluation.py layout and serial report-v1 evaluator describe a historical baseline, not the current execution module inventory. This inspection assessed the committed text and its relationship to the implementation; it did not revalidate linked external documentation or claim those pages remain current.

The proposed contracts provide useful intent evidence for existing findings: independent sampling units and repeatability-versus-population uncertainty (R11/R30), explicit classification semantics (R20/R21), validated immutable history (R18), bounded streaming/judge cancellation (R22/R24), bounded process IPC and kill/join cleanup (R1/R3), atomic ownership of framework peak counters (R15), and bounded batch splitting and serving cleanup (R16/R17). These are supporting context, not additional independent defects. The notes correctly distinguish SDK chunks from tokens, consumer-owned data and judging from telemetry delivery, unavailable measurements from zero, and mocked adapters from real hardware evidence. Their proposed accumulator and injected adapter interfaces are cohesive uses of Strategy and Ports/Adapters; neither requires adopting Beam or a broader framework dependency.

Commands: wc -l on the five remaining research notes, bounded sed reads of these three complete notes, rg -n to locate review/coverage insertion points, and git status --short all exited 0. Working-tree status remained only untracked docs/reviews/. No executable checks were run for this prose-only inspection; prior adapter and statistical contract checks remain the runtime evidence.

Distribution and capacity research inspection

Read all 320 lines of docs/research/opentelemetry-platform-cross-repository-distribution.md and all 541 lines of docs/research/performance-testing.md in bounded sections. These are historical recommendations, not release or capacity evidence. Linked external pages were not re-fetched in this inspection, and their time-sensitive claims are not adopted as verified current facts.

The distribution note keeps Python installation separate from Collector operation, preserves consumer-owned overlays, and distinguishes byte identity from trusted provenance and behavioral qualification. Its wheel/OCI/manifest separation is an appropriate deployment boundary, not a reason to add runtime abstraction layers. Prior local wheel smoke and native Collector checks establish only their recorded local contracts; they do not establish attestation, publication, hosted matrix, or cross-repository consumer qualification. The note explicitly reserves those claims for corresponding release gates and identifies version/component facts that require rechecking.

The capacity note defines a substantially stronger experiment than merely producing a passing JSON record: independent cold starts, disclosed local resources, scheduled arrivals, generator validity, warmup convergence, complete accounting, resource/queue time series, retained failed points, and confirmation soaks. This reinforces R28/R29 (counting sink bounds/accounting), R30/R31 (independent replicates and artifact identity), R32 (recording-mode memory), R34 (missing measurements becoming zeros), and R35 (reported versus actual workload shape). Its fan-out, persistence, tail-sampling, histogram and soak phases remain methodology and future scope where the executable harness does not implement them; they are not silently inferred from the green delivery smoke test.

The note correctly treats CPU, latency-ratio, queue and sample-count thresholds as explicit engineering policy rather than universal scientific guarantees. In particular, the 10,000-item p99 convention is not a demonstrated precision criterion, and five process replicates with a percentile bootstrap do not by themselves validate interval coverage. Final claims must disclose the sampling unit, uncertainty method, experimental dependence, observed curve and actual envelope. No sustainable-capacity number was measured or endorsed during this review.

Commands: git status --short and five bounded sed reads exited 0. Only untracked docs/reviews/ was present. No tests were rerun for these prose inspections; no production files were changed.

Complete public domain contract inspection

Read all 534 lines of docs/specs/02-domain-model-and-public-api.md, including the export inventory, public call surfaces, evidence extensions, type relationships, value envelopes, context semantics and three adapter behaviors. The structural Measurement, rule, execution, resource-reader and injected client seams provide actual Strategy and Ports/Adapters extension points without requiring inheritance or registration. Immutable validated records, the compact API facade and shared Null Object are useful patterns because they concentrate ownership and remove branching at consumer call sites. The broad root export inventory is a discoverability cost already mitigated by the compact API; adding another pattern layer would not repair the confirmed behavioral defects.

Several statements describe intended guarantees stronger than the current implementation evidence: partial/failed evidence never passing (R8), bounded cleanup (R1/R3/R5/R7/R17/R22/R24), linked comparison evidence matching the supplied reports (R13), bounded work (R9/R12/R14/R16), and digest-validated local history (R18). The chapter's later sentence that repetitions produce "independent trial scores" is too strong: repeated execution does not establish independent population sampling or independent process starts. This should instead describe repeated-trial summaries and explicitly state the consumer's independence assumptions, consistent with its earlier repeated-trial variability distinction and findings R11/R30. The report export inventory and Mermaid diagrams are contract documentation, not proof of enforcement or qualification.

Commands: wc -l for the four unfinished ledger files, git status --short, and three bounded sed reads of the complete domain chapter exited 0. Only untracked docs/reviews/ was present. No executable checks were rerun for this documentation inspection; retained findings and their probes remain the contradicting implementation evidence. Production files were unchanged.

Complete evaluation guide inspection

Read all 821 lines of docs/performance-evaluation.md in four bounded sections. Its Consumer-owned Measurement and policy examples, explicit private paired evidence, completed-trial restart, injected tracker/provider seams and serving identity boundaries are coherent with the domain model. Descriptive percentiles are correctly separated from a Consumer-declared IID/precision policy, and serving curves explicitly make no production capacity or heterogeneous-hardware confidence claim. Lazy dependencies and structural interfaces are useful Adapter/Strategy choices; a universal provider or benchmark framework would blur rather than strengthen those boundaries.

The guide requires documentation corrections alongside the confirmed behavioral findings. The early report-v2 privacy paragraph says execution and slice sections remain unavailable, although later sections document their implemented typed attachments. The GenAI paragraph suggests gen_ai.token.type can be accepted when a Consumer independently adds it to another schema surface; the non-relaxable normalized credential-name safety floor rejects that name regardless of schema registration. Its repeated claim of "independent trial scores" requires the same qualification noted in the public domain chapter: repetitions are execution observations, not proof of independent sampling. These are documentation inconsistencies, not newly demonstrated production vulnerabilities.

Claims about incomplete evidence never passing, fully linked comparison documents, bounded execution, safe history reads, exclusive peak-counter ownership, classification ordering, and cancellation propagation must be qualified or repaired using R1–R3, R5, R8/R9, R11–R18 and R20–R24. The guide's explicit warning that cooperative cancellation cannot terminate hostile adapters remains appropriate; it does not excuse leaked ordinary child tasks or cleanup awaiting outside the configured bound. Examples containing model, path and policy placeholders were inspected as explanatory snippets rather than claimed standalone runs; the synthetic curation and serving examples have their separately recorded executable evidence.

Commands: git status --short and four bounded sed reads exited 0. Working-tree status remained only untracked docs/reviews/. No tests were rerun for this prose inspection; production files were unchanged.

Evaluator contiguous inspection, lines 1–1440

Read the first 1,440 lines of the current 3,129-line execution evaluator in four bounded chunks, covering imports/compatibility exports, construction, replayable factories/checkpoints, synchronous and lifecycle adapter entry points, paired execution, report assembly, contract validation, warmups, and the start of single-trial execution. This extends prior targeted inspection rather than claiming the remaining lines are covered. Checkpoint identity is checked before a fresh factory is invoked; completed checkpoints return evidence without invoking it. The factory and checkpoint callback remain explicit Consumer effects. Structural invokers centralize the main execution loop, but lifecycle and paired flows retain substantial specialized orchestration; further modularization should follow these ownership seams rather than add ornamental pattern classes.

The paired slice identity scan directly reconfirms R12. Construction materializes private case and Measurement sequences before cardinality checks; bounded item counts do not bound arbitrary private payload sizes, which remain a Consumer responsibility rather than a promised byte-bounded dataset. Paired observations and slice references retain successful outputs until post-session reduction, so memory scales with retained executions and overlapping slices. Any scalability claim must disclose that retention instead of treating payload-free serialization as bounded private working memory.

The paired trial throughput denominator sums durations of successful candidate calls only. Failed-call time, warmups, Measurement reduction, orchestration and peer execution are excluded; the report elapsed time instead measures the whole paired session. These quantities answer different measurement questions. A failure-path throughput figure cannot be interpreted as full end-to-end sustainable throughput, and comparison/presentation should state that scope. No additional defect is promoted from this inspection without an observable contract and retained reproduction.

Commands: git status --short and four bounded sed reads exited 0. Status remained only untracked docs/reviews/. No executable checks were rerun in this inspection; production files were unchanged.

Evaluator contiguous inspection, lines 1441–3129

Read the remaining evaluator lines in five bounded chunks, completing contiguous coverage of all 3,129 lines. This covered single-trial execution, slice and overall reduction, aggregate comparison, strict identity/provenance checks, structural acceptance rules, report persistence, report-v1/v2 loading, uncertainty parsing and primitive validation. Overall summary lookup scans trial measurements once per Measurement, while slice scoring and bootstrap work multiply across slice/Measurement/trial scopes; cardinality caps do not replace the joint-work limitations already identified in R9/R14. Fixed schemas and immutable model reconstruction supply useful validation boundaries, but they do not establish cross-field completeness merely because parsing succeeded (R8).

The contiguous inspection revealed a verification lead: _run_trial increments overall failed cases for LifecyclePhaseError but does not increment selected slice failure counts in that branch, unlike its ordinary-exception branch. _reduce_slices then retains the full eligible denominator. The subsequent retained lifecycle_slice_probe.py demonstrates rejected report construction and confirms R36. That lead is now closed with observed evidence; file-reading coverage alone did not establish it.

The main report loader checks file size before reading and checks the resulting payload again before parsing. This bounds accepted documents but does not make the pre-read filesystem snapshot atomic; R18 remains the stronger demonstrated identity race at the history boundary. Readers reconstruct fixed records but several legacy document parsers use get() rather than exact-field sets; unknown discarded fields are not evidence of a persisted arbitrary-metadata capability. JSON numerical and UTF-8 validation is explicit. Neither successful parsing nor local atomic replacement provides authenticity or externally qualified statistical inference.

Commands: git status --short and five bounded sed reads exited 0. Only untracked docs/reviews/ was present. No executable checks were rerun in this reading segment; production files were unchanged.

Lockfile structural inspection

Parsed the complete 3,210-line uv.lock with the standard-library TOML reader using the retained docs/reviews/lock_inventory.py. Inspected the complete package-name/version inventory, root optional dependencies and requirement metadata, nine top-level resolution markers, and every source/artifact record structurally. There are 146 distinct package names, 145 registry sources and one editable local root, 1,742 artifacts with positive integer sizes and syntactically valid SHA-256 hashes, all hosted under files.pythonhosted.org. Every dependency name resolves to a package record. Base dependencies are empty; the root extras agree with pyproject.toml. Python ranges agree after insignificant whitespace normalization; the initial literal string comparison returned false solely for that spacing.

uv lock --check --offline exited 0 and reported 146 resolved packages. This establishes current local lock consistency, not remote artifact authenticity, absence of vulnerabilities, or installability on every advertised OS/interpreter. Optional MLflow and Torch graphs are substantial but are not mandatory base dependencies. Artifact sizes and wheel inventory are distribution metadata, not runtime memory or performance measurements. Prior clean base-wheel smoke and selected adapter tests remain the actual installation/execution evidence; CUDA remains unqualified.

Commands: PyCharm environment lookup selected Python 3.14.7/uv; initial bounded sed output was truncated and was superseded by the full parsed inventory. rg metadata searches, the retained Python inventory, its Ruff check, and uv lock --check --offline exited 0. No dependencies were downloaded or updated. Production files were unchanged. File-reading coverage is now closed; final synthesis and evidence/coverage audit was subsequently completed as recorded below.

Architecture and complexity observations

Pattern Existing implementation Assessment
Null Object NoopTelemetry, _NoopRuntime Keeps disabled operations inert and avoids optional imports. Shared stateless scopes avoid per-operation allocation.
Adapter / ports Telemetry, _RuntimeAdapter, execution protocols, OpenTelemetry Keeps SDK/framework details outside backend-neutral types. Narrow protocols are preferable to a new inheritance tree.
Factory / composition root TelemetryRuntime.create() and exporter factories Enabled startup assembles providers explicitly; disabled startup exits before acquisition.
Decorator _PrivacyPreservingSpanExporter, LifecycleExecutionAdapter Adds privacy and lifecycle behavior at real boundaries. Cleanup guarantees require R3/R5 repairs.
Context manager / scoped ownership Binding and operation scopes ContextVar isolation and token restoration are appropriate for async consumers; production operation exit preserves business exceptions.
Observer callbacks SQLAlchemy event listeners Hooks are explicitly registered and removed; failure rollback is local. Concurrent instrumentation/shutdown is not yet experimentally reviewed.
Strategy Assessment rule protocol and threshold/confidence/slice rules Separates Consumer policy from evidence generation. R13 shows why the shared evidence-validation boundary must be stronger.
Repository ReportStore Content-addressed documents and a recoverable SQLite index keep storage mechanics out of policy. R18 requires parsing one verified snapshot.
Adapter PyTorchExecutionAdapter, injected MLflow client Keeps framework execution and remote credentials at explicit Consumer boundaries. Synthetic tests establish call mechanics, not hardware or hosted delivery.

The quantile rank helper passed 2,475 independent exact-binomial tail checks over sample counts 2--100, quantiles 0.1/0.5/0.9/0.95/0.99, and confidence levels 0.5/0.8/0.9/0.95/0.99. The oracle summed comb(n,k) * p**k * (1-p)**(n-k) using math.fsum, independently of the implementation's incomplete-beta routine; neither tail exceeded (1-confidence)/2 by more than 1e-12. The formula is documented in the NIST binomial distribution reference. This supports conservative tail coverage on that grid, not all million-sample numerical cases, tightest possible ranks, or an empirical IID claim.

Core schema sets are immutable and capped, attribute envelopes are bounded, metric lookup is a linear scan capped at 256 definitions, and instrument creation/cache access is serialized by one lock. These are finite costs, not measured proof of hot-path suitability. Benchmark lookup and lock contention under representative multithreaded workloads before introducing an index or changing synchronization. RecordingTelemetry retains observations without a cap by design for contract tests; it is not a production delivery queue. Distinguish that test adapter from SDK queues, which receive explicit queue and batch bounds.

Configuration uses immutable typed values and validates transport/TLS combinations. Potential remaining configuration probes include oversized secret files, exception causes containing private paths or references, and bounds on logger profile/override collections. These are investigation leads, not confirmed findings here.

Evidence and limits

  • Interpreter lookup: PyCharm reported project .venv/bin/python, Python 3.14.7, package manager uv.
  • A bounded inline experiment using that executable reproduced R1 and R2; exit status 0, cleanup completed. The exact experiment inputs are given above.
  • make test-focused TEST=tests/unit/test_performance_async_evaluation.py: passed, 6 tests in 0.11 seconds. Existing tests do not establish R2's distinction.
  • make test-unit: passed, 446 tests in 3.41 seconds on Python 3.14.7.
  • make test-static: passed Ruff, strict mypy (51 source files), documentation checks (52 Markdown files), architecture checks, and static Collector checks.
  • make test-integration: 123 passed, 1 skipped, 2 warnings in 7.73 seconds. The skip requires Consumer-provisioned CUDA device/build identity evidence. Warnings concerned Starlette's deprecated AnyIO alias and expected divide-by-zero in the constant-target R2 contract.
  • The resistant-child experiment, iterable-consumption/cancellation experiment, and stdlib-log numeric experiment all exited 0; observations are recorded above.
  • The real SDK encoding/provider cleanup, report-consistency, work-counting, and exact-binomial oracle experiments exited 0. The first report-consistency attempt failed on an import of the non-re-exported load_report_json; the corrected evaluator-module import produced the observations above.
  • make test-focused TEST=tests/unit/test_performance_resampling.py: passed, 14 tests in 0.10 seconds. The inspected tests cover invalid non-finite inputs, pairing, grouping and work ceilings, but not R10's derived overflow or R11's repeated-case inference.
  • .venv/bin/python docs/reviews/resampling_probe.py: exited 0; all three bounded scenarios returned non-finite evidence as recorded in R10. An initial probe used the default mean in all cases; the retained revision isolates subtraction and ratio overflow with finite callbacks, removing summation as a confounder.
  • .venv/bin/python docs/reviews/paired_repetitions_probe.py: exited 0; four case/group and one/twenty-repetition outputs confirm R11.
  • .venv/bin/python docs/reviews/paired_slice_probe.py: exited 0; operation counts at three input sizes confirm R12 without timing extrapolation.
  • uv run --frozen ruff check docs/reviews/resampling_probe.py docs/reviews/paired_repetitions_probe.py: passed.
  • Adding docs/reviews/paired_slice_probe.py to that Ruff command initially reported B023 for the profiler's source variable captured inside the loop. Moving the invariant source path outside the loop fixed it; Ruff passed for all three probes, and the slice probe was rerun with identical counts.
  • No production code was changed. No repository capacity benchmark was run; the bootstrap timing is one bounded local observation, not a capacity claim.
  • Docker, packaging, and release gates have not run during this review yet. Passing local static/unit/integration gates cannot establish those results.
  • .venv/bin/python docs/reviews/assessment_link_probe.py: exited 0; stale comparison passed and current comparison failed, confirming R13.
  • make test-focused TEST=tests/unit/test_performance_statistical_rules.py: passed, 15 tests in 0.10 seconds. These tests do not cover distinct runs with matching descriptive identities.
  • uv run --frozen ruff check docs/reviews/assessment_link_probe.py: initially failed E501; wrapping the long expression fixed it, and the rerun passed.
  • .venv/bin/python docs/reviews/slice_family_work_probe.py: the first attempt rejected a 2,000 budget as expected; the corrected isolation probe exited 0 with 8,000 visits under a 4,000 budget, confirming R14.
  • uv run --frozen ruff check docs/reviews/slice_family_work_probe.py: passed.
  • make test-focused TEST=tests/unit/test_performance_slice_comparison.py: passed, 5 tests in 0.18 seconds; no cumulative-family-budget contract exists.
  • make test-focused TEST=tests/unit/test_performance_checkpoints.py: passed, 5 tests in 0.12 seconds.
  • make test-focused TEST=tests/unit/test_performance_randomness.py: passed, 14 tests in 0.12 seconds.
  • make test-focused TEST=tests/unit/test_performance_sufficiency.py: passed, 15 tests in 0.10 seconds.
  • .venv/bin/python docs/reviews/peak_ownership_probe.py: exited 0, two active owners confirmed. Ruff for that probe passed.
  • .venv/bin/python docs/reviews/batch_cardinality_probe.py: exited 0, 100,000 reads before rejection confirmed. Ruff for that probe passed.
  • make test-focused TEST=tests/unit/test_performance_batch.py: passed, 4 tests in 0.09 seconds.
  • make test-focused TEST=tests/unit/test_performance_streaming.py: passed, 10 tests in 0.15 seconds, including installed DataSketches behavior.
  • make test-focused TEST=tests/unit/test_performance_resources.py: passed, 5 tests in 0.09 seconds.
  • make test-focused TEST=tests/contract/test_performance_resources.py: passed, 3 tests in 0.09 seconds; these use injected backend counters, not CUDA hardware.
  • .venv/bin/python docs/reviews/serving_cleanup_probe.py: exited 0; both cleanup scenarios stalled through the 100ms observation, confirming R17.
  • uv run --frozen ruff check docs/reviews/serving_cleanup_probe.py: passed.
  • make test-focused TEST=tests/unit/test_performance_serving.py: passed, 9 tests in 0.10 seconds.
  • make test-focused TEST=tests/contract/test_performance_serving_delivery.py: passed, 1 local synthetic-server test in 0.14 seconds.
  • make test-focused TEST=tests/contract/test_performance_torch.py: passed, 5 tests and 1 skipped in 0.09 seconds. The skip requires real CUDA identity evidence.
  • make test-focused TEST=tests/unit/test_performance_curation.py: passed, 7 tests in 0.09 seconds.
  • make test-focused TEST=tests/contract/test_performance_mlflow.py: passed, 1 injected-client test in 0.11 seconds.
  • make test-focused TEST=tests/contract/test_performance_mlflow_export.py: passed, 4 injected-client tests in 0.13 seconds; no remote export was made.
  • make test-focused TEST=tests/unit/test_performance_evaluation.py::test_ranking_metrics_have_explicit_duplicate_and_empty_semantics: passed, 1 test in 0.09 seconds.
  • .venv/bin/python docs/reviews/history_snapshot_probe.py: exited 0; returned report bytes differed from requested digest, confirming R18.
  • uv run --frozen ruff check docs/reviews/history_snapshot_probe.py: passed.
  • make test-focused TEST=tests/contract/test_performance_history.py: passed, 4 tests in 0.41 seconds.
  • make test-focused TEST=tests/unit/test_performance_provenance.py: passed, 6 tests in 0.29 seconds.
  • make test-focused TEST=tests/delivery/test_performance_provenance.py: passed, 2 source-inspection tests in 0.01 seconds. These do not run installed-wheel smoke.
  • .venv/bin/python docs/reviews/html_columns_probe.py: exited 0, six headers versus seven data cells confirmed R19.
  • uv run --frozen ruff check docs/reviews/html_columns_probe.py: initially failed E501; wrapping the constructor call fixed it, and the rerun passed.
  • make test-focused TEST=tests/delivery/test_performance_cli.py: passed, 8 subprocess contracts in 3.11 seconds.
  • make test-focused TEST=tests/contract/test_performance_reporting.py: passed, 1 HTML contract in 0.09 seconds; column alignment is not asserted.
  • .venv/bin/python docs/reviews/class_order_probe.py: initial attempt failed when fetching the missing default-ROC score. The retained probe reports that absence, isolates numeric tests with average="macro", and exits 0. It confirms R20/R21 and emits two dependency class-order warnings. An early hypothesis that lazy submodule loading caused the absence was disproved: the error is the unsupported averaging parameter, not a missing module attribute.
  • uv run --frozen ruff check docs/reviews/class_order_probe.py: passed after each retained probe revision.
  • make test-focused TEST=tests/contract/test_performance_classification.py: passed, 3 tests in 0.57 seconds.
  • make test-focused TEST=tests/contract/test_performance_calibration.py: passed, 3 tests in 0.57 seconds.
  • make test-focused TEST=tests/contract/test_performance_regression.py: passed, 4 tests in 0.57 seconds, with the expected constant-target R² warning.
  • make test-focused TEST=tests/unit/test_performance_calibration.py: passed, 4 tests in 0.09 seconds.

  • .venv/bin/python docs/reviews/llm_lifecycle_probe.py: exited 0; confirmed R22, R23 and R24 using synthetic cooperative tasks and no provider requests.

  • uv run --frozen ruff check docs/reviews/llm_lifecycle_probe.py: passed.
  • make test-focused TEST=tests/contract/test_performance_llm.py: passed, 4 tests in 0.10 seconds.
  • make test-focused TEST=tests/contract/test_performance_llm_judges.py: passed, 4 tests in 0.09 seconds.

  • make test-focused TEST=tests/contract/test_performance_llm_telemetry.py: passed, 3 tests in 0.08 seconds.

  • make test-focused TEST=tests/unit/test_performance_telemetry.py: passed, 5 tests in 0.10 seconds.

Current coverage and completion audit

Requested review dimension Evidence Conclusion
Complete repository inspection Git reconciliation: all 252 tracked paths, exactly one Read entry each Snapshot inspection coverage is complete, including generated-file structural inspection.
Scientific basis Controlled retained reproductions, operation counts, independent exact-binomial oracle, declared sampling assumptions and explicit counterexamples Findings distinguish observed failures from hypotheses; they do not extrapolate local results to production.
Scalability and performance Work/retention analysis and R4/R9/R11/R12/R14/R16/R28–R35 Several boundedness and evidence defects contradict a repository-wide efficiency claim. No sustainable-capacity benchmark or soak was performed.
Design patterns Concrete pattern table with owners, extension points and tradeoffs Null Object, Adapter, Factory/composition root, Decorator, scoped ownership, Strategy and Repository are present. Additional patterns require a real variation or ownership boundary.
Contract verification Recorded unit/static/integration, native Collector/delivery, installed-wheel smoke, docs-site and focused checks Local supported contracts passed as recorded; reproduced omissions remain despite green suites. Hosted, consumer, signing, publication and CUDA evidence is absent.
Preservation and handoff Same HEAD 86c8517, empty tracked diff, only untracked review artifacts Production behavior is preserved; fixes and their required contracts are identified per finding.

Final artifact checks: configured Python environment lookup succeeded; .venv/bin/ruff check docs/reviews exited 0; make docs-check exited 0 (53 Markdown files); git diff --stat produced no tracked changes and git rev-parse --short HEAD returned 86c8517. rg --files docs/reviews confirmed the retained probes and review documents exist. Prior whole-suite gates were not repeated after prose and probe additions because no production source, configuration or dependency changed. Their exact results and exceptions remain in this report and the inspection journal. Unexecuted workload/hardware profiling recommendations remain evidence limits, not hidden completion claims.

Git inventory reconciliation found 252 tracked paths and 252 unique Read ledger entries, with zero missing or extra paths. Finding reconciliation found every ID R1–R36 exactly once: 14 high and 22 medium. These are inspection/record consistency checks, not a claim that every line is scalable. An initial Ruby audit used unavailable filter_map and exited 1; its compatible replacement exited 0. The historical-journal extraction exited 0. A subsequent no-op patch failed to match a wrapped line; it changed no file and was superseded by this explicit audit update. No source behavior changed.

The file-level coverage ledger is closed. Its entries describe inspection, not correctness or performance qualification. Historical segment records and command outcomes are retained in the inspection journal. Claim reconciliation and review synthesis are complete for this snapshot. No finding has been repaired in production code. The requested universal scalability assertion is contradicted by the confirmed findings; this review reports that result rather than manufacturing a guarantee.