Observability audit — component and operation coverage
Read-only audit of the working tree (main scrapers, cloudflare backend), performed before any
implementation. The percentage is computed from the 46-row inventory in §2, not estimated.
Statuses: V implemented and verified by a test that asserts emission · I instrumented (emits an event carrying a usable identifier) · P partial (emits something, but missing identity, outcome, or duration — or failure-only) · N nothing.
1. Headline
| Measure | Value |
|---|---|
| Inventoried operations | 46 |
| Verified by a test (V) | 0 — no test in backend/test/ or app/src asserts that a path emits an event |
| Instrumented (I) | 3 (6.5 %) |
| Partial (P) | 16 (34.8 %) |
| Nothing (N) | 27 (58.7 %) |
| At least some emission (V+I+P) | 19 (41.3 %) |
| End-to-end reconstructable user journeys | 0 of 8 |
The 3 instrumented operations are a deploy-time catalogue sync (catalogue.synced), the cron
sweep (retention.run + retention.swept) and one frontend assistant turn. Everything a user
actually does — search, save, upload, connect Gmail, delete an account — is partial or silent.
2. Inventory
Frontend (app/)
| # | Operation | Where | Status | Evidence |
|---|---|---|---|---|
| F1 | route crash | app/src/components/ErrorBoundary.tsx | P | route-crash with route + error name; no trace_id, no dedup |
| F2 | API network failure | app/src/services/api.ts:123 | P | api-network, request_id only, no route/duration |
| F3 | API error response | app/src/services/api.ts:157 | P | api-error with code/status; no dur_ms, no body |
| F4 | search started | app/src/store.tsx | N | no start event |
| F5 | search progress poll | app/src/store.tsx:1038 | P | warn only when observation fails |
| F6 | saved-job toggle | app/src/store.tsx:1245 | P | warn only on sync failure |
| F7 | application advance | app/src/store.tsx:1286 | P | info/warn with a message, no ids |
| F8 | resume upload | app/src/store.tsx (upload path) | N | — |
| F9 | profile save/sync | app/src/store.tsx:1221 | P | warn only |
| F10 | Gmail connect/disconnect | app/src/features/outreach/ChangeEmailMenu.tsx | N | — |
| F11 | AI assistant turn | app/src/store.tsx:283 | I | assistant-turn info/warn |
| F12 | stuck loading | — | N | no watchdog |
| F13 | unhandled rejection | — | N | Sentry only (app/src/lib/sentry.ts), no log line |
Backend Worker (backend/)
| # | Operation | Where | Status | Evidence |
|---|---|---|---|---|
| B1 | request lifecycle (23 route entries) | backend/src/http/router.ts | N | no start/end event |
| B2 | auth verify / reject | backend/src/platform/auth.ts | P | one warn for a missing email config only |
| B3 | authorization denial | backend/src/http/router.ts:158 | N | returns 403, logs nothing |
| B4 | validation | backend/src/http/protocol.ts | N | — |
| B5 | quota check / charge | backend/src/platform/limits.ts | N | — |
| B6 | search create (+cap +enqueue) | backend/src/features/jobs/searches.ts | P | only the terminal search.settled |
| B7 | search status read | backend/src/http/routes/searches.ts | N | — |
| B8 | jobs read | backend/src/http/routes/jobs.ts | N | — |
| B9 | saved-job write | backend/src/features/jobs/* | N | — |
| B10 | profile/dossier | backend/src/features/profile/* | N | — |
| B11 | resume upload/parse | backend/src/features/resume/* | N | — |
| B12 | account deletion | backend/src/http/routes/account.ts | N | — |
| B13 | source catalogue sync | backend/src/features/jobs/sourceCatalogue.ts:114 | I | catalogue.synced |
| B14 | D1 batch | backend/src/platform/db.ts | N | — |
| B15 | R2 put/get/delete | backend/src/platform/storage.ts | N | — |
| B16 | AI call | backend/src/platform/ai.ts:66 | N | — |
| B17 | cron sweep | backend/src/index.ts:44, features/jobs/retention.ts:50 | I | retention.run, retention.swept |
| B18 | queue publish | backend/src/platform/queue.ts | N | — |
| B19 | queue consume / claim / settle | backend/src/features/jobs/scrapeQueue.ts | P | queue.forged, queue.execution_failed; no msg_id/attempt/trace |
| B20 | DLQ | — | N | no consumer exists |
| B21 | scraper HTTP dispatch | backend/src/platform/scraperClient.ts | N | — |
Scrapers
| # | Operation | Where | Status | Evidence |
|---|---|---|---|---|
| S1 | Go request received | scrapers/MiniWzrd/internal/api/server.go:155 | P | log.Printf("%s %s %s"): no id, tenant, outcome, duration field |
| S2 | Go upstream scrape | scrapers/MiniWzrd/internal/api/memstore.go:172,240 | P | WARN on failure only |
| S3 | Go quota/rate | scrapers/MiniWzrd/internal/api/tenancy.go | N | silent 401/429/402 |
| S4 | Rust request | scrapers/jobindie/src/server.rs | N | no logging middleware |
| S5 | Rust upstream | scrapers/jobindie/* | N | — |
| S6 | Rust quota | scrapers/jobindie/src/tenants.rs | N | silent 429 |
Integrations and gateway
| # | Operation | Where | Status | Evidence |
|---|---|---|---|---|
| I1 | Google OAuth | server/convex/* (frozen) | P | Convex logs; unverified from here |
| I2 | Gmail send | server/convex/features/outreach/send/send.ts | P | logs + explicit outcome; Convex-only |
| I3 | Gmail poll | server/convex/features/inbox/poller.ts | P | Convex-only |
| I4 | AI (Convex) | server/convex/lib/ai/* | P | Convex-only |
| I5 | AI (Workers AI / Groq) | backend/src/platform/ai.ts | N | — |
| G1 | proxy gateway tunnels | backend/proxy-gateway/main.go | N | boot/fatal lines only; /stats exists but no request events |
3. The most serious blind spots
- No request lifecycle at all. A 500 in the Worker leaves
http.unhandledwith a route and a message, and nothing else — no duration, no actor, no status, no trace, no downstream. You cannot tell whether the failure was before or after the D1 write. - The async hand-off is a hole.
queue.message.publisheddoes not exist, so for any slow search you cannot distinguish "never enqueued" from "enqueued and lost" from "consumed and crashed". uncertainis invisible today. The state is designed (B6-EXECUTION-DESIGN.md§5) but nothing emits it, and there is no DLQ consumer to receive the message that would carry the evidence.- Frontend telemetry dies at cutover.
app/src/lib/logger.tsposts to/api/v1/logs/ingest, which exists only inserver/. Backend has no such route. Silent by design — the failure looks like "everything is fine". - The scrapers cannot be asked what they did. Go logs a URL and a duration; Rust logs nothing per request. A board that returns zero jobs and a board that blocked the request are indistinguishable from the outside — exactly the defect the honesty invariant forbids.
- No metrics and no alerts exist. All thresholds in the audit are percentage points of nothing.
4. Requirement ledger (design vs implementation)
| Brief requirement | Status |
|---|---|
| Whole-app component inventory | DONE (this document, 46 rows) |
| Unified envelope, versioned | DESIGNED (OBSERVABILITY-ARCHITECTURE.md §3); existing emitters differ (at vs ts) |
| Cross-language field parity | DESIGNED; today 4 divergent shapes (browser, Worker, Go, Rust) |
| W3C trace context | NOT SUPPORTED today — no traceparent anywhere; x-request-id only, unvalidated |
| Queue v2 trace propagation | DESIGNED in B6; NOT IMPLEMENTED (B6 execution itself is pending approval) |
| Frontend lifecycle events | DESIGNED; today 1 of 13 operations instrumented |
| API/middleware instrumentation | DESIGNED; 0 of 23 route entries |
| D1/R2 operation instrumentation | DESIGNED; none today |
| Queue/task/DLQ instrumentation | DESIGNED; partial consumer logging, no DLQ consumer |
| Scraper instrumentation | DESIGNED; Go partial/unstructured, Rust none |
| OAuth/Gmail/AI instrumentation | PARTIAL, UNVERIFIED (Convex only; frozen) |
| Redaction policy + tests | IMPLEMENTED on browser + Convex + Worker key-lists; NOT value-shape, NOT Go/Rust |
| Error taxonomy | IMPLEMENTED (21 codes) + DESIGNED extension (21 new, log-only) |
| Metrics | NOT IMPLEMENTED; Cloudflare-native mechanisms identified, none wired |
| Alerts | NOT IMPLEMENTED; delivery mechanism is an owner decision (D6) |
| Dashboards | NOT IMPLEMENTED (queries specified) |
| Runbooks | DESIGNED (18 existing + 18 new); never exercised |
| Local capability | PARTIAL: console + wrangler dev; queues/D1 simulated, Logpush impossible |
| Remote verification | NOT DONE; 10 staging gates defined |
| Sampling policy | DESIGNED; today sampling is whatever the platform default is |
| D1 capacity monitoring | NOT IMPLEMENTED; no per-table size exists in the platform (L-OBS-2) |
| Retention/privacy of telemetry | DESIGNED; today the Convex log table exists, the backend has none |
5. What is not deferred to the design
These are defects in what exists, not missing features, and should be fixed inside the phases:
backend/src/http/router.ts:105accepts any client string asx-request-id(unbounded, may contain newlines/control characters) and reflects it in a response header. Validation is a security fix, not observability polish.backend/src/platform/log.tshas nomsg/service/env, so a Worker line cannot be attributed to an environment without external context — dangerous when staging and production share an account.backend/src/features/jobs/scrapeQueue.ts:49logsattemptsfrom the message, which is client-influenced until the HMAC verifies; the verified value is what should be logged.scrapers/MiniWzrd/internal/api/server.go:155logs the raw path including query string; a tenant key or a search term in a query would be persisted to container logs.
6. Verification method
- Counts come from
grep -rn "log(" backend/src,grep -rn "logger\." app/src,grep -rn "log.Print" scrapers/MiniWzrd, and the absence of any logging middleware inscrapers/jobindie/src/server.rs. - "Verified" requires a test asserting emission;
grepoverbackend/test/andapp/src/**/*.test.tsreturns none for any event string. - Nothing in this document was inferred from documentation alone; each row names a file, and where behaviour could not be confirmed from the working tree (Convex OAuth/Gmail/AI) it is marked unverified rather than credited.
7. Revision ledger (review findings → status)
| # | Finding | Status |
|---|---|---|
| 1 | Tracing contract precise (ids, spans, async parent, runtime limits, no "distributed tracing" claim) | PASS — OBSERVABILITY-ARCHITECTURE.md §4.1–4.5; specs/correlation extended |
| 2 | Emitter transport and searchable destination per emitter | PASS — §9; Go/Rust stdout explicitly excluded from Workers Logs |
| 3 | Watchdog must not terminate a slow operation | PASS — §5.1 replaces the earlier "resolve as timeout" with slow/stalled that change no state |
| 4 | Privacy: pseudonymous and linkable, not erased | PASS — §8.2–8.3; specs/privacy-redaction rewritten; optional D7 unlinkability |
| 5 | Ingest hardening | PASS — §6.1 + specs/telemetry-ingest + OT-66…OT-73 |
| 6 | Native alerting evaluated before a custom evaluator | PASS — §11 + OBSERVABILITY-ALERTS-RUNBOOKS.md §1; durable state is the trigger |
| 7 | Retention/capacity plan-specific; no full scans | PASS — §10.1–10.4; wrangler d1 info + deltas, no routine COUNT(*) |
| 8 | Decisions separated from prerequisites | PASS — §14 phase/decision table; P0–P3 decision-free |
Remaining limitations carried forward: L-OBS-1 (un-echoing scraper), L-OBS-2 (no per-table D1 size),
L-OBS-3 (Worker termination), L-OBS-4 (staging-only capabilities), L-OBS-6 (no span aggregation),
L-OBS-7 (CF traces not joined), L-OBS-8 (missing parent_span_id fallback).