Skip to content

R33

What to build

The local benchmark rejects nonlocal endpoints before constructing an enabled runtime.

Source and evidence

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

the reviewed implementation 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 the reviewed implementation. Initial lookups of guessed the reviewed implementation and the reviewed implementation paths failed; the actual recorder was located and inspected in the reviewed implementation. No transport stress, full-duration runtime measurement or external endpoint test was run in this segment.

Acceptance criteria

  • [ ] A nonlocal syntactically valid URL rejects before the runtime/exporter factory or any network side effect.
  • [ ] Supported loopback IPv4/IPv6 and explicitly justified localhost forms pass; ambiguous credentials/hosts reject safely.
  • [ ] General production TelemetryConfig still supports remote endpoints.
  • [ ] Tests inject the factory and assert locality enforcement at the benchmark boundary without contacting a real host.
  • [ ] Preserve Consumer-owned meaning, payload-free evidence, disabled optional-import isolation, safe diagnostics and the non-relaxable Safety Floor.
  • [ ] Run the narrowest observable contract, then applicable committed Make gates. Record every command and outcome; update specifications/compatibility evidence for changed public or wire contracts. Run native Collector verification for changed Collector assets and build for packaging changes.

Design guidance

Keep locality policy in the local harness, separate from general configuration syntax. Parse endpoints carefully and avoid a DNS or redirect path that escapes the local-only constraint.

Keep prefactoring narrow and verifiable in this slice. Reuse established owners and structural interfaces; introduce a pattern only when it clarifies a real responsibility or variation point. Do not add consumer vocabulary or private payloads to platform code or evidence. Mocked/local results must not claim hosted, production, accelerator or release qualification.

Blocked by

None (can start immediately). Shared-area coordination is useful, but no other review fix is a genuine prerequisite for this slice.

Verification scope

Convert the described counterexample or investigation oracle into an observable test at the lowest suitable public boundary. Prefer bounded operation-count or deterministic interleaving evidence to flaky timing assertions; timing guarantees need a declared tolerance and independently owned cleanup. This ticket authorizes remediation/research, not publication or deployment.