Repository navigation
chore(ci): publish package previews - #370
Conversation
commit: |
chenjiahan
left a comment
There was a problem hiding this comment.
Requesting changes because the published rstack preview is not release-equivalent.
[P1] Publish native packages with the preview
In .github/workflows/pkg-pr-new.yml:31, the invocation publishes only the two JS package directories. The preceding root build does not run the NAPI build/assembly or napi pre-publish, so the actual rstack@4b142ab archive contains binding.cjs but neither a .node artifact nor any @rstackjs/cli-* optional dependencies. A clean install fails with Cannot find native binding as soon as rs fmt loads a .gitignore or --ignore-path. Please reuse the native release assembly flow, inject the preview native dependencies, and publish those packages in the same invocation.
[P2] Stage bundled docs before packing
In .github/workflows/pkg-pr-new.yml:28, node --run build does not populate packages/rstack/docs, which is generated and ignored. The production release runs node --run release:prepare; this preview tarball consequently has no docs/ or docs/llms.txt. Please run release preparation, or equivalent docs staging, before publishing.
[P3] Remove the string-based workflow test
packages/rstack/tests/pkgPrNew.test.ts duplicates workflow text without validating behavior: comments could satisfy the assertions, a routine pkg-pr-new upgrade requires test churn, and it remains green while the published archive is missing native bindings and docs. The workflow run already validates the wiring. Please remove this test; if regression coverage is desired, add a post-publish smoke test that installs the emitted URL and runs representative rstack and create-rstack commands.
Trigger timing
The current pre-merge pull_request trigger targeting main is appropriate for a PR preview. I would not defer it until merge; a separate push trigger on main can provide post-merge snapshots. As optional CI optimizations, skip draft PRs and add per-PR concurrency with cancellation of superseded runs.
Verification: I inspected https://pkg.pr.new/rstack@4b142ab and reproduced the native binding failure from a clean install.
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8c6d95d5bc
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| run_install: true | ||
|
|
||
| - name: Build Packages | ||
| run: node --run build |
There was a problem hiding this comment.
Include native bindings in the rstack preview
On a clean Linux x64 installation of this preview, rs fmt and the formatting stage of rs check will throw Cannot find native binding. This step runs the manifest's build script (node --help: “Run a script specified in package.json”), which is only rslib for rstack. A repo-wide artifact search found no checked-in .node binaries, and packages/rstack/package.json declares no platform-native optional dependencies, so the formatter's loadNativeBinding() call has neither a local binary nor an installed fallback package. Ensure previews include or depend on matching native bindings before publishing, analogous to the native preparation in .github/workflows/release.yml:88-102.
Useful? React with 👍 / 👎.
| expect(workflow).toContain("'./packages/create-rstack'"); | ||
| expect(workflow).not.toContain('head.repo.full_name == github.repository'); | ||
| expect(packageJson).toContain('"pkg-pr-new": "catalog:"'); | ||
| expect(workspace).toContain('pkg-pr-new: 0.0.87'); |
There was a problem hiding this comment.
Remove the hard-coded publisher version from the test
When pkg-pr-new is upgraded in the catalog, an otherwise-valid dependency update will make the package test suite fail solely because this assertion requires 0.0.87. AGENTS.md requires tests to be “focused on observable behavior”; this check instead locks an implementation detail without establishing that previews publish correctly. Remove the fixed-version expectation or check manifest/catalog consistency without hard-coding a release.
AGENTS.md reference: AGENTS.md:L33-L33
Useful? React with 👍 / 👎.
This PR enables pkg.pr.new previews for
rstackandcreate-rstackso pull requests can be tested through installable package URLs before release.It installs the publisher from the workspace lockfile, builds both packages, and publishes them in one pnpm-aware workflow invocation. The workflow is ready while the pkg.pr.new GitHub App access request is awaiting approval.