Skip to content

Alert on reader/worker view drift (the 2026-11-02 outage class) - #227

Merged
Kenbak merged 1 commit into
mainfrom
new/alert-query-probe
Nov 2, 2026
Merged

Kenbak merged 1 commit into
mainfrom
new/alert-query-probe

Conversation

@Kenbak

@Kenbak Kenbak commented Nov 2, 2026

Copy link
Copy Markdown
Owner

On 2026-11-02 a reader grant on swap_daily_query landed before the worker build that lists it. The worker guard (only_public_view) then refused every research query, but analytics-availability.py stayed healthy because it never checks the guard's condition.

Change: the probe now

  • lists every relation ask_public_reader can read or write (same predicate as the worker guard),
  • reads coreViews from the build the running zecblock-ask-analytics.service uses (systemctl show -p WorkingDirectory),
  • fails reader_view_drift if the reader can reach anything other than those analytics_public views, read-only;
  • fails reader_guard_unverifiable if either side is unknown.

Why not a real /query: it needs the worker service key, which is in the root-only env file next to the Redis URL. It would also spend the shared 200-a-day research allowance, while the alert runs every 15 s.

Verified on the host (dry run of probe() as postgres, no notification or state write):

  • live: no errors, worker build 52da4559 with 24 views, reader can read 23 relations;
  • the same reader access against the pre-batch-4 build 233e7b44 → reader_view_drift, i.e. it would have caught tonight's outage.

Tests: test-analytics-availability.py uses the real ask-core-catalogue.js as the fixture, so a format change there fails CI.

Deploy (owner approval): install over /opt/zecblock-ask-operations/analytics-availability.py with a backup. Rollback: restore the backup.

🤖 Generated with Claude Code

The worker guard refuses every research query while ask_public_reader can read
anything other than the analytics_public views its running build lists. On
2026-11-02 an early grant on swap_daily_query took research offline and the
alerts stayed green. The alert now compares the reader's privileges with the
running build's coreViews (reader_view_drift) and fails closed when either is
unknown (reader_guard_unverifiable).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@vercel

vercel Bot commented Nov 2, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
zecblock Ready Ready Preview Nov 2, 2026 9:49pm UTC
zecblock-testnet Building Building Preview Nov 2, 2026 9:49pm UTC
1 Skipped Deployment
Project Deployment Actions Updated
zecblock-crosslink Ignored Ignored Preview Nov 2, 2026 9:49pm UTC

Request Review

@Kenbak
Kenbak merged commit 9326fb7 into main Nov 2, 2026
30 checks passed
@Kenbak
Kenbak deleted the new/alert-query-probe branch November 2, 2026 21:53

This branch was successfully deployed

1 active deployment
Preview – zecblock — 7bf9173f Deployed Nov 2, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant