Skip to content
This repository was archived by the owner on Nov 4, 2026. It is now read-only.

Commit 749ed76

Browse files
objectstack-fleet[bot]claudeos-zhuang
authored
feat(tooling): objectui consumes @objectstack/* by commit — .objectstack-sha, bump-objectstack.sh, dev and CI built from the pin (objectui#12957) (#12963)
Fixes #12957 Clause-②: no objectui now consumes `@objectstack/*` by commit (ruling B on objectui#12955, comment `6248859734`). `.objectstack-sha` pins objectstack `2c9bf9430a1198bfaa5c0de9ff4a811838c6869c` (`chore: version packages (next) (#23825)`), the commit `@objectstack/spec@18.0.0-next.3` was released from; every `@objectstack/*` package resolves to a build of that commit, and none resolves from npm. **Seat-directed scope change (item 6):** the seat moved the first pin from objectstack `main` `2ee5861b0f` to this release commit, so the pinned build is equivalent to what npm serves today. Moving the pin to a commit that contains `586705d85d`, `1e001c7df` and `e15897c0f1` is a separate pin-bump card, and no parity, refinement or block-config pin is edited here to absorb spec `main`'s drift. No `@objectstack/*` range in any manifest moves (that is objectui#12958). Dispatched by `domain:ui` seat 1, session `https://claude.ai/code/session_0188TsgPV8kQXfuRuKmkj2ks`. ⛔ Tier H (`AGENTS.md` and `.github/workflows/**`): this stays a draft until `os-zhuang` or `hotlong` approves it. ## How it resolves - The root `package.json` overrides each `@objectstack/*` package to `file:node_modules/.cache/objectstack/NAME`. `scripts/objectstack-pin.mjs build` (also `pnpm objectstack:build`) fills those directories: it fetches the pinned commit, installs only the build closure, builds, and unpacks each package exactly as `pnpm pack` publishes it. `pnpm run setup` = that build, then `pnpm install --frozen-lockfile`. - `OBJECTSTACK_ROOT=TREE pnpm objectstack:build` packs an already installed and built objectstack tree into the same directories instead. This is the input objectstack-ai/objectstack#24306 consumes. - `scripts/bump-objectstack.sh [SHA_OR_REF]` moves the pin. It refuses a commit it cannot resolve or read before writing anything, and warns (three answers) when the commit is not on objectstack `origin/main`. That is the contract of objectstack's `bump-objectui.sh`; its changeset and SDUI-manifest steps are not copied. - The script refuses, loudly, when: the override set differs from the runtime closure of what objectui declares (so a pin that adds an `@objectstack/*` dependency stops instead of falling back to npm); a packed entry point is missing; or the lockfile does not record the dependency names a packed manifest declares. - The pinned checkout is hermetic. After fetching the one pinned commit, the script removes the checkout's `origin` remote. objectstack's spec build anchors its schema ratchets on `origin/main` and fetches it when it can, so with the remote in place the build of the pin was judged against wherever `main` was that minute: at `db2b7239` it failed in 13 of 25 CI jobs, naming `json-schema/api/PackageInstallManifest.json` and `json-schema/ui/PageRecordBinding.json`, two schemas `main` had added after the pin. Without the remote, the spec build anchors on its committed baseline, so the build is a function of the pin. A test pins the removal; deleting the call turns it red. - The objectstack install and build run without objectui's `npm_config_*` settings (proxy, registry, CA and store settings are kept). `pnpm run` exports the invoking workspace's `.npmrc` that way, and objectui's `engine-strict` made `pnpm objectstack:build` fail with `ERR_PNPM_UNSUPPORTED_ENGINE` inside the objectstack tree. - A failed build prints its cause (for an unexpected crash, the stack) and, under GitHub Actions, the same text as an `objectstack-pin` error annotation, because job logs are not always readable. Cleanup of the scratch tree only warns, so it never masks the failure. ## Measurements (all local, this container, pnpm 10.31.0, Node 22.22.0) **The packages (Zone 2 item 1, corrected).** Seven, not six. At the pin, `@objectstack/core` depends on `@objectstack/types`. The full set is spec, core, types, client, formula, sdui-parser and lint. It was read from the pinned commit's manifests and from `pnpm --filter-prod` over the four roots objectui declares. **The resolution form (item 3, Zone 2 item 2).** All three forms were installed against the same build: | Form | Lockfile records | Clean frozen install, same tree | Clean frozen install, other tree | |---|---|---|---| | `file:` tarball | `integrity` and `version` per tarball | exit 1, `ERR_PNPM_TARBALL_INTEGRITY` | exit 1, `ERR_PNPM_TARBALL_INTEGRITY` | | `link:` directory | `link:` only, no dependencies | importing the spec fails: `ERR_MODULE_NOT_FOUND` for `zod` (pnpm installs nothing a linked package depends on) | not reached | | `file:` directory (chosen) | `resolution: {directory, type: directory}`, with no integrity and no version | exit 0 | exit 0, `pnpm-lock.yaml` byte-identical | So the PM's tarball expectation held, and was worse than expected: a clean frozen install failed even for the same tree. `link:` keeps the lockfile stable but breaks at runtime, and linking a source tree instead would bring that tree's own second `zod` (the objectstack#21108 split). With a `file:` directory, the dependencies resolve from objectui's lockfile, so there is one `zod`. A frozen install also re-links a directory whose content changed: a marker written into a rebuilt directory reached `node_modules`. **Item 3, the stand-in.** At the pin, I built objectstack at `e5136ff10f` (the `18.0.0-next.2` release commit) in a separate checkout and ran `OBJECTSTACK_ROOT=` that tree with `objectstack-pin.mjs build`. The build exited 0. Then `pnpm install --frozen-lockfile` exited 0, and the lockfile's sha256 was the same before and after (`da56792a0bb44808…`). The same held earlier against the first candidate pin `2ee5861b0f`, with a stand-in at `93b4acb57ec2` (the parent of `586705d85d`): build exit 0, frozen install exit 0, lockfile identical. The installed `dist/ui/index.d.mts` held 10 `emptyState` occurrences at that pin, 4 with the stand-in, and 10 again after the restore. The lockfile does not change across pins or stand-ins, because it records directories, not versions. **What a frozen install does not check.** I gave a packed manifest a dependency the lockfile does not record. `pnpm install --frozen-lockfile` exited 0 and did not install it. That is why the build compares dependency names and refuses on any difference. I proved that refusal on the real tree: it exits 1 and names the package; its control exits 0. **Item 6, the first pin (seat-directed).** I moved the pin with `scripts/bump-objectstack.sh 2c9bf9430a1198bfaa5c0de9ff4a811838c6869c`; `pnpm install` afterwards left `pnpm-lock.yaml` unchanged. Equivalence with npm: I ran `npm pack` for all seven packages at `18.0.0-next.3` and compared each with `diff -rq` against `node_modules/.cache/objectstack`. Every `package.json` version is `18.0.0-next.3`. `types`, `formula` and `sdui-parser` are identical. `core`, `client` and `lint` differ only in `package.json`, by the order of dependency keys (same keys, same versions). In `spec` (2094 files), every JS and JSON Schema file is identical. The npm tarball carries two release-time files that the build does not produce, `spec-changes.json` and `protocol-upgrade-guide.md`; objectui reads neither (`git grep` exits 1, a control term exits 0). After the hermetic change, 10 declaration files (`api`, `automation`, `contracts`, `marketplace` and `system`, as `.d.ts` and `.d.mts`) and 2 hashed DTS chunk pairs differ. The sampled chunk (`automation-api.zod`) differs only in the order of union members, at the same byte length (523364): DTS emit nondeterminism, not a content difference. The pin is a strict ancestor of `586705d85d`, `1e001c7df` and `e15897c0f1` (`git merge-base --is-ancestor 2c9bf943 C` exits 0 for each), so none of the three is in this pin. **Ablation: the type check reads the pinned build.** I wrote a throwaway probe that imports `SelectOptionKind` from `@objectstack/spec/data`, a symbol that `18.0.0-next.3` adds, and checked it with `tsc --ignoreConfig --noEmit`. At the pin it exits 0. With the `e5136ff10f` (`18.0.0-next.2`) stand-in it exits 2 with `TS2724` (no exported member named `SelectOptionKind`). After the restore it exits 0. The same shape held at the first candidate pin with an `emptyState` probe: exit 0, then `TS2339` and exit 2 with the `93b4acb57ec2` stand-in, then exit 0. The probe was never committed. Afterwards `git diff HEAD` is empty and `objectstack:status` reads the pin. My first attempt measured nothing: tsc refused with TS5112 because a tsconfig is present. I re-ran it with `--ignoreConfig`. **Item 2, type check and tests at the pin.** At `4bd617b0`: `pnpm type-check --concurrency=2`, 81 of 81 tasks successful, exit 0; the scripts suite, 188 test files passed (5652 tests); `pnpm type-check:scripts`, exit 0. At `185772ba` (the next.3 pin; later commits change only `scripts/objectstack-pin.mjs` and its test): `packages/core`, `packages/types`, `packages/react` and the spec-drift test files, 711 test files passed. The `packages/app-shell` suite ran in CI (all 16 shards green), not locally. **Cold build (Zone 2 item 3).** I ran `objectstack-pin.mjs build` under the shared verify lock. These are shared-box seconds with a warm pnpm store, at the first candidate pin: 202 s in total, of which fetch 17.0 s, install 4.4 s, build 160.7 s and pack 13.9 s. A filtered install is enough: the root plus `--filter-prod` over the roots is 8 projects and 348 packages. Plain `--filter 'X...'` follows devDependencies into 36 projects; that build took 352 s. Disk: 203 MB stays in `node_modules/.cache/objectstack`, and about 0.9 GB of scratch is deleted after packing. A warm cache is a stamp read, and the build step returns immediately. At the next.3 pin the same build took 174 s. A fresh worktree's cold `pnpm run setup` took 175.7 s and added 295 MB (201 MB of it the cache). A second fresh worktree right after took 167.5 s and another 295 MB. Copying the first worktree's cache into a third and running the same command took 6.5 s (+286 MB as a copy; about 85 MB if hardlinked, an estimate). That is the evidence for the shared pin cache card; no shared cache is built here. An `OBJECTSTACK_ROOT` pack of an already built tree took 22.0 s. The CI numbers are in the next section. **`pnpm setup` (item 7).** It is pnpm's own built-in command. In a probe it wrote `PNPM_HOME` into the shell rc and never ran the package script. `pnpm run setup` ran it. So everything here says `pnpm run setup`. I also corrected the same trap in this repository's backend runbook line. ## CI (item 4) All 17 jobs that install (`docs-deploy`'s through `vercel build`), plus `lockfile-dedupe`, which resolves, restore `node_modules/.cache/objectstack` with `actions/cache/restore@v6`. The key is `objectstack-pin-RUNNER_OS-hashFiles(.objectstack-sha, scripts/objectstack-pin.mjs)`. Each then runs `node scripts/objectstack-pin.mjs build`, which is a no-op on a hit. On a miss, the job saves the build as its last step, bounded at 2 minutes and non-fatal (objectui#6577, objectui#7048). An unchanged pin never rebuilds. A script edit counts as a recipe change and rebuilds once. Every job pays the cold build on the first run of a new pin. Measured at `4bd617b0`: 23 jobs built cold in 71 to 125 s (median 111 s); at `1fa4f1de`, 25 jobs took 109 to 151 s (median 138 s). Two jobs restored a build an earlier run of this PR had saved: Build Docs (restore 3 s, build 0 s) and Test shard 15/16 (restore 2 s, build 0 s). The save step took 0 to 2 s, and the install after the build 4 to 8 s. Whether `main` saves the cache is NOT MEASURED: `main` has no `.objectstack-sha` until this merges, so its first push run afterwards misses and saves under `main`'s scope, which PR runs can restore. The Actions cache API is not readable from here, so the cache entries were not listed. Because of `turbo.json` `globalDependencies` (`.objectstack-sha` and the build's stamp), a pin bump invalidates replayed turbo verdicts. It also widens the type-check fast path to the whole workspace, because `select-type-check-scope.mjs` reads that list. Without this, a bump PR would type-check zero packages and replay `main`'s cached verdicts. `performance-budget.yml` now triggers on `.objectstack-sha`. ## The lockfile and pin gates (item 5) - `check-lockfile-integrity`: rule 1 (an `@objectstack/*` version moving backward) is **retired**. The lockfile carries no `@objectstack/*` version any more, so the rule could never fire again. The identity it guarded is `.objectstack-sha`, and the build refuses any package that is not overridden. Rule 2 (a package gaining a physical copy) is kept: a registry copy beside the pinned build is exactly what it names. The tests pin that sample and the peer fork in its pinned-build form. - `check-lockfile-dedupe`: **adapted**. The pinned build is a named precondition, checked before pnpm runs. With the build present: `VERDICT deduped`, exit 0, lockfile unchanged. - `check-installed-pin-claims`: **adapted**. Face A follows the lockfile's `file:` resolution to the version the directory's manifest declares. An absent build is a named conflict. Gate: exit 0. - The live-e2e backend pin (`ci-cd-pipeline-doc.test.ts`, #7689): **adapted** the same way. The page now states the gap this leaves (see the acceptance notes). - `check-spec-range-floors` is unchanged. It fetches each declared floor from the registry and never reads the installed tree. `check-spec-symbol-derivation` reads the installed spec, which is now the pin: exit 0. - No new gate. ## Files beyond the claim's file surface (named, not silent) - `turbo.json`: the two `globalDependencies` entries above. - `scripts/dependabot-merge-gate.mjs`: one prose string that described the retired rule. - `README.md`, `CONTRIBUTING.md`, `QUICK_REFERENCE.md`, `scripts/setup.sh`, `content/docs/guide/console.md`, `content/docs/utilities/runner.mdx`: a clean checkout starts with `pnpm run setup`. A bare `pnpm install` without the build fails (`ERR_PNPM_LINKED_PKG_DIR_NOT_FOUND` / `ENOENT`). - `content/docs/guide/ci-cd-pipeline.md`: its tests require each section to name every command its jobs run, and the live-e2e sentence moved. - Tests that assumed one cache per job, an exact action-ref list, or no `continue-on-error` in `shadcn-check.yml`: `turbo-cache-save-bound`, `report-turbo-cache`, `check-action-ref-convention`, `shadcn-check-report`, `render-budget-comment`. ## Acceptance notes - **Dependabot (not changed here).** Dependabot's npm updates regenerate the lockfile without the pinned build. Locally, `pnpm install --lockfile-only` without the build exits 1 with `ERR_PNPM_LINKED_PKG_DIR_NOT_FOUND`. Whether Dependabot's sandbox fails the same way is NOT MEASURED; its next npm run after the merge is the first reading. - `apps/console/vercel.json` installs with `pnpm install --frozen-lockfile` on Vercel, which would now need the pin first. No Vercel status appears on recent `main` commits, so it was left alone. - The live-e2e lane still runs the published backend at `OBJECTSTACK_VERSION`. The console is now built from the pinned commit, whose version string only moves at an objectstack release. The two match by number, not by commit. The page says so, and nothing here closes it. - `e2e/live/ci/backend.env`'s header still says the version is "resolved in pnpm-lock.yaml". The lockfile now resolves the pinned build, whose manifest carries that version. - objectstack's own `AGENTS.md` and `examples/README.md` document `pnpm setup` for first-time setup. That runs pnpm's built-in command, not the script. This is reported on the card, not changed here. - **Seat answer, Q1 (Dependabot):** observe first. The seat reads Dependabot's first npm run after the merge, and if it fails it files the follow-up then, with option A (a scheduled in-repo update workflow that runs `pnpm run setup` first) as the default. Nothing changes in this PR. - **Seat answer, Q2 (shared pin cache):** A. The seat files it as its own card, per the maintainer's 「如果需要共享缓存,你就开卡」. Nothing changes in this PR. - **Seat answer, Q3 (file-surface extensions):** A, accepted as is. ## 维护者速读(草稿) - **改了什么**:objectui 不再从 npm 取 `@objectstack/*`。仓根新增 `.objectstack-sha`,钉 objectstack 的一个提交。首个 pin 是 `@objectstack/spec` 18.0.0-next.3 的发版提交 `2c9bf943`(席位指定),构建结果与 npm 上的 next.3 等价;objectui#12932、#12929、#12484 等需要的那三个后端提交都在它之后,不在这次的 pin 里。本地和 CI 都从这个提交的源码构建所需的 7 个包,构建结果按 pin 缓存。换 pin 用 `scripts/bump-objectstack.sh`,新机器或新目录跑 `pnpm run setup`。 - **为什么改**:执行 objectui#12955 的裁决 B。后端一合并,前端当天就能用上,不再等人工发版。 - **风险与代价(含回滚)**: - 每次换 pin,CI 每个装依赖的 job 首次都要冷构建一次:CI 实测约 2 分钟(中位 111 秒),本机约 3 分钟;pin 不变就直接用缓存(命中时构建 0 秒)。 - Dependabot 的 npm 自动升级很可能从此跑不通;席位定为合并后先看它的首跑,跑不通再开后续卡。 - 回滚:revert 本 PR 即回到 npm 版本(锁文件随之回退)。注意 objectstack 的 `.objectui-sha` 在 objectstack-ai/objectstack#24306 落地前不能越过本 PR。 - **席位意见**: - **你要做的**:审批本 PR(受管面:`AGENTS.md` 与 workflows)。下一步是席位另开的 pin-bump 卡:把 pin 挪到包含那三个后端提交的位置。 --- _Generated by [Claude Code](https://claude.ai/code/session_0188TsgPV8kQXfuRuKmkj2ks)_ --------- Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: os-zhuang <jack@objectstack.ai>
1 parent d3fd5e4 commit 749ed76

42 files changed

Lines changed: 2700 additions & 317 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.github/workflows/changeset-release.yml‎

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -727,6 +727,21 @@ jobs:
727727
restore-keys: |
728728
turbo-${{ runner.os }}-release-
729729
730+
# objectui#12957: every @objectstack/* package resolves to the build of the
731+
# commit `.objectstack-sha` pins, read from node_modules/.cache/objectstack, so
732+
# it must be there before pnpm resolves anything. Restored by the pin and built
733+
# only on a miss (scripts/objectstack-pin.mjs); the save is this job's last step.
734+
- name: Restore the pinned @objectstack build
735+
id: objectstack-pin
736+
uses: actions/cache/restore@v6
737+
with:
738+
path: node_modules/.cache/objectstack
739+
key: objectstack-pin-${{ runner.os }}-${{ hashFiles('.objectstack-sha', 'scripts/objectstack-pin.mjs') }}
740+
741+
- name: Build @objectstack at the pin (skips a restored build)
742+
id: objectstack-build
743+
run: node scripts/objectstack-pin.mjs build
744+
730745
- name: Install dependencies
731746
run: pnpm install --frozen-lockfile
732747

@@ -1505,3 +1520,16 @@ jobs:
15051520
with:
15061521
path: .turbo/cache
15071522
key: turbo-${{ runner.os }}-release-${{ github.sha }}
1523+
1524+
# The pinned @objectstack build, saved only when this job built it (a cache
1525+
# miss) and whatever the verdict above was -- it does not depend on it.
1526+
# Bookkeeping: bounded and non-fatal (objectui#6577, objectui#7048). The bound
1527+
# is not yet derived from a measured save; re-derive it from this step's runs.
1528+
- name: Save the pinned @objectstack build
1529+
if: ${{ !cancelled() && steps.objectstack-build.outcome == 'success' && steps.objectstack-pin.outputs.cache-hit != 'true' }}
1530+
continue-on-error: true
1531+
timeout-minutes: 2
1532+
uses: actions/cache/save@v6
1533+
with:
1534+
path: node_modules/.cache/objectstack
1535+
key: objectstack-pin-${{ runner.os }}-${{ hashFiles('.objectstack-sha', 'scripts/objectstack-pin.mjs') }}

‎.github/workflows/ci.yml‎

Lines changed: 208 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -253,6 +253,23 @@ jobs:
253253
if: steps.relevant.outputs.should_run == 'true'
254254
run: node scripts/check-type-check-coverage.mjs
255255

256+
# objectui#12957: every @objectstack/* package resolves to the build of the
257+
# commit `.objectstack-sha` pins, read from node_modules/.cache/objectstack, so
258+
# it must be there before pnpm resolves anything. Restored by the pin and built
259+
# only on a miss (scripts/objectstack-pin.mjs); the save is this job's last step.
260+
- name: Restore the pinned @objectstack build
261+
id: objectstack-pin
262+
if: steps.relevant.outputs.should_run == 'true'
263+
uses: actions/cache/restore@v6
264+
with:
265+
path: node_modules/.cache/objectstack
266+
key: objectstack-pin-${{ runner.os }}-${{ hashFiles('.objectstack-sha', 'scripts/objectstack-pin.mjs') }}
267+
268+
- name: Build @objectstack at the pin (skips a restored build)
269+
id: objectstack-build
270+
if: steps.relevant.outputs.should_run == 'true'
271+
run: node scripts/objectstack-pin.mjs build
272+
256273
- name: Install dependencies
257274
if: steps.relevant.outputs.should_run == 'true'
258275
run: pnpm install --frozen-lockfile
@@ -921,6 +938,19 @@ jobs:
921938
path: .turbo/cache
922939
key: turbo-${{ runner.os }}-type-check-${{ github.sha }}
923940

941+
# The pinned @objectstack build, saved only when this job built it (a cache
942+
# miss) and whatever the verdict above was -- it does not depend on it.
943+
# Bookkeeping: bounded and non-fatal (objectui#6577, objectui#7048). The bound
944+
# is not yet derived from a measured save; re-derive it from this step's runs.
945+
- name: Save the pinned @objectstack build
946+
if: ${{ !cancelled() && steps.relevant.outputs.should_run == 'true' && steps.objectstack-build.outcome == 'success' && steps.objectstack-pin.outputs.cache-hit != 'true' }}
947+
continue-on-error: true
948+
timeout-minutes: 2
949+
uses: actions/cache/save@v6
950+
with:
951+
path: node_modules/.cache/objectstack
952+
key: objectstack-pin-${{ runner.os }}-${{ hashFiles('.objectstack-sha', 'scripts/objectstack-pin.mjs') }}
953+
924954
# PRs run the suite split across the runners of the `shard:` matrix below.
925955
# The suite is dominated by fixed per-file cost rather than by the
926956
# assertions: a PR run reported 495s wall
@@ -1175,6 +1205,23 @@ jobs:
11751205
node-version: '22.x'
11761206
cache: 'pnpm'
11771207

1208+
# objectui#12957: every @objectstack/* package resolves to the build of the
1209+
# commit `.objectstack-sha` pins, read from node_modules/.cache/objectstack, so
1210+
# it must be there before pnpm resolves anything. Restored by the pin and built
1211+
# only on a miss (scripts/objectstack-pin.mjs); the save is this job's last step.
1212+
- name: Restore the pinned @objectstack build
1213+
id: objectstack-pin
1214+
if: steps.relevant.outputs.should_run == 'true'
1215+
uses: actions/cache/restore@v6
1216+
with:
1217+
path: node_modules/.cache/objectstack
1218+
key: objectstack-pin-${{ runner.os }}-${{ hashFiles('.objectstack-sha', 'scripts/objectstack-pin.mjs') }}
1219+
1220+
- name: Build @objectstack at the pin (skips a restored build)
1221+
id: objectstack-build
1222+
if: steps.relevant.outputs.should_run == 'true'
1223+
run: node scripts/objectstack-pin.mjs build
1224+
11781225
- name: Install dependencies
11791226
if: steps.relevant.outputs.should_run == 'true'
11801227
run: pnpm install --frozen-lockfile
@@ -1285,6 +1332,19 @@ jobs:
12851332
retention-days: 7
12861333
if-no-files-found: warn
12871334

1335+
# The pinned @objectstack build, saved only when this job built it (a cache
1336+
# miss) and whatever the verdict above was -- it does not depend on it.
1337+
# Bookkeeping: bounded and non-fatal (objectui#6577, objectui#7048). The bound
1338+
# is not yet derived from a measured save; re-derive it from this step's runs.
1339+
- name: Save the pinned @objectstack build
1340+
if: ${{ !cancelled() && steps.relevant.outputs.should_run == 'true' && steps.objectstack-build.outcome == 'success' && steps.objectstack-pin.outputs.cache-hit != 'true' }}
1341+
continue-on-error: true
1342+
timeout-minutes: 2
1343+
uses: actions/cache/save@v6
1344+
with:
1345+
path: node_modules/.cache/objectstack
1346+
key: objectstack-pin-${{ runner.os }}-${{ hashFiles('.objectstack-sha', 'scripts/objectstack-pin.mjs') }}
1347+
12881348
# ── The built-artifact pin lane, lifted out of the shard matrix ──────────
12891349
# (objectui#7183 for the lane itself; objectui#9499 for this job.)
12901350
#
@@ -1396,6 +1456,23 @@ jobs:
13961456
node-version: '22.x'
13971457
cache: 'pnpm'
13981458

1459+
# objectui#12957: every @objectstack/* package resolves to the build of the
1460+
# commit `.objectstack-sha` pins, read from node_modules/.cache/objectstack, so
1461+
# it must be there before pnpm resolves anything. Restored by the pin and built
1462+
# only on a miss (scripts/objectstack-pin.mjs); the save is this job's last step.
1463+
- name: Restore the pinned @objectstack build
1464+
id: objectstack-pin
1465+
if: steps.relevant.outputs.should_run == 'true'
1466+
uses: actions/cache/restore@v6
1467+
with:
1468+
path: node_modules/.cache/objectstack
1469+
key: objectstack-pin-${{ runner.os }}-${{ hashFiles('.objectstack-sha', 'scripts/objectstack-pin.mjs') }}
1470+
1471+
- name: Build @objectstack at the pin (skips a restored build)
1472+
id: objectstack-build
1473+
if: steps.relevant.outputs.should_run == 'true'
1474+
run: node scripts/objectstack-pin.mjs build
1475+
13991476
- name: Install dependencies
14001477
if: steps.relevant.outputs.should_run == 'true'
14011478
run: pnpm install --frozen-lockfile
@@ -1404,6 +1481,19 @@ jobs:
14041481
if: steps.relevant.outputs.should_run == 'true'
14051482
run: pnpm test:dist
14061483

1484+
# The pinned @objectstack build, saved only when this job built it (a cache
1485+
# miss) and whatever the verdict above was -- it does not depend on it.
1486+
# Bookkeeping: bounded and non-fatal (objectui#6577, objectui#7048). The bound
1487+
# is not yet derived from a measured save; re-derive it from this step's runs.
1488+
- name: Save the pinned @objectstack build
1489+
if: ${{ !cancelled() && steps.relevant.outputs.should_run == 'true' && steps.objectstack-build.outcome == 'success' && steps.objectstack-pin.outputs.cache-hit != 'true' }}
1490+
continue-on-error: true
1491+
timeout-minutes: 2
1492+
uses: actions/cache/save@v6
1493+
with:
1494+
path: node_modules/.cache/objectstack
1495+
key: objectstack-pin-${{ runner.os }}-${{ hashFiles('.objectstack-sha', 'scripts/objectstack-pin.mjs') }}
1496+
14071497
# ── ⭐ The single required test context (objectui#9499, ruling letter C) ──
14081498
#
14091499
# Until this job the required-check set named the matrix legs one by one --
@@ -1611,6 +1701,21 @@ jobs:
16111701
node-version: '22.x'
16121702
cache: 'pnpm'
16131703

1704+
# objectui#12957: every @objectstack/* package resolves to the build of the
1705+
# commit `.objectstack-sha` pins, read from node_modules/.cache/objectstack, so
1706+
# it must be there before pnpm resolves anything. Restored by the pin and built
1707+
# only on a miss (scripts/objectstack-pin.mjs); the save is this job's last step.
1708+
- name: Restore the pinned @objectstack build
1709+
id: objectstack-pin
1710+
uses: actions/cache/restore@v6
1711+
with:
1712+
path: node_modules/.cache/objectstack
1713+
key: objectstack-pin-${{ runner.os }}-${{ hashFiles('.objectstack-sha', 'scripts/objectstack-pin.mjs') }}
1714+
1715+
- name: Build @objectstack at the pin (skips a restored build)
1716+
id: objectstack-build
1717+
run: node scripts/objectstack-pin.mjs build
1718+
16141719
- name: Install dependencies
16151720
run: pnpm install --frozen-lockfile
16161721

@@ -1728,6 +1833,19 @@ jobs:
17281833
retention-days: 7
17291834
if-no-files-found: error
17301835

1836+
# The pinned @objectstack build, saved only when this job built it (a cache
1837+
# miss) and whatever the verdict above was -- it does not depend on it.
1838+
# Bookkeeping: bounded and non-fatal (objectui#6577, objectui#7048). The bound
1839+
# is not yet derived from a measured save; re-derive it from this step's runs.
1840+
- name: Save the pinned @objectstack build
1841+
if: ${{ !cancelled() && steps.objectstack-build.outcome == 'success' && steps.objectstack-pin.outputs.cache-hit != 'true' }}
1842+
continue-on-error: true
1843+
timeout-minutes: 2
1844+
uses: actions/cache/save@v6
1845+
with:
1846+
path: node_modules/.cache/objectstack
1847+
key: objectstack-pin-${{ runner.os }}-${{ hashFiles('.objectstack-sha', 'scripts/objectstack-pin.mjs') }}
1848+
17311849
# The other half of objectui#5403: merge every shard's blob report into ONE
17321850
# complete coverage report, publish it, and — whatever happens — say out loud
17331851
# whether this lane actually delivered for the commit.
@@ -1826,6 +1944,23 @@ jobs:
18261944
node-version: '22.x'
18271945
cache: 'pnpm'
18281946

1947+
# objectui#12957: every @objectstack/* package resolves to the build of the
1948+
# commit `.objectstack-sha` pins, read from node_modules/.cache/objectstack, so
1949+
# it must be there before pnpm resolves anything. Restored by the pin and built
1950+
# only on a miss (scripts/objectstack-pin.mjs); the save is this job's last step.
1951+
- name: Restore the pinned @objectstack build
1952+
id: objectstack-pin
1953+
if: needs.test-coverage.result == 'success'
1954+
uses: actions/cache/restore@v6
1955+
with:
1956+
path: node_modules/.cache/objectstack
1957+
key: objectstack-pin-${{ runner.os }}-${{ hashFiles('.objectstack-sha', 'scripts/objectstack-pin.mjs') }}
1958+
1959+
- name: Build @objectstack at the pin (skips a restored build)
1960+
id: objectstack-build
1961+
if: needs.test-coverage.result == 'success'
1962+
run: node scripts/objectstack-pin.mjs build
1963+
18291964
- name: Install dependencies
18301965
if: needs.test-coverage.result == 'success'
18311966
run: pnpm install --frozen-lockfile
@@ -2007,6 +2142,19 @@ jobs:
20072142
} >> "$GITHUB_STEP_SUMMARY"
20082143
exit 1
20092144
2145+
# The pinned @objectstack build, saved only when this job built it (a cache
2146+
# miss) and whatever the verdict above was -- it does not depend on it.
2147+
# Bookkeeping: bounded and non-fatal (objectui#6577, objectui#7048). The bound
2148+
# is not yet derived from a measured save; re-derive it from this step's runs.
2149+
- name: Save the pinned @objectstack build
2150+
if: ${{ !cancelled() && needs.test-coverage.result == 'success' && steps.objectstack-build.outcome == 'success' && steps.objectstack-pin.outputs.cache-hit != 'true' }}
2151+
continue-on-error: true
2152+
timeout-minutes: 2
2153+
uses: actions/cache/save@v6
2154+
with:
2155+
path: node_modules/.cache/objectstack
2156+
key: objectstack-pin-${{ runner.os }}-${{ hashFiles('.objectstack-sha', 'scripts/objectstack-pin.mjs') }}
2157+
20102158
# Build + E2E merged into one job: avoids artifact upload/download (~30s)
20112159
# and a duplicate `pnpm install` (~60s). This job only needs the console SPA
20122160
# artifact for Playwright; package build and package-size checks are covered
@@ -2079,6 +2227,23 @@ jobs:
20792227
node-version: '22.x'
20802228
cache: 'pnpm'
20812229

2230+
# objectui#12957: every @objectstack/* package resolves to the build of the
2231+
# commit `.objectstack-sha` pins, read from node_modules/.cache/objectstack, so
2232+
# it must be there before pnpm resolves anything. Restored by the pin and built
2233+
# only on a miss (scripts/objectstack-pin.mjs); the save is this job's last step.
2234+
- name: Restore the pinned @objectstack build
2235+
id: objectstack-pin
2236+
if: steps.relevant.outputs.should_run == 'true'
2237+
uses: actions/cache/restore@v6
2238+
with:
2239+
path: node_modules/.cache/objectstack
2240+
key: objectstack-pin-${{ runner.os }}-${{ hashFiles('.objectstack-sha', 'scripts/objectstack-pin.mjs') }}
2241+
2242+
- name: Build @objectstack at the pin (skips a restored build)
2243+
id: objectstack-build
2244+
if: steps.relevant.outputs.should_run == 'true'
2245+
run: node scripts/objectstack-pin.mjs build
2246+
20822247
- name: Install dependencies
20832248
if: steps.relevant.outputs.should_run == 'true'
20842249
run: pnpm install --frozen-lockfile
@@ -2285,6 +2450,19 @@ jobs:
22852450
path: ~/.cache/ms-playwright
22862451
key: playwright-${{ runner.os }}-${{ steps.playwright-version.outputs.version }}
22872452

2453+
# The pinned @objectstack build, saved only when this job built it (a cache
2454+
# miss) and whatever the verdict above was -- it does not depend on it.
2455+
# Bookkeeping: bounded and non-fatal (objectui#6577, objectui#7048). The bound
2456+
# is not yet derived from a measured save; re-derive it from this step's runs.
2457+
- name: Save the pinned @objectstack build
2458+
if: ${{ !cancelled() && steps.relevant.outputs.should_run == 'true' && steps.objectstack-build.outcome == 'success' && steps.objectstack-pin.outputs.cache-hit != 'true' }}
2459+
continue-on-error: true
2460+
timeout-minutes: 2
2461+
uses: actions/cache/save@v6
2462+
with:
2463+
path: node_modules/.cache/objectstack
2464+
key: objectstack-pin-${{ runner.os }}-${{ hashFiles('.objectstack-sha', 'scripts/objectstack-pin.mjs') }}
2465+
22882466
docs:
22892467
name: Build Docs
22902468
runs-on: ubuntu-latest
@@ -2521,6 +2699,23 @@ jobs:
25212699
restore-keys: |
25222700
turbo-${{ runner.os }}-docs-
25232701
2702+
# objectui#12957: every @objectstack/* package resolves to the build of the
2703+
# commit `.objectstack-sha` pins, read from node_modules/.cache/objectstack, so
2704+
# it must be there before pnpm resolves anything. Restored by the pin and built
2705+
# only on a miss (scripts/objectstack-pin.mjs); the save is this job's last step.
2706+
- name: Restore the pinned @objectstack build
2707+
id: objectstack-pin
2708+
if: steps.docs-changes.outputs.should_run == 'true'
2709+
uses: actions/cache/restore@v6
2710+
with:
2711+
path: node_modules/.cache/objectstack
2712+
key: objectstack-pin-${{ runner.os }}-${{ hashFiles('.objectstack-sha', 'scripts/objectstack-pin.mjs') }}
2713+
2714+
- name: Build @objectstack at the pin (skips a restored build)
2715+
id: objectstack-build
2716+
if: steps.docs-changes.outputs.should_run == 'true'
2717+
run: node scripts/objectstack-pin.mjs build
2718+
25242719
- name: Install dependencies
25252720
if: steps.docs-changes.outputs.should_run == 'true'
25262721
run: pnpm install --frozen-lockfile
@@ -2641,3 +2836,16 @@ jobs:
26412836
with:
26422837
path: .turbo/cache
26432838
key: turbo-${{ runner.os }}-docs-${{ github.sha }}
2839+
2840+
# The pinned @objectstack build, saved only when this job built it (a cache
2841+
# miss) and whatever the verdict above was -- it does not depend on it.
2842+
# Bookkeeping: bounded and non-fatal (objectui#6577, objectui#7048). The bound
2843+
# is not yet derived from a measured save; re-derive it from this step's runs.
2844+
- name: Save the pinned @objectstack build
2845+
if: ${{ !cancelled() && steps.docs-changes.outputs.should_run == 'true' && steps.objectstack-build.outcome == 'success' && steps.objectstack-pin.outputs.cache-hit != 'true' }}
2846+
continue-on-error: true
2847+
timeout-minutes: 2
2848+
uses: actions/cache/save@v6
2849+
with:
2850+
path: node_modules/.cache/objectstack
2851+
key: objectstack-pin-${{ runner.os }}-${{ hashFiles('.objectstack-sha', 'scripts/objectstack-pin.mjs') }}

‎.github/workflows/docs-deploy.yml‎

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,21 @@ jobs:
116116
node-version: '22.x'
117117
cache: 'pnpm'
118118

119+
# objectui#12957: every @objectstack/* package resolves to the build of the
120+
# commit `.objectstack-sha` pins, read from node_modules/.cache/objectstack, so
121+
# it must be there before pnpm resolves anything. Restored by the pin and built
122+
# only on a miss (scripts/objectstack-pin.mjs); the save is this job's last step.
123+
- name: Restore the pinned @objectstack build
124+
id: objectstack-pin
125+
uses: actions/cache/restore@v6
126+
with:
127+
path: node_modules/.cache/objectstack
128+
key: objectstack-pin-${{ runner.os }}-${{ hashFiles('.objectstack-sha', 'scripts/objectstack-pin.mjs') }}
129+
130+
- name: Build @objectstack at the pin (skips a restored build)
131+
id: objectstack-build
132+
run: node scripts/objectstack-pin.mjs build
133+
119134
- name: Install the Vercel CLI
120135
run: npm install --global "vercel@${VERCEL_CLI_VERSION}"
121136

@@ -136,3 +151,16 @@ jobs:
136151
echo "### Docs deployed to production" >> "$GITHUB_STEP_SUMMARY"
137152
echo "" >> "$GITHUB_STEP_SUMMARY"
138153
echo "${url} (commit ${GITHUB_SHA})" >> "$GITHUB_STEP_SUMMARY"
154+
155+
# The pinned @objectstack build, saved only when this job built it (a cache
156+
# miss) and whatever the verdict above was -- it does not depend on it.
157+
# Bookkeeping: bounded and non-fatal (objectui#6577, objectui#7048). The bound
158+
# is not yet derived from a measured save; re-derive it from this step's runs.
159+
- name: Save the pinned @objectstack build
160+
if: ${{ !cancelled() && steps.objectstack-build.outcome == 'success' && steps.objectstack-pin.outputs.cache-hit != 'true' }}
161+
continue-on-error: true
162+
timeout-minutes: 2
163+
uses: actions/cache/save@v6
164+
with:
165+
path: node_modules/.cache/objectstack
166+
key: objectstack-pin-${{ runner.os }}-${{ hashFiles('.objectstack-sha', 'scripts/objectstack-pin.mjs') }}

0 commit comments

Comments
 (0)