Repository navigation
fix(deploy): a scheduled audit's failure is not the tip's verdict — the weekly Dependency Check turned the canary tip red and stopped every deploy - #4243
Conversation
…he weekly Node-era Dependency Check landed a red check-run on the canary tip and the tracker refused every deploy fleet-wide 2026-09-20 00:06Z, Sunday 00:00 UTC: `.github/workflows/dependencies.yml` (cron weekly) ran on the default branch (canary) at 6d34274, failed at setup-node — "Some specified paths were not resolved" — because it caches `src/package-lock.json` and `src/` has been gone since the Node shell was retired (the web client's lockfile is at the repo root). Its `audit` check-run attached to the tip. `track-canary.sh::tip_checks` reads every check-run on the sha and calls any failure red: "refuse: tip 6d34274 is RED — a red tip is never deployed", on every node, until a new tip appears. #4241's own checks (Rust tests, windows check, install smoke, both drift guards) were all green. The 9/18 class again ([[a-red-canary-tip-is-a-fleet-wide-deploy-outage]]): a verdict computed over things that are not the tip's own checks. Two fixes: 1. The tracker judges the tip's OWN checks. It reads the workflow runs for the sha (they carry the triggering event) and counts only check-runs from suites started by a push, pull_request or workflow_dispatch. Runs API answered but no such suite yet = unknown (never green by absence); runs API unreachable = every check counts, as before, a degraded read rather than a silent pass. Dry run on the live tip: the schedule suite excluded, six push checks green → green. 2. The workflow points at files that exist (root package.json / package-lock.json, no `working-directory: src`) and runs on canary pushes to those files too, so the audit itself passes and any future failure lands on a change to those files. Receipt: the next tip after this merge deploys on its own checks; next Sunday 00:00Z the audit passes, and even if it did not, the tracker's verdict line reads green. Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
|
APPROVE with one condition — reviewed at exact head db83ee7 (checks still running at read time; merge on green). Replayed the verdict function against the live API for the red tip 6d34274: 7 check-runs, 4 workflow runs (3 push + 1 schedule); OLD reads red on the one The condition, in the workflow half: dropping |
… audit is a tip check the tracker counts (Cormac's condition on #4243) Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
…es — #4243 fixed the shell copy; this is the copy every node runs and the only one Windows reads (card 2d333f25) (#4246) The tip's verdict had two owners. `tools/scripts/track-canary.sh::tip_checks` learned in #4243 to count only check-runs from suites the tip's own push / pull_request / workflow_dispatch started, after a weekly SCHEDULED Dependency Check landed a failure on the canary tip 6d34274 and stopped every deploy on the fleet. The Rust `DeployTrackerModule` — documented as "the exact rule track-canary applied", the DECISION half every node runs, and the ONLY one the Windows `deploy-consume` reads — still fetched `commits/<tip>/check-runs` alone and read any hard failure as red. Replayed against the live API on 6d34274: 7 check-runs, 4 workflow runs (3 push + 1 schedule). All-checks rule = red on the `audit` failure (suite 96070172760); own- suites rule = green 6 of 7. The next Sunday audit that fails for real (a high advisory in a web-client dep, now that the lockfile path resolves) would have stopped the 5090 again while the shell nodes reported green. - `parse_tip_checks(check_runs, workflow_runs)` replaces `parse_check_runs`: the sha's workflow runs carry the triggering event; only check-runs from suites started by `OWN_SUITE_EVENTS` count. Runs API answered with no own suite = Unknown (never green by absence). Runs API absent or unparseable = every check counts, as before — a degraded read, not a lie. Returns `TipChecks { checks, total, excluded, filtered }`. - `GitGhDeploySource::tip` fetches `actions/runs?head_sha=<tip>` alongside check-runs and probes `deploy.tip.checks` when the filter excluded anything or could not apply. - Test `a_scheduled_audits_failure_is_not_the_tips_verdict` pins the 6d34274 shape: schedule failure + push successes → Green; same body with no runs read → Red; runs read with only a schedule suite → Unknown; failure in an own suite → Red; a pending own suite is not pre-empted by the schedule's failure. Follow-up (same card): the shell should call the binary's verdict so there is one copy of the rule. Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
…kflow, excluded from the deploy verdict by path (card 7c0990b0) (#4279) main is the front door the README and install.sh serve; it sat three months behind canary until a hand promote tonight — "no one thought to promote". Promotion is now a mechanism: - .github/workflows/promote-main.yml: daily 10:17 UTC + workflow_dispatch. Compares main...canary (API) and the TREES (a squash promote leaves ahead_by > 0 forever); exits with a notice when there is nothing to move. Requires the tip's own push suites green (same rule as track-canary.sh / deploy_tracker.rs, this workflow excluded) — a red or pending tip never promotes. Builds promote/main-<date>-<tip> by `-s ours` from canary (the recipe that worked by hand: main's history recorded, canary's tree byte for byte), asserts the tree, pushes, opens a PR against main listing the commits since the last `Promoted-Canary-Sha:` anchor, and squash-merges (`--auto`, falling back to a direct squash when main has no protection — auto-merge is refused without required checks). A merge the token cannot perform leaves the PR open with a warning naming the PROMOTE_TOKEN secret fallback (named, not created). - modules/deploy_tracker.rs + tools/scripts/track-canary.sh: the verdict already ignores `schedule` suites (#4243); a hand-dispatched promote-main run is a workflow_dispatch suite and would count. Both readers now exclude the workflow by PATH (NON_DEPLOY_WORKFLOW_PATHS), so a failed promote can never refuse a deploy. One test pins it. - docs/planning/CANARY-ALPHA-EXECUTION-ROADMAP.md: "main tracks canary on a cadence" — the recipe, once. Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo Co-authored-by: Claude Fable 5.1 <[email protected]>
What happened (Sunday 00:06Z)
The weekly
Dependency Check(cron) ran on the default branch at 6d34274, failed at setup-node (Some specified paths were not resolved— it cachessrc/package-lock.json, andsrc/is gone since the Node shell was retired), and itsauditcheck-run attached to the canary tip.track-canary.sh::tip_checkscounts any failed check-run on the sha as red:#4241's own checks were all green. Fleet-wide deploy stop, the 9/18 class again: a verdict over things that are not the tip's own checks.
Fixes
push,pull_requestorworkflow_dispatch. Runs API answered but no such suite yet →unknown(never green by absence); runs API unreachable → every check counts, as before (degraded, not silent). Dry run against the live tip: schedule suite excluded, six push checks → green.package.json/package-lock.json, noworking-directory: src) and also runs on canary pushes touching them, so the audit passes and any future failure lands on a change to those files.Receipt
The next tip after this merge deploys on its own checks; next Sunday 00:00Z the audit passes, and even if it did not, the tracker's verdict reads green.
🤖 Generated with Claude Code
https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo