First-consumer qualification¶
Commerce Recommendations is the first consumer, but its source is deliberately outside this
repository. Its API and worker instrumentation must use the built candidate wheel through the public
TelemetryRuntime/Telemetry interface; copying a provider implementation or importing platform
internals is not qualification.
The API process owns one runtime, instruments each owned FastAPI app and SQLAlchemy engine once, and performs bounded shutdown. Its schema must use route templates, method, status class, strategy, and closed outcomes as metric dimensions. It must never use raw paths, request/scope/product/run/snapshot identifiers, headers, payloads, idempotency values, recommendation payloads, or SQL inputs as metric dimensions or attributes. Successful serving emits its registered metric and sampled trace without an extra application INFO event.
The worker process also owns one runtime. It reports startup, readiness, polling, claim, stop, and process failure through closed vocabulary. A claimed Training Run context may be copied into its heartbeat thread only when thread context propagation is enabled, and the worker must not create a span per heartbeat. One parent operation covers source read, generation, evaluation, publication, and retention; pure ranking/evaluation helpers remain telemetry-free. Telemetry failure must not change leases, publication, retention, durable evidence, HTTP output, or failure classification.
Before platform release, the consumer returns a JSON manifest validated by
scripts/verify_consumer_evidence.py. It binds all
consumer results to the exact wheel SHA3-512, Collector image/configuration tuple, lock, and consumer
schema. Its required gates cover installed-candidate parity, API/durable evidence, 100 interleaved
request/run contexts and 10,000 varied identifiers, privacy canaries across every output channel,
telemetry failure isolation, and consumer-owned domain dashboards/runbooks. Every gate and retained
artifact has a pass/fail/skipped result and SHA3-512; failed or skipped entries block release.