chore(ops): add the attachment-index shadow report script - #948
Conversation
Summarizes the #934 phase 2 shadow lines from Workers Logs: match rate, syncs with real attachments, top missing/extra keys, per-repo breakdown, read failures. Runbook now leads with it and notes that shadow lines have no message field, so filter on the parsed component field.
|
Important Review skippedAuto reviews are limited based on label configuration. 🏷️ Required labels (at least one) (2)
🚫 Excluded labels (none allowed) (1)
Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Team Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Operator tooling for the #934 phase 2 shadow: one command that turns the per-sync log lines into a sign-off number for phase 3.
scripts/attachment-index-shadow-report.mjsqueries Workers Logs over the last N hours (default 24) and prints the number of syncs shadowed, the match rate, how many syncs had real attachments and their match rate, total missing / extra keys, the ten most common mismatched keys (already prefix-redacted by the worker), a per-repo breakdown for syncs with attachments, and the count of shadow read failures and timeouts.--jsonemits the same as an object. NeedsCLOUDFLARE_API_TOKENwith Workers Observability read; the account id defaults to production.The runbook section in
docs/ops.mdnow leads with the script and records a gotcha found while verifying the deploy: shadow lines carry nomessagefield, so the Workers Logs UI shows them with an empty message and a text search finds nothing. Filter on the parsedcomponentfield.First run against production, six-hour window: every shadowed sync matched, including the ones with real attachments; no read failures or timeouts.