WeatherRelock holds lockfile PRs while the on-call region is under a severe alert
A CLI and GitHub Action that puts a pending status on Dependabot and lockfile PRs while the on-call region has a severe weather alert or an active incident, then clears it after a cooldown.
By David Discua
Measured in the lab
- 15
- window scenarios
- 5
- mock PRs in the sync run
- 0
- writes on an idempotent re-run
- 66
- tests passing
- Hold ends exactly at alert end plus the 30 min cooldown
- A failed source exits 2 with state unknown and writes nothing
- --apply without a token exits 64
- A hold label a human added survives the cool-down
- NWS winter storm across the daylight-saving fall-back reads hot
From reports/weatherrelock-window.json · run on October 21, 2026. darwin-x64, Bun 1.4.3; synthetic fixtures and local mock Google, NWS and GitHub servers; no network, no keys; report carries a date only
How it is wired
01/03Public weather alerts and an optional incident flag come in for the on-call region.
Auto-merging a Dependabot bump is low risk on a quiet day. During an incident, or while a flash flood or ice storm hits the region your on-call engineer lives in, the same merge adds change nobody is free to watch. WeatherRelock Window checks official public alerts for the on-call region plus an optional incident flag, and puts a pending commit status or a hold label on Dependabot and lockfile pull requests until the window clears. All numbers below come from synthetic alert fixtures and local mock servers, so they test the timing logic and the write behavior and say nothing about real-world alert coverage. The catch is that the Google Weather path has never seen live data.
The catch
The Google Weather API client follows Google's published reference and is tested against synthetic responses of that shape. The live Google path was not run in this lab. Google's guide is inconsistent about field formats (its table and its example disagree on timezoneOffset and severity casing), so the client parses both. Whether publicAlerts:lookup returns alerts that have not started yet is undocumented, and the lead window only helps if the source returns them.
NWS covers the US and its territories only, and --area is state-wide, so a coastal warning will hold an inland engineer. A pending status only blocks merges when weatherrelock/window is a required check, and a scheduled trigger can lag an alert by its interval. The GitHub client was exercised against a local mock plus three real read-only calls. It has never written to a real repository, and the composite action had not run on GitHub when the report was written.
What we ran (keyless)
bun install --frozen-lockfile
bun run demo
bun run report
From reports/weatherrelock-window.json, run on October 21, 2026, with min severity severe, 60 min lead and 30 min cooldown. A few of the 15 window scenarios:
| Scenario | Window | Exit |
|---|---|---|
| Flood alert, before the lead window | cool | 0 |
| Flood alert, inside the 60 min lead | hot | 0 |
| Flood ended, inside the 30 min cooldown | hot | 0 |
| Flood, exactly end plus cooldown | cool | 0 |
| NWS winter storm at the daylight-saving fall-back | hot | 0 |
No alerts, Statuspage indicator major | hot | 0 |
Google returns SERVICE_DISABLED, default policy | unknown | 2 |
Same error with --on-source-error hold | hot | 0 |
The sync run used a mock repo with five open PRs: a Dependabot Actions bump, a human relock, a feature PR with no lockfile, and two Dependabot PRs already carrying a hold label, one added by a human and one by github-actions[bot]. The default dry-run planned 4 pending statuses and wrote nothing. --apply without a token exited 64. --apply while hot made 7 writes, a second hot run made 0, and the cooled run made 7, leaving every PR at success. Only the human's hold label stayed. The README records 66 passing tests and 0 failing on the last local bun run check, and the NWS live tests passed on October 21, 2026.
How it is wired
For each alert at or above the minimum severity, the window is hot from start minus lead until end plus cooldown, on half-open intervals and absolute instants. An alert with no end time stays hot. Cancelled alerts, non-Actual statuses and past or unlikely alerts are dropped. If a source fails, the default policy exits 2 and writes nothing, so a broken feed cannot make the window look cool. On cool, the label comes off only when the last labeled event came from the bot.
Minilab (open source)
There is no upstream repo. WeatherRelock calls the National Weather Service API with no key and the Google Weather API when a key is set. Run bun run report and compare the window rows in reports/weatherrelock-window.md.
Run it yourself
SkilledDragonCorp/weatherrelock-window
Clone, install and run the report with no API keys. The numbers above are what that run writes.
bun install --frozen-lockfile && bun run demoSkilledDragon is not affiliated with Google, the US National Weather Service or NOAA, GitHub or Atlassian. All alert data in the report is synthetic. Numbers are from our own keyless lab run; re-run the report before relying on them. Marks belong to their owners.
All labs