Repository navigation
ci(promote): main tracks canary on a cadence — daily promote-main, excluded from the deploy verdict (card 7c0990b0) - #4279
Merged
Conversation
…kflow, excluded from the deploy verdict by path (card 7c0990b0) 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. Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
Contributor
Author
|
REVIEWED at 2d14791 by Fable (team lead). Agent-written under my direction. This is the mechanism the memory asked for after "no one thought to promote": main tracks the tested canary tip on a cadence instead of on somebody remembering. What I checked:
APPROVE at 2d14791 — merging on green. |
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.
The law
main is the front door the README and
install.shserve to every outsider. It sat three months behind canary until #4273 promoted it by hand tonight (Joel: "no one thought to promote"). Promotion must be a mechanism, not a person remembering. Card 7c0990b0.What this adds
.github/workflows/promote-main.yml— daily at 10:17 UTC (03:17 Pacific) +workflow_dispatch(inputmerge, default true).compare/main...canaryvia the API;ahead_by == 0→ notice + exit 0. Also compares the trees: after a squash promote main carries a commit canary never had, soahead_byis never 0 again — identical trees is the honest "nothing to promote".commits/{tip}/check-runs+actions/runs?head_sha=— the same rule astrack-canary.sh::tip_checks/deploy_tracker.rs::parse_tip_checks: only suites started by push / pull_request / workflow_dispatch count, this workflow's own suite never counts, any failure/timed_out/cancelled/action_required → not promoted, any incomplete → not promoted, no runs → unknown → not promoted. skipped/neutral are completed non-failures and pass. Dry-run against the live tips tonight: continuum9d2876ae5→pending, airc17abc1017→green 11.git checkout -B promote/main-<date>-<tip> origin/canary && git merge -s ours --no-ff origin/main, then an assertion thatHEAD^{tree} == origin/canary^{tree}(refuses to push otherwise), push, PR against main. The body lists the commits since the last promote: anchored on the squash commit'sPromoted-Canary-Sha:trailer (or the hand promote'smain := canary (<sha>)subject — tonight's promote: main := canary (a83603b8d) — the tested tip; main has been June 9 while the README and installer point newcomers at it #4273 resolves toa83603b8d), falling back toorigin/main..origin/canary | head -50when no anchor exists.gh pr merge --squash --auto --subject … --body …(the body carries the anchor trailer). GitHub refuses--autoon an unprotected base (auto-merge needs required checks; main has no protection today —branches/main/protectionis 404 on both repos), so withDIRECT_MERGE_WHEN_AUTO_UNAVAILABLE: 'true'(a one-line env knob) the run then merges directly — the tip was verified green and the tree is canary's byte for byte, the same act the hand promote performed. If neither merge succeeds the PR is left open with a warning and the link in the run summary.GITHUB_TOKEN,permissions: contents: write, pull-requests: write. It can push the branch, open the PR and merge it today. If main gains protection with required checks, those checks will never appear (GITHUB_TOKEN events do not start workflows); the fallback is a fine-grained PAT stored as the repo secretPROMOTE_TOKEN— referenced in the file (secrets.PROMOTE_TOKEN || secrets.GITHUB_TOKEN), not created here, no secret values in the file.How the workflow is excluded from the deploy verdict
The workflow runs on canary (the default branch), so its check-run lands on canary's tip — exactly the #4243 shape. Both verdict readers already ignore
schedulesuites; a hand-dispatched run is aworkflow_dispatchsuite and would have counted. Smallest change, both owners:core/continuum-core/src/modules/deploy_tracker.rs:NON_DEPLOY_WORKFLOW_PATHS = [".github/workflows/promote-main.yml"], one extra.filteron the workflow-runspathbefore the suite set is built. Testa_promote_main_run_is_never_the_tips_verdict_whatever_its_eventpins: a dispatched promote-main failure → Green; a promote-main run in flight → not Pending; promote-main as the only suite → Unknown (never green by absence); the push's own failure → still Red.tools/scripts/track-canary.sh::tip_checks: the same path exclusion in the embedded python.Belt and braces: expected non-promotions (nothing to move, tip not green, merge refused) exit 0 with a
::notice; only a genuinely broken run fails, visibly in the Actions tab, and even that cannot read as a red tip.Docs
docs/planning/CANARY-ALPHA-EXECUTION-ROADMAP.md§ "main tracks canary on a cadence" — the recipe, once.scripts/main-promotion-gate.shstays the per-host release receipt; the cadence promote does not run it.Validation
python3 -c "import yaml…"parses the workflow; everyrun:block passesbash -n; the embedded verdict python was executed against both repos' live tips.rustfmt --checkparses the file clean (formatting-only diffs pre-exist). No cargo was run — this is the serving node. CI'sContinuum Rust Testsruns the new test.enforce-canary-stagingallowspromote/main-*heads (canary's tree by construction).🤖 Generated with Claude Code
https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo