Skip to content

Add a daily platform canary: try each new @objectstack release against the four gates - #142

Draft
objectstack-fleet[bot] wants to merge 7 commits into
mainfrom
claude/project-thread-fr21kk
Draft

objectstack-fleet[bot] wants to merge 7 commits into
mainfrom
claude/project-thread-fr21kk

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Requested by Warren · project thread
Fixes #133

What this adds

  • .github/workflows/platform-canary.yml: daily at 02:23 UTC and on workflow_dispatch (optional version input). It reads npm view @objectstack/spec dist-tags.latest, compares it with the version package.json pins for @objectstack/spec, and when the release is newer it bumps every @objectstack/* range to ^VERSION, runs pnpm install, validate, typecheck, test, build, and then:
    • green: force-pushes a throwaway branch platform-canary/VERSION and opens (or refreshes the body of) a draft PR Upgrade to @objectstack VERSION, labelled platform-upgrade (the workflow creates the label if it is missing);
    • red: opens one issue Platform canary: @objectstack VERSION breaks the template, labelled pm:ready and area: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.
  • README, verify section: a short Platform canary subsection naming the workflow and what a reader does when it is red.

Guard rails: GITHUB_TOKEN only (contents, pull-requests, issues write); 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 @objectstack package it uses, and it leaves a canary branch alone if its tip was committed by someone other than github-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_dispatch cannot 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 to ref: main. So the dry runs used a temporary push trigger 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.

path run result
already current (forced 17.3.0 against the pinned ^17.3.0) 40281684738 notice Already current: package.json pins @objectstack ^17.3.0; the version tried is 17.3.0.; bump, PR and issue steps skipped
bump, red (npm latest 18.1.0) 40281763133 install 0, validate 1, typecheck 2, test 1, build 2; opened #139
bump, red, second run 40282555358 refreshed #139 in place; no second issue (newest issues: #140, #139)
bump, green (pins forced to ^17.2.0, target 17.3.0) 40281719032 all gates green (the PR step only runs on green), then the push of the canary branch was refused: refusing to allow a GitHub App to create or update workflow .github/workflows/platform-canary.yml without workflows permission
(first push) 40281652049 workflow file invalid: runner.temp is not available in job-level env; fixed in 870b082

The green-path refusal is a pre-merge artefact, not a defect of the design: the canary branch was cut from this branch, so against main it "adds" the workflow file, and GITHUB_TOKEN can never hold the workflows permission. After merge the canary branches from main, 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

  1. Settings → Actions → General → Workflow permissions: confirm "Allow GitHub Actions to create and approve pull requests" is on. If it is off, the canary's PR step fails with an error naming this setting (it greps for GitHub's refusal text).
  2. Cut a test branch from main with every @objectstack/* pin lowered to ^17.2.0, then Actions → Platform canary → Run workflow on that branch with version = 17.3.0. Expected: a draft PR Upgrade to @objectstack 17.3.0 into that test branch, labelled platform-upgrade, from platform-canary/17.3.0-on-TESTBRANCH. Close it and delete both branches afterwards.

Acceptance notes

  • Today's state, measured: npm latest is 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 option kind, undoable on non-update actions, typed engine query options in catalog.handlers.ts). The first scheduled run on main will refresh Platform canary: @objectstack 18.1.0 breaks the template #139 rather than open a new one.
  • Platform canary: @objectstack 18.1.0 breaks the template #139 was opened by the dry run, with claude/project-thread-fr21kk named as the base in its text; the next run on main rewrites its body.
  • Hypothesis 2 (a GITHUB_TOKEN PR 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@v4 print GitHub's Node 20 deprecation warning; ci.yml uses the same pins, so this follows it rather than diverging.
  • Vitest writes one ::error annotation 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 validate 0 · pnpm typecheck 0 · pnpm test 0 (Test Files 35 passed, Tests 885 passed) · pnpm build 0. package.json and pnpm-lock.yaml are byte-identical to main.


Generated by Claude Code

…ailable in job env

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
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

席位核对

ACCEPT — PR #142 at head 532aa343985dc6d3299faa85ffa240cc96efb4a7 (duly lane seat, session session_011HyoSXGRy6L13mYq1Hp4n1, 2026-10-26T07:02Z). Implemented-by: card thread session_013KA2u6ui3Wjj5fmAuUQY6u. Reviewed-by: this seat.

  • Shape: draft, base main, Fixes #133 on body line 3. PR assignee was empty (the card's assignee landed after the thread's read); the seat sets os-warren with this review.
  • Files (PR file list): .github/workflows/platform-canary.yml (new, +238), README.md (+13, one "Platform canary" subsection in the verify section). Exactly the claimed surface; the temporary push trigger used for the dry runs is gone at this head.
  • Gates on this head: check-run verify completed: success on 532aa343; local four gates exit 0.
  • Workflow read line by line: GITHUB_TOKEN only, permissions contents/pull-requests/issues: write; never pushes the base branch, never merges or enables auto-merge; force-push only to platform-canary/VERSION and only when its tip is the bot's own commit; the dispatch input is regex-checked as X.Y.Z before any use; one issue per version, found in any state, refreshed not duplicated.
  • Dry runs (links in the PR): already-current path proven (run 40281684738); red path proven twice, opening Platform canary: @objectstack 18.1.0 breaks the template #139 and refreshing it without a duplicate (runs 40281763133, 40282555358).
  • NOT MEASURED, accepted: the green path's PR leg and the "Allow GitHub Actions to create and approve pull requests" setting cannot be exercised before the workflow is on main (the pre-merge branch push was refused because the branch adds a workflow file). The post-merge two-step proof is in the PR body; the seat runs it after the merge.
  • Real output of the red run: Platform canary: @objectstack 18.1.0 breaks the template #139 — the template does not pass on @objectstack 18.1.0 (validate, typecheck, test and build all fail). That is now a queued card, not a property of this PR.
  • Landing: no merge queue here; the seat flips the PR ready and the maintainer merges.

Generated by Claude Code

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

维护者速读

Seat record for this PR, 2026-10-26T08:27Z. This PR adds a file under .github/workflows/**, which the pm-dispatch skill treats as a governed surface (Tier H): the seat may review it but may not merge it, and it waits on the maintainer. The full ## 席位核对 ACCEPT is comment 6410222031 below; this quick-read sits above it as the record's first layer.

改了什么: 新增一个每日运行的「平台金丝雀」工作流:每天检查 @objectstack 是否出了新版,有新版就在副本上升级并跑完四道门(validate / typecheck / test / build)。全绿则开一个升级草稿 PR;有红则开(或刷新)一张卡,写明哪道门失败。README 加一小段说明。

为什么改: duly 要做成标准模板,必须一直跟在 objectstack 最新版上(你今天定的优先级)。以前平台发版后要等人发现才知道模板坏了;有了它,每次发版第二天就有 PR 或卡。它的第一次试跑已经抓到了真问题,就是 #139(18.1.0 上四道门全红)。

风险与代价(含回滚): 只用仓库自带的 GITHUB_TOKEN,权限限 contents / pull-requests / issues;从不推 main、从不合并、从不挂 auto-merge,只强推它自己的 platform-canary/版本号 分支。代价是每天一次 CI 时长,以及偶尔一张卡或一个草稿 PR。回滚 = 删掉这个工作流文件,或在 Actions 页面停用它。未实测的一段:绿路径开 PR 那一步要等文件进 main 后才能跑,席位合并后会补测。

席位意见: 建议合并。diff 只有这两个文件,工作流逐行读过,红路径与「已是最新」路径都实跑过。

你要做的(一个动作): 合并本 PR;合并前或合并后在 Settings → Actions → General 勾选「Allow GitHub Actions to create and approve pull requests」(不勾则绿路径开不了 PR)。合并后席位跑 PR 正文里的两步补测并在此记录。


Generated by Claude Code

@objectstack-fleet
objectstack-fleet Bot marked this pull request as draft October 26, 2026 08:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Platform canary workflow: run the four gates against each new @objectstack release, open a draft upgrade PR on green and an issue on red

2 participants