Skip to content

ci(console): add the six other packed manifests to the console-dist key and the console filter - #24470

Merged
os-zhuang merged 1 commit into
mainfrom
claude/issue-24441-console-dist-key-manifests
Oct 19, 2026
Merged

os-zhuang merged 1 commit into
mainfrom
claude/issue-24441-console-dist-key-manifests

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Fixes #24441
Clause-②: no

What changes

One file, .github/workflows/ci.yml (+15 / -4):

  • The console-dist cache key now hashes packages/{core,types,client,formula,sdui-parser,lint}/package.json next to packages/spec/package.json. The console-pin job spells the key in three places, and all three change: the restore step's key, the verify step's CONSOLE_DIST_CACHE_KEY env, and the save step's key. The three stay byte-identical: the key expression has one distinct string, found 3 times.
  • The console path filter now names the same six paths. A push that moves only one of them now selects Console Pin Gate.
  • Two comments say what the six paths are and what they cost.

There is no new gate and no script edit. Workflows publish nothing, so there is no changeset (skip-changeset).

Why

scripts/build-console.sh packs every @objectstack/* package that objectui overrides into objectui's install, from this tree (OBJECTSTACK_ROOT=... node scripts/objectstack-pin.mjs build). It does this on a pin that carries .objectstack-sha. objectui's pin script refuses a packed manifest in two cases: its runtime dependency names differ from what objectui's lockfile records, or an entry file is missing. Before this change, the key and the filter named only spec's manifest:

  • A push that moved only packages/core/package.json skipped Console Pin Gate on that push, because the filter did not match.
  • The hourly full-battery run selects the job anyway. But it hit the old dist cache entry and skipped build-console.sh, so the pin script never ran.

The refusal first fired at cut-rc.yml's pnpm objectui:build, or at the publish step.

Premise check (measured at origin/main ec951e29e)

  1. Key spellings. grep -n console-dist .github/workflows/ci.yml finds three: the restore key (line 3011), the verify env CONSOLE_DIST_CACHE_KEY (3075) and the save key (3088). All three were identical. release.yml keeps its own narrower key (.objectui-sha, build-console.sh and the zod range) on purpose. It is not touched.
  2. The seven-package set, re-derived from the script, not from the card. build-console.sh reads the set at run time from objectui's root package.json: the pnpm.overrides names that start with @objectstack/. At objectui origin/main 29c19cc1a6 the set is exactly client, core, formula, lint, sdui-parser, spec and types.
    • ⚠️ The pin this tree carries today (.objectui-sha = 0707b4ae37) has no .objectstack-sha and no @objectstack/* override, so the OBJECTSTACK_ROOT block does not run at this pin.
    • .objectstack-sha arrived in objectui at 749ed76 (objectui#12963), 34 commits after the pin. The six manifests start to matter at the first pin bump to that commit or later.
    • The bump itself moves .objectui-sha, which is already in the key. What this change catches is a manifest change that lands after the bump.
  3. Fixed group. .changeset/config.json has one fixed group of 73 packages, and all seven are in group 0. So a Version Packages merge moves all seven manifests in one commit, spec's included, and costs one rebuild, not seven.
  4. Effect on the hit rate. The window was proved by scripts/pm/git-history.mjs (--since=2026-09-19 --until=2026-10-19 --ref=ec951e29e, first-parent; the floor, 2026-09-05, predates the window; no fetch):
first-parent commits on main, 2026-09-19 to 2026-10-19 count
all 2727
moved an input the key already had 54
moved one of the six manifests 11
... of those, also moved an input the key already had 10 (7 Version Packages merges and 3 dependency bumps, each touching packages/spec/package.json)
moved one of the six and no input the key already had 1 (54d32e514: a new exports entry in packages/lint/package.json)

So the key now moves on 55 commits instead of 54: one extra cold console build in 30 days, +1.9%. The one extra commit is a manifest entry change, which is one of the things the pin script checks.

Verification (head 33a410f07)

  • node scripts/check-ci-filter-parity.mjs: exit 0 before and after the change.
    • Before: all 9 console entr(ies) are literal paths; 6 are build inputs the console dist key hashes and 3 are declared guards; the key is spelled one way in all 3 place(s).
    • After: all 15 console entr(ies) are literal paths; 12 are build inputs the console dist key hashes and 3 are declared guards; the key is spelled one way in all 3 place(s) the console-pin job uses it.
  • node scripts/check-ci-filter-parity.mjs --self-test: exit 0, 131 assertions. The anchor line its report-path fixture looks for (packages/spec/tsup.config.ts in the filter) is unchanged.
  • ci.yml still parses (yaml: 10 jobs).
  • Derived gates (node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack against merge base ec951e29e; 1 path, 19 changed lines):
    • 49 commands. 45 exit 0.
    • 4 exit 3 with PREREQUISITE NOT MET, because they need a full pnpm build: check:dts-closure, check:dual-build-cjs-loads, check:lean-entry-closure and check:sourcemap-no-sources-content. These are Build Core's dist guards. This diff changes no package source and no build config, and CI's Build Core runs them on this PR. Declared as a narrowing: NOT MEASURED locally.
    • --ran reconciliation: 49 derived famil(ies) accounted for — 45 run, 4 NOT-MEASURED, exit 0.
  • Roster families under .github/workflows: check-platform-checklist-watchdog (gate and self-test), and the self-tests of select-shard-timings-run, pr-labels and release-verify-npm. All exit 0.
  • check:console-injection and check:console-sha exit 0 but passed vacuously, because there is no local console dist.
  • Console Pin Gate runs only in the full battery, not on pull_request or merge_group. Its first run on this change is main's push battery after the merge. A cold build-console.sh (clone plus vite build) is NOT MEASURED locally.

Acceptance notes

  • The six paths are a hand copy of objectui's override list at the pin, which build-console.sh derives at run time. If objectui adds an eighth @objectstack/* override, the key will not name it until someone adds it here. No gate holds the two lists together, and the card rules out a new gate. Carrier: none.
  • The key watches manifests only. A change to the tsup entry list of one of the six could also cause the pin script's missing-entry-file refusal. Spec's tsup.config.ts is keyed for that reason; the other six are not. No such change appeared in the window. Noted, not filed. Carrier: none.
  • Two older comments in the job are now less accurate, and are left as they are to stay inside this card's line budget:
    • the header's measurement (32 of the 3219 first-parent commits ... moved one, dated 2026-08-31 to 9905e61ca2);
    • the save step's line that this key moves only when the pin does. That was already inexact before this change, because spec's manifest was in the key.

维护者速读(草稿)

改了什么
CI 里有一套控制台(Console)构建缓存。原来它的缓存钥匙和触发条件只看 spec 一个包的清单文件(package.json)。现在把另外六个包的清单文件也算进去:core、types、client、formula、sdui-parser、lint。控制台构建会把这六个包和 spec 一起装进 objectui。本次只改一个 workflow 文件,共 19 行。

为什么改
控制台构建会把这七个包从本仓库打包,装进 objectui。objectui 那边会核对这些包的依赖是否和它的锁文件一致,不一致就拒绝构建。原来这六个包的依赖一变,CI 既不触发控制台构建,也不让缓存失效,问题要等到切 RC 发版时才第一次暴露。改完以后,问题会在合入 main 的那次推送上暴露。

风险与代价(含回滚)

  • 代价:控制台冷构建偶尔多一次。过去 30 天 main 上有 2727 次提交,缓存失效的次数从 54 次变成 55 次,也就是多一次约 20 分钟的构建。
  • 七个包的版本号一起升(同一个 fixed group),所以发版合并只算一次失效。
  • 这个门禁是建议性的,红了也不挡合并。
  • 注意:当前 pin 的 objectui 版本还没有 .objectstack-sha,所以这次改动要等下一次把 objectui pin 升到 749ed76 或更新之后才真正起作用。
  • 回滚:revert 这一个提交即可。不涉及数据,也不影响发布内容。

席位意见

你要做的
看一眼 diff。同意就在本 PR 上给一个 APPROVED 审批。之后由席位负责落地。


Generated by Claude Code

… other manifests objectui packs

scripts/build-console.sh packs @objectstack/{spec,core,types,client,formula,
sdui-parser,lint} into objectui's install on a pin that carries
.objectstack-sha, and objectui's objectstack-pin.mjs refuses one whose
dependency names its lockfile does not record. The console-dist cache key and
the `console` path filter named spec's manifest only, so a dependency or entry
change to the other six never moved the key or selected Console Pin Gate, and
the refusal surfaced first on a release lane.

Add packages/{core,types,client,formula,sdui-parser,lint}/package.json to all
three spellings of the key (restore, verify env, save; byte-identical) and to
the `console` filter. check-ci-filter-parity stays green: 15 entries, 12 build
inputs, 3 guards, one key spelling in 3 places.

Measured over the 2727 first-parent commits of main in the 30 days to
ec951e2: 54 moved an existing key input, 11 moved one of the six, and 10 of
those 11 also moved packages/spec/package.json (seven Version Packages merges,
fixed group 0, and three dependency bumps). The key now moves on 55.

Claude-Session: https://claude.ai/code/session_01FM29ZqLTrnPNXxijioZwMp
Co-authored-by: Claude <noreply@anthropic.com>
@objectstack-fleet objectstack-fleet Bot added the skip-changeset PR has no user-facing published change; bypasses the changeset gate label Oct 19, 2026
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

维护者速读

改了什么:CI 里 console 构建缓存的键和 console 路径过滤器,原来只登记了 spec 一个包的清单,现在把另外 6 个(core、types、client、formula、sdui-parser、lint)也加上。只改 ci.yml,+15/−4。

为什么改:console 构建现在会把这 7 个包都装进 objectui。如果其中某个包的依赖变了,而缓存键里没有它的清单,那么 PR 上命中旧缓存、不会重新验证,问题要拖到发版切 RC 时才暴露。加上后,改这 6 个包清单的 PR 会在自己身上就触发 console 重建。

风险与代价(含回滚):实测过去 30 天缓存键的失效次数从 54 次变成 55 次,几乎没有额外成本,因为这 7 个包同属一个 changesets 固定组,通常一起改。改动要等 .objectui-sha 升到带 .objectstack-sha 的 objectui 提交后才真正起作用(PR 正文已写明)。回滚就是 revert。

席位意见:建议批准。三处键的写法完全一致,check-ci-filter-parity 通过,不加任何门禁。

你要做的:给本 PR 一次批准(APPROVED review)。

席位核对

ACCEPT · domain:devx seat 1 · os-warren · session_01FM29ZqLTrnPNXxijioZwMp · 2026-10-19T06:07Z · head 33a410f07 · card #24441 (claim 6260404777)

  • Form. Draft, base main, first line Fixes #24441 (the only closing keyword). Assignee os-warren. skip-changeset: workflow only.
  • Scope. 1 file, .github/workflows/ci.yml, +15 / −4: the six manifests in the console filter and in the console-dist key's three spellings (restore, verify, save), which read byte-identical in the diff; two comments.
  • Gates, pinned to head 33a410f07. 43 check-runs, all completed: 34 success, 9 skipped. node scripts/pm/check-expected-skips.mjs --pr 24470 → OK (9 skips in the roster). The dev's check-ci-filter-parity reading: 15 console entries, 12 hashed build inputs, one key spelling in all 3 places. node scripts/pm/check-governed-merges.mjs --pr 24470 → GOVERNED, Tier H, 19 changed lines.
  • Accepted deviations. Four Build Core dist guards NOT MEASURED locally (exit 3, no full build); CI's Build Core ran on this head. The hit-rate figure (54 → 55 key moves over a proven 30-day window) is a reading of ec951e29e, carried in a comment; it will age.
  • Path fork. Tier H: this record, needs-user-decision on the PR, review requested from os-zhuang and hotlong. ⛔ Not readied or queued until an authorised approval.

Generated by Claude Code

@objectstack-fleet objectstack-fleet Bot added the needs-user-decision Blocked on a maintainer decision — do not dispatch; decision cards only, never on a PR label Oct 19, 2026
@os-zhuang
os-zhuang marked this pull request as ready for review October 19, 2026 06:11
@os-zhuang
os-zhuang added this pull request to the merge queue Oct 19, 2026
@objectstack-fleet objectstack-fleet Bot removed the needs-user-decision Blocked on a maintainer decision — do not dispatch; decision cards only, never on a PR label Oct 19, 2026
Merged via the queue into main with commit e11ae4b Oct 19, 2026
51 checks passed
@os-zhuang
os-zhuang deleted the claude/issue-24441-console-dist-key-manifests branch October 19, 2026 06:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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

Projects

None yet

3 participants