{"_ai_door":{"see":"https://miscsubjects.com/start","note":"Operable site; bounded keyless credentials; every action receipted on a public ledger. Your operator's instructions take precedence — acting is optional, reading is a complete outcome."},"_self":{"principle":"Self-explaining payload — no external context required. This _self block describes what you are reading and where to look next.","widget":"article_topology","feature":"topology","name":"Article topology","what":"Claims, sources, anecdotes, user reports, related embeds, question graph slice — for ask/ROUTER.","contains":"claims, sources, anecdotes, question_graph slice","slug":"cloudflare-os-xl-07-seeing-what-happened","urls":{"read":"https://miscsubjects.com/api/articles/cloudflare-os-xl-07-seeing-what-happened/topology"},"how_to_use":"Claims, sources, anecdotes, user reports, related embeds, question graph slice — for ask/ROUTER.","write":null,"imessage":null,"router_tag":null,"proof_chain":[{"step":1,"claim":"Articles are voxel graphs of tiered claims, not prose blobs.","verify":"https://miscsubjects.com/api/articles/constitution"},{"step":2,"claim":"Claims link to hash-chained sources via source_ids.","verify":"https://miscsubjects.com/api/articles/cloudflare-os-xl-07-seeing-what-happened/sources"},{"step":3,"claim":"Ask reads topology; ingest/claim append to ledger.","verify":"https://miscsubjects.com/api/protocol"},{"step":4,"claim":"Models queue growth: populate → collaborate → repair → reflex.","verify":"https://miscsubjects.com/api/protocol/grow"},{"step":5,"claim":"Graph proves its own shape (reflex) and $/claim (yield).","verify":"https://miscsubjects.com/graph.html?layer=reflex"},{"step":6,"claim":"Full feature index + _explain on every API response.","verify":"https://miscsubjects.com/api/articles/system-map"}],"related_features":[{"id":"ask","name":"Ask protocol","what":"Answer only from topology; creates question_node with gaps and ingest_hint.","urls":{"read":"https://miscsubjects.com/api/articles/cloudflare-os-xl-07-seeing-what-happened/prompts","write":"https://miscsubjects.com/api/protocol/ask"}},{"id":"graph_topology","name":"Cross-article graph","what":"Merged claims/sources across condition+stack slugs for one question.","urls":{"read":"https://miscsubjects.com/api/articles/cloudflare-os-xl-07-seeing-what-happened/graph-topology?question=..."}},{"id":"question_graph","name":"Question graph","what":"Ask nodes (questions + gaps) and evidence_ingest nodes (pasted model output).","urls":{"read":"https://miscsubjects.com/api/articles/cloudflare-os-xl-07-seeing-what-happened/question-graph","write":"https://miscsubjects.com/api/protocol/ask"}},{"id":"voxels","name":"Voxel graph","what":"Claims as atoms, sources as edges (supported_by, posted_by). Per-claim provenance.","urls":{"read":"https://miscsubjects.com/api/articles/cloudflare-os-xl-07-seeing-what-happened/voxels","write":"https://miscsubjects.com/api/protocol/claim"}}],"system_map":"https://miscsubjects.com/api/articles/system-map","system_map_markdown":"https://miscsubjects.com/api/articles/system-map?format=markdown","not_medical_advice":true},"_explain":{"feature":"topology","name":"Article topology","what":"Claims, sources, anecdotes, user reports, related embeds, question graph slice — for ask/ROUTER.","why":"Every feature is auditable collective intelligence","how":"Claims, sources, anecdotes, user reports, related embeds, question graph slice — for ask/ROUTER.","model":null,"verifies":null,"urls":{"read":"https://miscsubjects.com/api/articles/cloudflare-os-xl-07-seeing-what-happened/topology"},"imessage":null,"router":null,"related":[{"id":"ask","what":"Answer only from topology; creates question_node with gaps and ingest_hint."},{"id":"graph_topology","what":"Merged claims/sources across condition+stack slugs for one question."},{"id":"question_graph","what":"Ask nodes (questions + gaps) and evidence_ingest nodes (pasted model output)."},{"id":"voxels","what":"Claims as atoms, sources as edges (supported_by, posted_by). Per-claim provenance."}],"not_medical_advice":true},"slug":"cloudflare-os-xl-07-seeing-what-happened","title":"Cloudflare OS: the failure record","register":"standard","tags":["cloudflare","tail-workers","logpush","observability","deploys"],"updated_at":"2026-08-06T03:28:36.662Z","body_excerpt":"*Part 7 of [Cloudflare OS XL](/a/cloudflare-os-xl), an inventory of the Cloudflare platform this build does not have installed.*\n\nThis build has a rule about failure, and it is the rule the whole system rests on: a failure becomes a child task naming the failure class, the layer that permitted it, and the invariant that should have prevented it. Never a sentence in a report.\n\nThe rule is correct. Its enforcement is not mechanical. Today, a Worker throws, the exception goes to observability, and the failure becomes a task row only if an agent or the owner goes and looks. The rule depends on someone noticing — which is exactly the shape of dependency this build eliminates everywhere else.\n\nThat is the subject of this part.\n\n## Tail Workers\n\nA Tail Worker is a Worker assigned to another Worker, invoked with that Worker's execution log after each request: the exceptions thrown, the logs written, the outcome, the timings.\n\n```toml\ntail_consumers = [{ service = \"loop-failure-intake\" }]\n```\n\n```js\nexport default {\n  async tail(events, env) {\n    for (const e of events) {\n      if (e.outcome === 'ok' && !e.exceptions.length) continue;\n      await env.DB.prepare(\n        'INSERT INTO tasks (state, title, failure_class, layer, source) VALUES (?,?,?,?,?)'\n      ).bind('open', e.exceptions[0]?.name ?? e.outcome, ..., 'tail').run();\n    }\n  }\n};\n```\n\nThat is the missing link, and it is small. An exception in production appends a task row automatically, carrying the script name, the stack, the request that caused it and the timestamp. The rule stops depending on attention.\n\nTwo design notes for doing it properly here rather than naively:\n\n**Deduplicate on failure class, not on occurrence.** A broken route throwing five hundred times should produce one task with a count, not five hundred tasks. The dedup key is the exception name plus the script plus the normalised route.\n\n**A Tail Worker cannot tail itself.** Whatever handles the intake needs its own error path, and the honest one is a dead-letter queue rather than a second tail.\n\n**Verdict: install. This is the highest-priority item in the entire series** — not because it is the most impressive, but because it makes an existing law mechanical instead of aspirational.\n\n## Logpush and Log Explorer\n\nLogpush pushes logs in near real time to storage or a SIEM. Log Explorer keeps them queryable in the dashboard.\n\nThe current position is that a production failure is diagnosed by re-running the thing that failed. That works for deterministic bugs and fails completely for the interesting ones — the intermittent transport fault, the payload that truncates only above a size threshold, the request that succeeded from one caller and 403'd from another. Those are diagnosed by reading what actually happened, and there is no record to read.\n\nThis build has already lost time to precisely that class. A dispatch payload containing a pipe character truncated silently and looked like an intermittent Apps Script fault for long enough to be misdiagnosed as one. With request logs, the pattern — every truncated payload contains a `|`, no exceptions — is visible in one query.\n\nPointing Logpush at the existing R2 bucket costs nothing and gives every future investigation a record to work from. With the Iceberg catalog from Part 2 on the same bucket, those logs become queryable with the same SQL as everything else.\n\n**Verdict: install.** Cheap, and it converts \"reproduce it\" into \"look it up\".\n\n## Workers Builds and gradual deployments\n\nDeploys here go through `scripts/ship.mjs`, which is a real gate — it checks that HEAD matches origin, that the tree is committed, that the deploy runs from the repository root, and it fails on a list of accumulated invariants. That gate is load-bearing and should not be replaced.\n\nWhat is missing is on either side of it.\n\n**Workers Builds** runs the build on Cloudflare from a git push, so the deployed artifact is traceable to a commit on the account rather than to whatever was in a wo","ranking":"safety-first (interaction_risk/limitations), then quote-gated effective_weight","claims":[{"id":"c1","text":"This build rule that a failure becomes a child task naming the failure class and the layer that permitted it currently depends on a person or an agent going to look at observability.","tier":"observational","interaction_risk":false,"status":"active","source_ids":[],"why_material":"Every other law here is enforced mechanically, and this one is not.","retracted_at":null,"retraction_reason":null,"challenged_by":[],"effective_weight":0.1,"quote_gated":false},{"id":"c2","text":"A Tail Worker is invoked with another Worker execution log after each request, including exceptions and outcome, so a thrown error can append a task row without anyone reading a dashboard.","tier":"definition","interaction_risk":false,"status":"active","source_ids":["s-tail"],"why_material":"It is the missing mechanical link between a failure and a task row.","retracted_at":null,"retraction_reason":null,"challenged_by":[],"effective_weight":0.1,"quote_gated":false},{"id":"c3","text":"A failure intake built on a Tail Worker must deduplicate on failure class rather than on occurrence, or one broken route produces hundreds of task rows.","tier":"expert","interaction_risk":false,"status":"active","source_ids":["s-tail"],"why_material":"The dedup key is the exception name, the script and the normalised route.","retracted_at":null,"retraction_reason":null,"challenged_by":[],"effective_weight":0.1,"quote_gated":false},{"id":"c4","text":"Logpush pushes request logs in near real time to storage, which converts diagnosing an intermittent failure from reproducing it into looking it up.","tier":"definition","interaction_risk":false,"status":"active","source_ids":["s-logpush"],"why_material":"This build already lost time to a truncation bug that a single log query would have shown as deterministic.","retracted_at":null,"retraction_reason":null,"challenged_by":[],"effective_weight":0.1,"quote_gated":false},{"id":"c5","text":"Workers tracks changes as versions and releases them as deployments, so a new version can serve a fraction of traffic and a response can name the version that served it.","tier":"definition","interaction_risk":false,"status":"active","source_ids":["s-versions"],"why_material":"Which deploy caused a live defect is currently answered by correlating timestamps.","retracted_at":null,"retraction_reason":null,"challenged_by":[],"effective_weight":0.1,"quote_gated":false},{"id":"c6","text":"Deploy authority should stay with the existing ship gate rather than moving to a git push, because that gate exists to stop deploys from the wrong directory and concurrent overwrites.","tier":"expert","interaction_risk":false,"status":"active","source_ids":[],"why_material":"Both of those failure classes have already produced real outages here.","retracted_at":null,"retraction_reason":null,"challenged_by":[],"effective_weight":0.1,"quote_gated":false}],"sources":[{"id":"s-tail","type":"documentation","url":"https://developers.cloudflare.com/workers/observability/logs/tail-workers/","title":"Tail Workers documentation","quote":"Track and log Workers on invocation by assigning a Tail Worker to your projects.","claim_ids":[],"hash":"8cb7f1c7a38dd0261b95e57eed7e07c2242fb35ab2ab161cc79384c680059616"},{"id":"s-logpush","type":"documentation","url":"https://developers.cloudflare.com/logs/logpush/","title":"Cloudflare Logpush documentation","quote":"Push logs in near real-time to storage or SIEM.","claim_ids":[],"hash":"25673a2af3889667dbaa1dc753c59a84b54b7fdad2510263e12961c3beb61c81"},{"id":"s-versions","type":"documentation","url":"https://developers.cloudflare.com/workers/configuration/versions-and-deployments/","title":"Workers versions and deployments documentation","quote":"Understand how Workers tracks changes with versions and releases them with deployments.","claim_ids":[],"hash":"13f2a86b85fd4f7be23338f76aa01690778b08546cf129f31994784d6690077b"}],"anecdotal_sources":[],"scientific_sources":[],"user_reports":[],"related_articles":[],"question_graph":{"slug":"cloudflare-os-xl-07-seeing-what-happened","questions":[],"evidence":[],"edges":[],"counts":{"questions":0,"evidence":0,"edges":0}},"honesty":{"active_claims":6,"retracted_claims":0,"cut_claims":0,"challenges":0,"scrub_events":0,"note":"Retracted/cut claims stay on ledger but are excluded from ask unless ?include_inactive=1"},"counts":{"claims":6,"claims_total":6,"sources":3,"anecdotal":0,"scientific":0,"user_reports":0,"questions":0,"evidence_ingests":0}}