1 Commits

Author SHA1 Message Date
5ccd834941 feat(watch): uptime checks with a public status page per app and owner email through Rally Send (PY2.2)
RYP-E4, dispatch 4.2 PY2.2 (Railyard side):
- lib/watch: checks (public https app addresses only; IPs, private names and
  our own hosts refused), 20 per org, a status page slug each. The box 1
  agent reads GET /api/v1/watch/agent/checks (ids and URLs only, bearer
  WATCH_AGENT_TOKEN) and posts results to /api/v1/watch/agent/results.
  Two failures in a row turn a check red; each change emails the owner once
  through Rally Send (product railyard, from status@, idempotency key per
  change; a failed send is retried on the next result). Older, unknown and
  future results change nothing.
- /status/<slug>: live results only (state, share of the last checks, bars),
  the check's name and never its address or any host or vendor name.
- The Watch screen: add by address, pause or resume, open the status page.
- Bridge route uptime (contract cases, uptime_check_keys): a check for the
  given address, or the app's latest live deploy; the first result is the
  slot's proof (check_result).
- Gated on RAILYARD_WATCH_LIVE (denylist rule railyard-slot-watch): off, no
  check runs, the pages 404, the nav has no Watch item and the slot answers
  arriving. The copy test lints each gated surface with the flag and proves it
  checks the flag first.
- Migration 0006 (watch_checks, watch_status; https only, history capped at
  90, cascades with the org).

Tests: watch 10/10, bridge 25/25, contract 3/3, migration 7/7 (0006 twice on a
scratch cluster), watch copy 7/7, console 108/108 with the bundle build,
tsc clean, SDK 7/7.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 00:24:06 +03:00