ci: hydrate dist before plugin-sdk test lanes#52267
Conversation
🔒 Aisle Security AnalysisWe found 1 potential security issue(s) in this PR:
1. 🟡 GitHub Actions workflow uses unpinned third-party action tag (actions/download-artifact@v8)
DescriptionThe CI workflow introduces additional uses of
Vulnerable code (newly added): - name: Download dist artifact
if: github.event_name == 'push' && matrix.task == 'test'
uses: actions/download-artifact@v8
with:
name: dist-build
path: dist/RecommendationPin GitHub Actions to an immutable commit SHA (and optionally keep the tag in a comment for readability), e.g.: - name: Download dist artifact
if: github.event_name == 'push' && matrix.task == 'test'
uses: actions/download-artifact@<FULL_COMMIT_SHA> # v8
with:
name: dist-build
path: dist/Also consider:
Analyzed PR: #52267 at commit Last updated on: 2026-03-22T13:48:56Z |
Greptile SummaryThis PR fixes a recurring CI failure where Issues found:
Confidence Score: 3/5
Prompt To Fix All With AIThis is a comment left during a code review.
Path: .github/workflows/ci.yml
Line: 273-275
Comment:
**"Build dist" runs for `bun+test` on PR without checkout or pnpm setup**
The condition `github.event_name != 'push' && matrix.task == 'test'` evaluates to `true` on PR events for the `bun+test` matrix entry. However, both the `Checkout` step (line 237) and the `Setup Node environment` step (line 243) are guarded by `if: github.event_name != 'pull_request' || (matrix.runtime != 'bun' ...)`, so they are **skipped** for `bun+PR`. This means `pnpm build` fires against an empty workspace with no `package.json` and no `pnpm` in PATH, causing the matrix shard to fail.
The `Run` step on line 278 already carries the correct bun guard:
```
if: github.event_name != 'pull_request' || (matrix.runtime != 'bun' && matrix.task != 'compat-node22')
```
The `Build dist` step needs the same guard for the `bun` runtime:
```suggestion
- name: Build dist
if: github.event_name != 'push' && matrix.task == 'test' && (github.event_name != 'pull_request' || matrix.runtime != 'bun')
run: pnpm build
```
(`compat-node22` doesn't need explicit coverage here because its `matrix.task` is `'compat-node22'`, not `'test'`, so the `matrix.task == 'test'` guard already excludes it.)
How can I resolve this? If you propose a fix, please make it concise.Reviews (1): Last reviewed commit: "ci: skip bun-only dist build on PRs" | Re-trigger Greptile |
| - name: Build dist | ||
| if: github.event_name != 'push' && matrix.task == 'test' && matrix.runtime == 'node' | ||
| run: pnpm build |
There was a problem hiding this comment.
"Build dist" runs for
bun+test on PR without checkout or pnpm setup
The condition github.event_name != 'push' && matrix.task == 'test' evaluates to true on PR events for the bun+test matrix entry. However, both the Checkout step (line 237) and the Setup Node environment step (line 243) are guarded by if: github.event_name != 'pull_request' || (matrix.runtime != 'bun' ...), so they are skipped for bun+PR. This means pnpm build fires against an empty workspace with no package.json and no pnpm in PATH, causing the matrix shard to fail.
The Run step on line 278 already carries the correct bun guard:
if: github.event_name != 'pull_request' || (matrix.runtime != 'bun' && matrix.task != 'compat-node22')
The Build dist step needs the same guard for the bun runtime:
| - name: Build dist | |
| if: github.event_name != 'push' && matrix.task == 'test' && matrix.runtime == 'node' | |
| run: pnpm build | |
| - name: Build dist | |
| if: github.event_name != 'push' && matrix.task == 'test' && (github.event_name != 'pull_request' || matrix.runtime != 'bun') | |
| run: pnpm build |
(compat-node22 doesn't need explicit coverage here because its matrix.task is 'compat-node22', not 'test', so the matrix.task == 'test' guard already excludes it.)
Prompt To Fix With AI
This is a comment left during a code review.
Path: .github/workflows/ci.yml
Line: 273-275
Comment:
**"Build dist" runs for `bun+test` on PR without checkout or pnpm setup**
The condition `github.event_name != 'push' && matrix.task == 'test'` evaluates to `true` on PR events for the `bun+test` matrix entry. However, both the `Checkout` step (line 237) and the `Setup Node environment` step (line 243) are guarded by `if: github.event_name != 'pull_request' || (matrix.runtime != 'bun' ...)`, so they are **skipped** for `bun+PR`. This means `pnpm build` fires against an empty workspace with no `package.json` and no `pnpm` in PATH, causing the matrix shard to fail.
The `Run` step on line 278 already carries the correct bun guard:
```
if: github.event_name != 'pull_request' || (matrix.runtime != 'bun' && matrix.task != 'compat-node22')
```
The `Build dist` step needs the same guard for the `bun` runtime:
```suggestion
- name: Build dist
if: github.event_name != 'push' && matrix.task == 'test' && (github.event_name != 'pull_request' || matrix.runtime != 'bun')
run: pnpm build
```
(`compat-node22` doesn't need explicit coverage here because its `matrix.task` is `'compat-node22'`, not `'test'`, so the `matrix.task == 'test'` guard already excludes it.)
How can I resolve this? If you propose a fix, please make it concise.There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6ae1582aec
ℹ️ About Codex in GitHub
Codex has been enabled to automatically 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 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| - name: Build dist | ||
| if: github.event_name != 'push' && matrix.task == 'test' | ||
| run: pnpm build |
There was a problem hiding this comment.
Preserve PR skip guard on the bun test lane
In .github/workflows/ci.yml, pull requests intentionally skip the { runtime: bun, task: test } matrix entry: the checkout, setup, and test steps all keep the github.event_name != 'pull_request' || (matrix.runtime != 'bun' && matrix.task != 'compat-node22') guard. This new Build dist step does not, so on every PR the bun shard now runs pnpm build after the "Skipping push-only lane" step, without a checkout or tool setup. That turns a previously skipped lane into a hard failure before tests even start.
Useful? React with 👍 / 👎.
🔒 Aisle Security AnalysisWe found 1 potential security issue(s) in this PR:
1. 🟡 GitHub Actions dependency not pinned to a commit SHA (actions/download-artifact@v8)
DescriptionThe workflow references a third-party GitHub Action by a mutable version tag (
Vulnerable code (added): - name: Download dist artifact
if: github.event_name == 'push' && matrix.task == 'test'
uses: actions/download-artifact@v8RecommendationPin GitHub Actions to a full commit SHA (optionally with an inline comment indicating the intended version tag), and rely on Dependabot to update the SHA. Example: - name: Download dist artifact
uses: actions/download-artifact@<FULL_LENGTH_COMMIT_SHA> # v8
with:
name: dist-build
path: dist/Also consider applying the same SHA pinning policy to other Analyzed PR: #52267 at commit Last updated on: 2026-03-22T14:01:21Z |
ci: hydrate dist before plugin-sdk test lanes (openclaw#52267)
* ci: hydrate dist before plugin-sdk test lanes * ci: skip bun-only dist build on PRs
* ci: hydrate dist before plugin-sdk test lanes * ci: skip bun-only dist build on PRs
* ci: hydrate dist before plugin-sdk test lanes * ci: skip bun-only dist build on PRs
* ci: hydrate dist before plugin-sdk test lanes * ci: skip bun-only dist build on PRs
Summary
Verification
[test-parallel] start unit-threads workers=1 filters=1
RUN v4.1.0 /Users/thoffman/openclaw/.worktrees/fix-main-ci-plugin-sdk
Test Files 1 passed (1)
Tests 5 passed (5)
Start at 08:40:03
Duration 766ms (transform 865ms, setup 28ms, import 12ms, tests 675ms, environment 0ms)
[test-parallel] done unit-threads code=0 elapsed=1.3s and no