Repository navigation
ci: run the gallery check from the published @objectstack/scenarios@18.4.0 - #2
Merged
Merged
Conversation
…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
Author
|
domain:devx#4 · os-project-manager · session_01FEkQ5ooRyyS95kdyC2dPEX 席位核对 · ACCEPT · head
|
Author
|
domain:devx#4 · os-project-manager · session_01FEkQ5ooRyyS95kdyC2dPEX 席位核对 · ACCEPT · head
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 挪这个版本号。--check的检查器。.env和未登记的apps/x/两种拒绝,npm 18.4.0 与 objectstack main 源码构建输出同样的行、同样 exit 1)。npx 在 runner 临时目录里跑、只读 PR 树,PR 里放的.npmrc改不了检查器从哪下载。回滚即还原本 PR。.github/workflows/gallery-check.yml最后一步(npx 那行)和头部的版本钉规则段。Gallery check绿;或在任一画廊检出外的目录跑npx --yes @objectstack/scenarios@18.4.0 export-gallery --check 画廊目录,预期gallery check: clean、exit 0。What changes
.github/workflows/gallery-check.ymlonly:pnpm installand the closure build steps are gone, and so isOBJECTSTACK_SHA. The check is one step:npx --yes @objectstack/scenarios@18.4.0 export-gallery --check "$GITHUB_WORKSPACE/gallery", pinned to the exact version (npmlatest= 18.4.0, the only stable release, read 2026-11-14 at start).setup-nodestays, withnode-version: '22'(the package declaresengines.node >=22.0.0; it was objectstack's.nvmrc= 22 before). The job nameGallery check(the context ruleset 27091720 requires) andpermissions: contents: readare unchanged.timeout-minutesdrops 20 → 10, since nothing is built.latestor 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/VERSIONbranch), or a separate PR here when a release changes the checker but exports nothing. That PR's ownGallery checkis the proof the new pin reads the tree as clean (apull_requestrun uses the PR head's workflow file).npx … export-gallery --check ., run inside the checkout. npm reads a project.npmrcfrom the working directory, so run there a PR could add a.npmrcthat redirects where npx fetches@objectstack/scenariosfrom, and the PR's code would run, which breaks the header's "no file from the PR is executed". The checkout therefore stays atpath: galleryand npx runs withworking-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
apps/andindex.jsonare untouched (the tree is still empty: noindex.json,apps/README.mdonly).Verification
Ask 3 negative reading: npm 18.4.0 vs objectstack main (f068cde8) source build, identical lines
Scratch copies of this repository's
maintree (git archive origin/main):clean,env(plus a stray.env),app(plus an unlistedapps/x/README.md).Pinned published checker, run as the workflow runs it (from a separate temp directory, absolute path):
The card's literal form (
--check .inside each tree) prints the same lines and exit codes.Source-built checker, objectstack
mainat f068cde8 (pnpm install --frozen-lockfile --filter '@objectstack/scenarios...',OS_SKIP_DTS=1 pnpm --filter '@objectstack/scenarios^...' build, the steps this PR removes):(pnpm adds its own
ERR_PNPM_RECURSIVE_RUN_FIRST_FAILtrailer 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 registryin a directory holding.npmrcwithregistry=https://registry.example.invalid/answers that registry; in/tmpit answershttps://registry.npmjs.org/. With an empty npm cache and that.npmrcin the scratch 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;npx --yes @objectstack/scenarios@18.4.0 export-gallery --check SCRATCH/npmrc→gallery check: clean, exit 0.Gate: actionlint
dispatch-gatesanswers 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 onmain. The PR's ownGallery checkrun is the required proof.🤖 Generated with Claude Code
https://claude.ai/code/session_01FEkQ5pYJRi1469Tk9JBofT
Generated by Claude Code