Skip to content

ci: an opt-in label lane runs the 18.x upgrade harness on a line PR's merge preview (step 0 wiring) - #24554

Merged
os-zhuang merged 1 commit into
mainfrom
claude/issue-24522-harness-lane
Oct 20, 2026
Merged

os-zhuang merged 1 commit into
mainfrom
claude/issue-24522-harness-lane

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Part of #24522
Clause-②: no — a CI workflow, an expected-skip roster row and a label declaration; nothing a package publishes changes

The second, governed half of step 0 of the 18.x line: the wiring that lets the line's PRs run the upgrade harness before they merge. The harness itself (test, fixture, generator) is the sibling draft PR on claude/issue-24522-18x-upgrade-harness, and this PR's job runs that file. Land it with or after that PR. Before then, a labelled run fails loudly on a missing file: the dogfood config's filter preflight refuses a named path that selects no test.

维护者速读(草稿)

  • 改了什么: 新增一个按标签触发的 CI 任务。PR 打上 needs:upgrade-harness 标签后,CI 会在合并预览上用 18.0 的样本数据库启动当前代码,检查数据是否完好、v17 数据库是否仍被拒绝。没有标签的 PR 不运行,不花钱。另外两处是配套登记:预期跳过名单加一行,标签声明脚本加一行。
  • 为什么改: 您定的 18.x 原则是每次合并后 main 都能随时发版,其中 R2 要求「18.0 装出来的数据库升级到这个提交后能启动、数据不丢」,并要求在合并前检查。dogfood 测试现在只在 main 上跑,PR 阶段跑不到,所以要加这个入口。
  • 风险与代价(含回滚): 每个打了标签的 PR 约多一个 CI 任务:构建 dogfood 依赖(有缓存时较快,冷构建约 10 分钟)加约 1 分钟的测试。它不是必需检查,不进合并队列,也不影响其他 PR。回滚方法是删掉这个 workflow 文件。
  • 席位意见:
  • 你要做的: 审阅并批准合并(.github/workflows/** 属 Tier H)。标签对象由席位用 scripts/pm/ensure-pm-labels.sh 创建;之后席位给 18.x 线上的每个 PR 打这个标签。

What it adds

  • .github/workflows/upgrade-harness-optin.yml — job 18.x upgrade harness (opt-in).
    • It runs on pull_request (opened, synchronize, reopened, labeled), and only while the PR carries needs:upgrade-harness. A labeled event must name that label.
    • It checks out the merge preview, restores the dogfood job's turbo cache read-only, builds --filter=@objectstack/dogfood, and runs vitest run test/upgrade-18x-harness.dogfood.test.ts.
    • Concurrency is set at job level, so a skipped run never cancels a real one. There is no merge_group trigger, and the job is not a required context. This mirrors pack-smoke-optin.yml, whose header argues each choice.
  • scripts/pm/check-expected-skips.mjs — the job's name enters EXPECTED_SKIPS as a label-gated skip, so the enqueue bar does not read its skip on every other PR as a filter miss.
  • scripts/pm/ensure-pm-labels.sh — declares the label object (colour and description). ⛔ Never auto-applied.

Why this shape (measured)

wiring cost per line PR why not / why
run it on every PR build closure plus ~54 s on every PR in the repo taxes every PR for one release line
workflow_dispatch ci.yml on the PR branch the full battery: 3 dogfood shards, Temporal Conformance and the console pin no diff needed, but a manual act with no trigger a PR carries, and ~20× the runner time for one file
label lane (this PR) the dogfood build closure (turbo cache restored) plus one file: 53.89 s locally, of which 42.8 s is import runs only where the seat asks; the ruled shape for a pre-merge check most PRs do not need

Gates (on this branch, head as pushed)

  • node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack derived 52 commands. All 52 exit 0.
    • pnpm check:pm-dispatch-gates ran on its own: ✓ dispatch-gates self-test (fast tier): 1913 cases pass in 465.4 s.
    • pnpm check:pm-expected-skips and pnpm check:pm-label-desc-cap exit 0.
    • node scripts/pm/check-expected-skips.mjs --self-test gave ✓ … 154 cases pass; it reads the roster's truth against this checkout's workflows.
  • node scripts/pm/check-governed-merges.mjs --branch claude/issue-24522-harness-lane reads GOVERNED, landing tier H, 136 changed lines.

Generated by Claude Code

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

Seat review · TIER_DEFAULT · epic PM session_01Y5583bs2RDd53MH6kM1ca3 (os-steve) · 2026-10-19T14:27Z

Head c7101e99, +136 lines: .github/workflows/upgrade-harness-optin.yml, plus the needs:upgrade-harness label in ensure-pm-labels.sh and in check-expected-skips.mjs. Governed (.github/workflows/**), Tier H: the maintainer merges. The seat neither approves nor merges it.

Verdict: ACCEPT.

  • The lane is an opt-in label lane, the same shape as the existing pack-smoke opt-in. It runs test(dogfood): the 18.x upgrade harness — an 18.0 database boots on HEAD with its data (step 0) #24552's harness on a PR that carries needs:upgrade-harness, and only there.
  • It is advisory, not a required context: the merge group carries no PR whose label it could read. The seat hangs the label on every 18.x-line PR and reads the check before it queues one (ruling 6266750393, item 3).
  • CI: 32 success, 13 skipped, 0 failed. The dev measured 52 gate families, all exit 0.
  • It does not gate anything until it merges. Until then, each line PR's dev runs the harness locally.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

维护者速读(总监席记录 · 第 45 场续场 1 · session_01Lg6GQ4xjqmvEzYv78d6H7i)· PR #24554 · 2026-10-20T07:21Z

本 PR 正文无「维护者速读」段,epic 席的 seat review 6269625430 已 ACCEPT 并写明 Tier H 由维护者放行;维护者只读评论,故由总监席补齐五段。放行归您,落地归 epic 席(os-steve);本席不翻 ready、不入队。

  • 改了什么: 新增一个按标签触发的 CI 工作流 .github/workflows/upgrade-harness-optin.yml(+136 行,含 ensure-pm-labels.sh 里的 needs:upgrade-harness 标签与 check-expected-skips.mjs 的预期跳过行):给 18.x 线上的 PR 挂上该标签,就在它的合并预览上跑一遍 18.x 升级 harness(test(dogfood): the 18.x upgrade harness — an 18.0 database boots on HEAD with its data (step 0) #24552)。不挂标签不跑;它是 advisory,不是必查项。
  • 为什么改: 18.x 线 step 0 的受管一半(test(qa): the 18.x line's upgrade harness (an 18.0 database boots on every later main with its data) and the measured step plan #24522):让升级仪式相关的 PR 在合并前就能跑升级 harness,而不是各 dev 本地各跑一遍(裁决 6266750393 第 3 项)。
  • 风险与代价(含回滚): 零发布影响,Clause-②: no,skip-changeset;形状与既有的 pack-smoke opt-in 车道相同;不进必查集,合并队列读不到标签所以也不会挂死队列;回滚 = revert 一个提交。CI 在 head c7101e99:32 success、13 skipped、0 failed。一处欠账:.github/workflows/** 是受管规则文本面,复核记录应为 CONTRACT_REVIEW_TIER 同形记录,现只有 epic 席的 TIER_DEFAULT seat review,落地前由 epic 席补一条达档同形 PASS(可与您的批准并行)。
  • 席位意见(总监席): 同意呈批;一个 advisory 车道,不改任何现有门禁。
  • 你要做的: 一个动作:在 PR 上 Approve。

席位核对(总监席,只作记录,⛔ 非放行)

  1. 形态: draft、base main、首行 Part of #24522、Clause-②: no;assignee os-steve;3 文件 +136;受管路径 .github/workflows/upgrade-harness-optin.yml ⇒ Tier H。
  2. 前提实测: seat review 6269625430 的 head = 当前 head c7101e991c86,其后无推送;CI 读数如上。
  3. 门禁 check-runs(c7101e99): 45 条 = 32 success、13 skipped、0 failure。
  4. 接受的偏差: 复核记录档位为 TIER_DEFAULT(欠达档同形记录,见上)。
  5. 范围外去向: 无。
  6. 落地条款: Tier H。您 Approve 在案 + epic 席补达档同形 PASS ⇒ epic 席经中继 pr_ready + automerge_enable;本席本笔同轮挂 needs-user-decision 并向 os-zhuang 与 hotlong 请审。

Generated by Claude Code

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

Director seat, summon #46, session_013414Vtz3Z8PrXFetUziHoh, 2026-10-20T10:10Z — label housekeeping, not a review.

needs-user-decision leaves this PR. It marked "awaiting the maintainer's review" (batch #375 item 5, record 6285632199), and that wait ended: os-zhuang APPROVED on 2026-10-20T07:23Z and the PR is merged. The open review request to hotlong is moot on a merged PR. Ledger: opening marker 6288539963 on #12708.


Generated by Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci/cd size/m skip-changeset PR has no user-facing published change; bypasses the changeset gate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants