Skip to content

ci: run the gallery check from the published @objectstack/scenarios@18.4.0 - #2

Merged
os-zhuang merged 1 commit into
mainfrom
claude/project-thread-kvq2zz
Nov 15, 2026
Merged

os-zhuang merged 1 commit into
mainfrom
claude/project-thread-kvq2zz

Conversation

@objectstack-fleet

Copy link
Copy Markdown

Requested by Leehom · project thread

domain:devx#4 · os-project-manager · session_01FEkQ5pYJRi1469Tk9JBofT

Fixes objectstack-ai/objectstack#33133

Clause-②: no
Metadata-protocol: none

维护者速读

  • 改了什么:画廊仓的必过检查 Gallery check 不再检出 objectstack 源码、装依赖、构建,改成一步 npx --yes @objectstack/scenarios@18.4.0 export-gallery --check,钉死在 18.4.0 这个确切版本;OBJECTSTACK_SHA 删掉;工作流头部写明何时、由哪个 PR 挪这个版本号。
  • 为什么改:原来每个画廊 PR 都要从源码构建检查器,慢,而且检查器绑在 objectstack 的某个 commit 上,不是绑在画廊应用所基于的发布版本上;18.4.0 已发布带 --check 的检查器。
  • 风险与回滚:检查器的判定与源码版逐字相同(下方两份读数:.env 和未登记的 apps/x/ 两种拒绝,npm 18.4.0 与 objectstack main 源码构建输出同样的行、同样 exit 1)。npx 在 runner 临时目录里跑、只读 PR 树,PR 里放的 .npmrc 改不了检查器从哪下载。回滚即还原本 PR。
  • 先看:.github/workflows/gallery-check.yml 最后一步(npx 那行)和头部的版本钉规则段。
  • 两分钟验证:本 PR 自己的 Gallery check 绿;或在任一画廊检出外的目录跑 npx --yes @objectstack/scenarios@18.4.0 export-gallery --check 画廊目录,预期 gallery check: clean、exit 0。
  • 需要你做的:无,席位落地。

What changes

.github/workflows/gallery-check.yml only:

  • Ask 1. The objectstack checkout, the pnpm install and the closure build steps are gone, and so is OBJECTSTACK_SHA. The check is one step: npx --yes @objectstack/scenarios@18.4.0 export-gallery --check "$GITHUB_WORKSPACE/gallery", pinned to the exact version (npm latest = 18.4.0, the only stable release, read 2026-11-14 at start). setup-node stays, with node-version: '22' (the package declares engines.node >=22.0.0; it was objectstack's .nvmrc = 22 before). The job name Gallery check (the context ruleset 27091720 requires) and permissions: contents: read are unchanged. timeout-minutes drops 20 → 10, since nothing is built.
  • Ask 2. The header now states the version-pin rule: never latest or a range; the pin moves when an objectstack release changes the checker (src/export/check.ts, check-cli.ts) or the index schema (src/export/manifest.ts); the PR that moves it is that release's gallery-refresh PR (export/VERSION branch), or a separate PR here when a release changes the checker but exports nothing. That PR's own Gallery check is the proof the new pin reads the tree as clean (a pull_request run uses the PR head's workflow file).
  • One deviation from the card's literal step. The card's step is npx … export-gallery --check ., run inside the checkout. npm reads a project .npmrc from the working directory, so run there a PR could add a .npmrc that redirects where npx fetches @objectstack/scenarios from, and the PR's code would run, which breaks the header's "no file from the PR is executed". The checkout therefore stays at path: gallery and npx runs with working-directory: ${{ runner.temp }} on "$GITHUB_WORKSPACE/gallery". Same checker, same version, same exit codes (readings below).

README: it names the workflow and what it refuses, not the source build, so it is unchanged.

Tests

No test suite in this repository; the readings below are the proof (Ask 3).

Acceptance notes

  • The repository has no lane labels (only GitHub's defaults), so the PR carries none.
  • The gallery's apps/ and index.json are untouched (the tree is still empty: no index.json, apps/README.md only).

Verification

Ask 3 negative reading: npm 18.4.0 vs objectstack main (f068cde8) source build, identical lines

Scratch copies of this repository's main tree (git archive origin/main): clean, env (plus a stray .env), app (plus an unlisted apps/x/README.md).

Pinned published checker, run as the workflow runs it (from a separate temp directory, absolute path):

$ npx --yes @objectstack/scenarios@18.4.0 export-gallery --check SCRATCH/clean
gallery check: clean · SCRATCH/clean
EXIT=0
$ npx --yes @objectstack/scenarios@18.4.0 export-gallery --check SCRATCH/env
env-file .env: an environment file never belongs in the gallery
gallery check: 1 finding(s) · SCRATCH/env
EXIT=1
$ npx --yes @objectstack/scenarios@18.4.0 export-gallery --check SCRATCH/app
app-unlisted apps/x: a directory under apps/ that index.json does not list
gallery check: 1 finding(s) · SCRATCH/app
EXIT=1

The card's literal form (--check . inside each tree) prints the same lines and exit codes.

Source-built checker, objectstack main at f068cde8 (pnpm install --frozen-lockfile --filter '@objectstack/scenarios...', OS_SKIP_DTS=1 pnpm --filter '@objectstack/scenarios^...' build, the steps this PR removes):

$ pnpm --filter @objectstack/scenarios export-gallery --check SCRATCH/clean
gallery check: clean · SCRATCH/clean
EXIT=0
$ pnpm --filter @objectstack/scenarios export-gallery --check SCRATCH/env
env-file .env: an environment file never belongs in the gallery
gallery check: 1 finding(s) · SCRATCH/env
EXIT=1
$ pnpm --filter @objectstack/scenarios export-gallery --check SCRATCH/app
app-unlisted apps/x: a directory under apps/ that index.json does not list
gallery check: 1 finding(s) · SCRATCH/app
EXIT=1

(pnpm adds its own ERR_PNPM_RECURSIVE_RUN_FIRST_FAIL trailer on exit 1; the checker's lines are byte-identical.)

Why npx runs outside the checkout: a PR .npmrc is read inside it

npm config get registry in a directory holding .npmrc with registry=https://registry.example.invalid/ answers that registry; in /tmp it answers https://registry.npmjs.org/. With an empty npm cache and that .npmrc in the scratch tree:

  • inside the tree, npx --yes @objectstack/scenarios@18.4.0 export-gallery --check . → npm fetches from the PR's registry (npm error 403 … on a server you do not have access to), exit 1;
  • from a separate directory, npx --yes @objectstack/scenarios@18.4.0 export-gallery --check SCRATCH/npmrc → gallery check: clean, exit 0.
Gate: actionlint

dispatch-gates answers for objectstack only, so the gate is actionlint v1.7.12 (go install github.com/rhysd/actionlint/cmd/actionlint@v1.7.12) on the workflow: exit 0 on this head (07ed6c5), exit 0 on main. The PR's own Gallery check run is the required proof.

🤖 Generated with Claude Code

https://claude.ai/code/session_01FEkQ5pYJRi1469Tk9JBofT


Generated by Claude Code

…8.4.0

Replace the objectstack checkout, install and build steps with one npx
step pinned to the exact release, drop OBJECTSTACK_SHA, and state the
version-pin rule in the header. npx runs from the runner's temp
directory, so a .npmrc or package.json in the PR tree cannot redirect
where the checker comes from.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FEkQ5pYJRi1469Tk9JBofT
@objectstack-fleet

Copy link
Copy Markdown
Author

domain:devx#4 · os-project-manager · session_01FEkQ5ooRyyS95kdyC2dPEX

席位核对 · ACCEPT · head 07ed6c54 · 2026-11-14T22:55Z

  • 形态: draft → main, attribution first, Fixes objectstack-ai/objectstack#33133. One path: .github/workflows/gallery-check.yml (+21/-35), the card's whole surface. Clause-②: no ⇒ no contract-review face; lane seat lands.
  • Diff read: the objectstack checkout, install and closure-build steps and OBJECTSTACK_SHA are gone; one step runs npx --yes @objectstack/scenarios@18.4.0 export-gallery --check "$GITHUB_WORKSPACE/gallery", an exact version (npm latest = 18.4.0, read by the seat 2026-11-14T22:45Z). Job name Gallery check (the context ruleset 27091720 requires) and permissions: contents: read unchanged; setup-node pins Node 22 (engines.node >=22.0.0). The header carries the version-pin rule (moves when a release changes src/export/check.ts, check-cli.ts or manifest.ts, all three present on objectstack main; moved by that release's gallery-refresh PR or a separate PR here).
  • 门禁: Gallery check success on head 07ed6c54 (run 43650411579, the only check-run); actionlint v1.7.12 exit 0 (dev's run, 33133-gates-ran.txt). Negative readings in the body: .env and unlisted apps/x/ refused by npm 18.4.0 with the same lines and exit 1 as the objectstack main source build.
  • Changeset: none owed (the gallery ships no package).
  • 接受的偏差: npx runs with working-directory: ${{ runner.temp }} on the checkout path instead of the card's literal --check . inside it. Accepted: npm reads a project .npmrc from the cwd, so inside the tree a PR could redirect the fetch and run its own code (the dev measured it), which would break the header's "no file from the PR is executed". Same checker, same exit codes.
  • 范围外去向: none. README names the workflow and its refusals, not the source build, so it stays.
  • 落地条款: one non-governed workflow path, the required check green, no approving review required by the ruleset ⇒ the seat readies and arms auto-merge. Ruling-ref: the maintainer's standing authorisation 「按照 pm-dispatch 规则复核过的都授权」 (2026-10-25T11:35Z) and 「你应该使用 pm-dispatch 技能审核和落地pr」 (this account's project).

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review November 14, 2026 22:56
@objectstack-fleet

Copy link
Copy Markdown
Author

domain:devx#4 · os-project-manager · session_01FEkQ5ooRyyS95kdyC2dPEX

席位核对 · ACCEPT · head 07ed6c54 · 2026-11-14T22:56Z

  • 形态: draft → main, attribution first, Fixes objectstack-ai/objectstack#33133. One path: .github/workflows/gallery-check.yml (+21/-35), the card's whole surface. Clause-②: no ⇒ no contract-review face; lane seat lands.
  • Diff read: the objectstack checkout, install and closure-build steps and OBJECTSTACK_SHA are gone; one step runs npx --yes @objectstack/scenarios@18.4.0 export-gallery --check "$GITHUB_WORKSPACE/gallery", an exact version (npm latest = 18.4.0, read by the seat 2026-11-14T22:45Z). Job name Gallery check (the context ruleset 27091720 requires) and permissions: contents: read unchanged; setup-node pins Node 22 (engines.node >=22.0.0). The header carries the version-pin rule (moves when a release changes src/export/check.ts, check-cli.ts or manifest.ts, all three present on objectstack main; moved by that release's gallery-refresh PR or a separate PR here).
  • 门禁: Gallery check success on head 07ed6c54 (run 43650411579, the only check-run); actionlint v1.7.12 exit 0 (dev's run, 33133-gates-ran.txt). Negative readings in the body: .env and unlisted apps/x/ refused by npm 18.4.0 with the same lines and exit 1 as the objectstack main source build.
  • Changeset: none owed (the gallery ships no package).
  • 接受的偏差: npx runs with working-directory: ${{ runner.temp }} on the checkout path instead of the card's literal --check . inside it. Accepted: npm reads a project .npmrc from the cwd, so inside the tree a PR could redirect the fetch and run its own code (the dev measured it), which would break the header's "no file from the PR is executed". Same checker, same exit codes.
  • 范围外去向: none. README names the workflow and its refusals, not the source build, so it stays.
  • 落地条款: one non-governed workflow path, the required check green, no approving review required by the ruleset ⇒ the seat readies and arms auto-merge. Ruling-ref: the maintainer's standing authorisation 「按照 pm-dispatch 规则复核过的都授权」 (2026-10-25T11:35Z) and 「你应该使用 pm-dispatch 技能审核和落地pr」 (this account's project).

@os-zhuang
os-zhuang merged commit f67349e into main Nov 15, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

objectstack-ai/gallery: the Gallery check runs the published @objectstack/scenarios@18.4.0 (npx) instead of building objectstack from source

2 participants