Skip to content

#58 Drift alerts carry metadata.fault; an ok sends none - #59

Merged
gregoryfoster merged 4 commits into
mainfrom
58-drift-fault
Oct 21, 2026
Merged

gregoryfoster merged 4 commits into
mainfrom
58-drift-fault

Conversation

@gregoryfoster

Copy link
Copy Markdown
Contributor

Refs #58 (deploy and live checks follow the merge).

Every drift alert now checks in with "metadata": {"fault": <kind>}; an ok sends no metadata key at all. This is the sibling contract (co-archiver-drift status#32, co-broker-drift status#51 / broker#110). co-status groups a run of alerts into one fault by metadata.fault (status#28). So a change of kind inside one fault (lag → off_main / unstamped), or a --test-alert sent during an open fault, now reports at once instead of waiting up to ~23.5 h for the daily reminder.

  • checkin.post_checkin: optional metadata=None. The key goes into the body only when it is given (not when it is None or {}).
  • drift.Verdict.metadata(): {"fault": kind} on an alert, None otherwise. The value is the kind token only, never body. Modelled on broker's.
  • __main__._drift passes it. Liveness's call is unchanged, and its body equality test still holds.
  • Docs: checkin.py docstring; DEPLOYMENT.md § The drift check (the fault bullet, and the test alert during an open fault).
  • Plan: docs/plans/2026-10-21-58-drift-fault.md.

Tests (red first, f1a75ac): every alerting kind's fault is its kind; ok/silent give None; the command's lag and --test-alert check-ins carry the fault; an ok check-in has no metadata key; post_checkin with no or empty metadata sends exactly today's body. Full suite: 688 passed, 14 skipped (environmental: secrets absent or unreadable in a worktree).

🤖 Generated with Claude Code

gregoryfoster and others added 4 commits October 21, 2026 15:59
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ends none

post_checkin takes an optional metadata, absent from the body unless given;
Verdict.metadata() is {"fault": kind} on an alert, None otherwise. Liveness's
call is unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… an open fault

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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