Skip to content

fix(sdk): reject Cloudflare-native model IDs, bridge multi-part auth env vars#397

Open
sentry-junior[bot] wants to merge 5 commits into
mainfrom
fix/cloudflare-pi-selector-config
Open

fix(sdk): reject Cloudflare-native model IDs, bridge multi-part auth env vars#397
sentry-junior[bot] wants to merge 5 commits into
mainfrom
fix/cloudflare-pi-selector-config

fix(sdk): add Cloudflare preflight to runSkills, fix uppercase-provid…

c99f435
Select commit
Loading
Failed to load commit list.
@sentry/warden / warden: code-review completed Jun 5, 2026 in 13m 16s

1 issue

code-review: Found 1 issue (1 medium)

Medium

Missing-Cloudflare-env early-exit returns 1 without emitting JSONL run log, breaking --json/--output contract - `packages/warden/src/cli/main.ts:10`

The new findMissingCloudflareEnv early-exit in runSkills (and the second call site at ~line 1536) calls reportMissingCloudflareEnv then return 1 without calling emitEmptyRunLog. With --json active no JSONL record is written to stdout, and with --output <path> no artifact file is written, even though every sibling failure path (invalid_model_selector, auth_failed, unknown) emits one. Add an emitEmptyRunLog call with an appropriate error code before return 1.

Also found at:

  • packages/warden/src/cli/main.ts:1201-1205

⏱ 11m 43s · 4.5M in / 131.6k out · $5.08

Annotations

Check warning on line 10 in packages/warden/src/cli/main.ts

See this annotation in the file changed.

@sentry-warden sentry-warden / warden: code-review

Missing-Cloudflare-env early-exit returns 1 without emitting JSONL run log, breaking --json/--output contract

The new `findMissingCloudflareEnv` early-exit in `runSkills` (and the second call site at ~line 1536) calls `reportMissingCloudflareEnv` then `return 1` without calling `emitEmptyRunLog`. With `--json` active no JSONL record is written to stdout, and with `--output <path>` no artifact file is written, even though every sibling failure path (`invalid_model_selector`, `auth_failed`, `unknown`) emits one. Add an `emitEmptyRunLog` call with an appropriate error code before `return 1`.

Check warning on line 1205 in packages/warden/src/cli/main.ts

See this annotation in the file changed.

@sentry-warden sentry-warden / warden: code-review

[82L-9DJ] Missing-Cloudflare-env early-exit returns 1 without emitting JSONL run log, breaking --json/--output contract (additional location)

The new `findMissingCloudflareEnv` early-exit in `runSkills` (and the second call site at ~line 1536) calls `reportMissingCloudflareEnv` then `return 1` without calling `emitEmptyRunLog`. With `--json` active no JSONL record is written to stdout, and with `--output <path>` no artifact file is written, even though every sibling failure path (`invalid_model_selector`, `auth_failed`, `unknown`) emits one. Add an `emitEmptyRunLog` call with an appropriate error code before `return 1`.