Repository navigation
Alert on reader/worker view drift (the 2026-11-02 outage class) - #227
Merged
Merged
Conversation
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>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
On 2026-11-02 a reader grant on
swap_daily_querylanded before the worker build that lists it. The worker guard (only_public_view) then refused every research query, butanalytics-availability.pystayed healthy because it never checks the guard's condition.Change: the probe now
ask_public_readercan read or write (same predicate as the worker guard),coreViewsfrom the build the runningzecblock-ask-analytics.serviceuses (systemctl show -p WorkingDirectory),reader_view_driftif the reader can reach anything other than thoseanalytics_publicviews, read-only;reader_guard_unverifiableif 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()aspostgres, no notification or state write):52da4559with 24 views, reader can read 23 relations;233e7b44→reader_view_drift, i.e. it would have caught tonight's outage.Tests:
test-analytics-availability.pyuses the realask-core-catalogue.jsas the fixture, so a format change there fails CI.Deploy (owner approval): install over
/opt/zecblock-ask-operations/analytics-availability.pywith a backup. Rollback: restore the backup.🤖 Generated with Claude Code