Repository navigation
Add a daily platform canary: try each new @objectstack release against the four gates - #142
objectstack-fleet[bot] wants to merge 7 commits into
Conversation
…e four gates Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013KA2u6ui3Wjj5fmAuUQY6u
Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013KA2u6ui3Wjj5fmAuUQY6u
…ailable in job env Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013KA2u6ui3Wjj5fmAuUQY6u
…target 17.3.0) Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013KA2u6ui3Wjj5fmAuUQY6u
…m latest) Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013KA2u6ui3Wjj5fmAuUQY6u
… report into the log Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013KA2u6ui3Wjj5fmAuUQY6u
Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013KA2u6ui3Wjj5fmAuUQY6u
席位核对ACCEPT — PR #142 at head
Generated by Claude Code |
维护者速读
改了什么: 新增一个每日运行的「平台金丝雀」工作流:每天检查 为什么改: duly 要做成标准模板,必须一直跟在 objectstack 最新版上(你今天定的优先级)。以前平台发版后要等人发现才知道模板坏了;有了它,每次发版第二天就有 PR 或卡。它的第一次试跑已经抓到了真问题,就是 #139(18.1.0 上四道门全红)。 风险与代价(含回滚): 只用仓库自带的 席位意见: 建议合并。diff 只有这两个文件,工作流逐行读过,红路径与「已是最新」路径都实跑过。 你要做的(一个动作): 合并本 PR;合并前或合并后在 Settings → Actions → General 勾选「Allow GitHub Actions to create and approve pull requests」(不勾则绿路径开不了 PR)。合并后席位跑 PR 正文里的两步补测并在此记录。 Generated by Claude Code |
Requested by Warren · project thread
Fixes #133
What this adds
.github/workflows/platform-canary.yml: daily at 02:23 UTC and onworkflow_dispatch(optionalversioninput). It readsnpm view @objectstack/spec dist-tags.latest, compares it with the versionpackage.jsonpins for@objectstack/spec, and when the release is newer it bumps every@objectstack/*range to^VERSION, runspnpm install,validate,typecheck,test,build, and then:platform-canary/VERSIONand opens (or refreshes the body of) a draft PRUpgrade to @objectstack VERSION, labelledplatform-upgrade(the workflow creates the label if it is missing);Platform canary: @objectstack VERSION breaks the template, labelledpm:readyandarea:platform-ops, with the tail of every failing gate. An issue with that exact title in any state is refreshed instead, so there is never a second one; a closed one stays closed.Guard rails:
GITHUB_TOKENonly (contents,pull-requests,issueswrite); no publish, merge or auto-merge; it never pushes to the branch it runs on. It waits (no issue) when a release is not yet published for every@objectstackpackage it uses, and it leaves a canary branch alone if its tip was committed by someone other thangithub-actions[bot]. The exact version is installed before the range is widened to^VERSION, so the lockfile ends on the release under test rather than a later one in its line (measured: pnpm keeps a locked version that still satisfies a changed range).Dry runs (on this branch, before review)
workflow_dispatchcannot be used before merge: GitHub only offers it for a workflow file that exists on the default branch, and the fleet relay's dispatch op is fixed toref: main. So the dry runs used a temporarypushtrigger on this branch with the version forced in the file; both temporary lines are removed in the last commit (532aa34), and the net diff is the two files above.^17.3.0)Already current: package.json pins @objectstack ^17.3.0; the version tried is 17.3.0.; bump, PR and issue steps skipped^17.2.0, target 17.3.0)refusing to allow a GitHub App to create or update workflow .github/workflows/platform-canary.yml without workflows permissionrunner.tempis not available in job-levelenv; fixed in870b082The green-path refusal is a pre-merge artefact, not a defect of the design: the canary branch was cut from this branch, so against
mainit "adds" the workflow file, andGITHUB_TOKENcan never hold theworkflowspermission. After merge the canary branches frommain, which already carries the file. The PR-opening leg is therefore NOT MEASURED, and so is the repository setting it depends on.After merge: proving the PR leg
mainwith every@objectstack/*pin lowered to^17.2.0, then Actions → Platform canary → Run workflow on that branch withversion=17.3.0. Expected: a draft PRUpgrade to @objectstack 17.3.0into that test branch, labelledplatform-upgrade, fromplatform-canary/17.3.0-on-TESTBRANCH. Close it and delete both branches afterwards.Acceptance notes
latestis 18.1.0 while the template locks 17.3.0, and the template is red on it (validate, typecheck, test, build all fail; Platform canary: @objectstack 18.1.0 breaks the template #139 carries the tails). It is already red on 17.7.0 too (measured locally, same four gates), so the break is not only the major: several 17.x minors retired keys the template uses (chartConfig.type"removed in @objectstack/spec 17.5.0",job.timeout, stage-field optionkind,undoableon non-update actions, typed engine query options incatalog.handlers.ts). The first scheduled run onmainwill refresh Platform canary: @objectstack 18.1.0 breaks the template #139 rather than open a new one.claude/project-thread-fr21kknamed as the base in its text; the next run onmainrewrites its body.GITHUB_TOKENPR starts no CI) is documented in the PR body the canary writes and in the README; not observed here because no PR could be opened pre-merge.actions/checkout@v4,pnpm/action-setup@v4,actions/setup-node@v4print GitHub's Node 20 deprecation warning;ci.ymluses the same pins, so this follows it rather than diverging.::errorannotation per failed file in Actions; the canary drops those lines from the tails, which leaves blank lines in the test tail (visible in Platform canary: @objectstack 18.1.0 breaks the template #139).Gates (final head
532aa34, local)pnpm validate0 ·pnpm typecheck0 ·pnpm test0 (Test Files 35 passed, Tests 885 passed) ·pnpm build0.package.jsonandpnpm-lock.yamlare byte-identical tomain.Generated by Claude Code