Generate validated v19 Intent and Observer SDKs - #797
Conversation
|
Warning Review limit reached
Next review available in: 45 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the 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 configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughAdds a deterministic generated Users SDK fixture with validated intent and observer handlers, exposes supporting advanced APIs, verifies packed-consumer behavior, updates type checks and documentation, and enforces generation and smoke checks in CI. ChangesGenerated SDK validation
Estimated code review effort: 4 (Complex) | ~45 minutes Sequence Diagram(s)sequenceDiagram
participant CI
participant Wesley
participant FixtureGenerator
participant PackedConsumer
participant Runtime
CI->>Wesley: install pinned generator revision
CI->>FixtureGenerator: check generated fixture drift
FixtureGenerator->>PackedConsumer: provide generated SDK fixture
PackedConsumer->>Runtime: write users and roles
PackedConsumer->>Runtime: read role observations
Runtime-->>CI: smoke test result
Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@scripts/generated-sdk/RenderUsersSdkFixture.ts`:
- Around line 1-8: Update the generated SDK consumer configuration associated
with RenderUsersSdkFixture to enable .js-to-.ts resolution, using either
rewriteRelativeImportExtensions or allowImportingTsExtensions in the packed
consumer tsconfig. Preserve the existing NodeNext module configuration and
generated import behavior.
- Around line 223-230: Update requireOutputPath to report a missing or
incomplete --out CLI argument with a distinct usage-error type or message
instead of GeneratedSdkContractError. Keep the existing validation and returned
output behavior unchanged when a valid path is provided.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: 02516bd0-7276-4549-a5a4-17f64cf58eb3
⛔ Files ignored due to path filters (2)
test/fixtures/generated-sdk/users.generated.tsis excluded by!**/*.generated.*test/fixtures/generated-sdk/users.wesley.generated.tsis excluded by!**/*.generated.*
📒 Files selected for processing (22)
.github/workflows/ci.ymladvanced.tsdocs/topics/api/README.mddocs/topics/reference.mdpackage.jsonscripts/check-source-backed-reference.tsscripts/generated-sdk/GenerateUsersSdkFixture.tsscripts/generated-sdk/RenderUsersSdkFixture.tsscripts/smoke-generated-sdk.shtest/fixtures/generated-sdk/README.mdtest/fixtures/generated-sdk/consumer-read.tstest/fixtures/generated-sdk/consumer-write.tstest/fixtures/generated-sdk/tsconfig.jsontest/fixtures/generated-sdk/users.graphqltest/type-check/generated-users.tstest/type-check/tsconfig.jsontest/type-check/v19-consumer.tstest/type-check/v19-first-use.tstest/type-check/v19-subpaths.tstest/unit/scripts/v19-public-api-boundary.test.tstsconfig.test.jsonvitest.config.ts
💤 Files with no reviewable changes (1)
- test/type-check/generated-users.ts
📜 Review details
⏰ Context from checks skipped due to timeout. (14)
- GitHub Check: v19 base/head performance
- GitHub Check: preflight
- GitHub Check: typecheck-test-advisory
- GitHub Check: test-deno
- GitHub Check: coverage-threshold
- GitHub Check: type-firewall-types
- GitHub Check: test-node (22)
- GitHub Check: type-firewall-docs
- GitHub Check: test-bun
- GitHub Check: type-firewall-lint
- GitHub Check: type-firewall-surface
- GitHub Check: type-firewall-semgrep
- GitHub Check: type-firewall-generated-sdk
- GitHub Check: type-firewall-quarantine
🧰 Additional context used
📓 Path-based instructions (1)
**/*.{ts,tsx,js,jsx}
📄 CodeRabbit inference engine (AGENTS.md)
**/*.{ts,tsx,js,jsx}: Do not use direct imports fromsrc/infrastructure/**insrc/domain/**orsrc/ports/**; depend on a port instead.
Do not use direct Node built-ins insrc/domain/**orsrc/ports/**; use a port instead.
Files:
vitest.config.tstest/type-check/v19-consumer.tstest/type-check/v19-first-use.tstest/fixtures/generated-sdk/consumer-write.tstest/fixtures/generated-sdk/consumer-read.tsadvanced.tstest/unit/scripts/v19-public-api-boundary.test.tsscripts/check-source-backed-reference.tsscripts/generated-sdk/GenerateUsersSdkFixture.tstest/type-check/v19-subpaths.tsscripts/generated-sdk/RenderUsersSdkFixture.ts
🧠 Learnings (1)
📚 Learning: 2026-03-04T12:08:30.347Z
Learnt from: flyingrobots
Repo: git-stunts/git-warp PR: 63
File: package.json:126-126
Timestamp: 2026-03-04T12:08:30.347Z
Learning: Vitest 4 removes vite-node as a dependency and rewrites its pool system. Do not flag the absence of vite-node in package.json or lockfiles as an error for Vitest 4 projects. Use this as a general guideline: if a project uses Vitest 4, missing vite-node is expected and correct; only flag issues if there is evidence the project is not using Vitest 4 or if vite-node is explicitly required by the project.
Applied to files:
package.json
🪛 ast-grep (0.44.1)
scripts/generated-sdk/GenerateUsersSdkFixture.ts
[warning] 11-11: Importing child_process exposes a command-execution surface; ensure any command/argument built from input is validated, and prefer execFile/spawn with an argument array over exec.
Context: import { execFileSync } from 'node:child_process';
Note: [CWE-78] Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection').
(detect-child-process-typescript)
🪛 LanguageTool
test/fixtures/generated-sdk/README.md
[grammar] ~3-~3: Use a hyphen to join words.
Context: ...K fixture users.graphql is the single authored source for this fixture. Wesley...
(QB_NEW_EN_HYPHEN)
🪛 zizmor (1.26.1)
.github/workflows/ci.yml
[error] 122-122: runtime artifacts potentially vulnerable to a cache poisoning attack (cache-poisoning): this step
(cache-poisoning)
[info] 115-115: workflow or action definition without a name (anonymous-definition): this job
(anonymous-definition)
[warning] 193-193: code injection via template expansion (template-injection): may expand into attacker-controllable code
(template-injection)
[warning] 194-194: code injection via template expansion (template-injection): may expand into attacker-controllable code
(template-injection)
[warning] 196-196: code injection via template expansion (template-injection): may expand into attacker-controllable code
(template-injection)
[warning] 197-197: code injection via template expansion (template-injection): may expand into attacker-controllable code
(template-injection)
[warning] 198-198: code injection via template expansion (template-injection): may expand into attacker-controllable code
(template-injection)
[warning] 199-199: code injection via template expansion (template-injection): may expand into attacker-controllable code
(template-injection)
[warning] 200-200: code injection via template expansion (template-injection): may expand into attacker-controllable code
(template-injection)
[warning] 201-201: code injection via template expansion (template-injection): may expand into attacker-controllable code
(template-injection)
🔇 Additional comments (22)
test/fixtures/generated-sdk/tsconfig.json (1)
1-18: LGTM!test/fixtures/generated-sdk/consumer-write.ts (1)
1-48: LGTM!test/fixtures/generated-sdk/consumer-read.ts (1)
1-67: LGTM!scripts/smoke-generated-sdk.sh (1)
1-57: LGTM!tsconfig.test.json (1)
15-15: LGTM!.github/workflows/ci.yml (1)
115-138: LGTM!Also applies to: 182-182, 193-201
advanced.ts (1)
12-17: LGTM!docs/topics/reference.md (1)
98-112: LGTM!Also applies to: 114-128
docs/topics/api/README.md (1)
8-10: LGTM!Also applies to: 554-561
test/type-check/tsconfig.json (1)
4-19: LGTM!test/type-check/v19-consumer.ts (1)
26-26: LGTM!test/type-check/v19-first-use.ts (1)
4-4: LGTM!test/type-check/v19-subpaths.ts (1)
9-23: LGTM!Also applies to: 45-59, 86-87
test/unit/scripts/v19-public-api-boundary.test.ts (1)
203-216: LGTM!vitest.config.ts (1)
33-33: LGTM!test/fixtures/generated-sdk/users.graphql (1)
1-74: LGTM!scripts/generated-sdk/RenderUsersSdkFixture.ts (1)
17-88: LGTM!Also applies to: 110-220
scripts/generated-sdk/GenerateUsersSdkFixture.ts (2)
37-106: LGTM!
1-16: 🩺 Stability & AvailabilityNo change needed. The project pins Node
22acrosspackage.jsonengines and CI, which supports flagless native TypeScript execution for these scripts.package.json (1)
76-77: LGTM!Also applies to: 100-100
scripts/check-source-backed-reference.ts (1)
270-270: LGTM!test/fixtures/generated-sdk/README.md (1)
1-22: LGTM!
Release Preflight
If this PR is from a |
Release Preflight
If this PR is from a |
Summary
Issue
Closes #790
Test plan
npm run test:localnpm run test:coverage -- --maxWorkers=2npm run test:sdk-fixturenpm run check:sdk-fixture -- --wesley /tmp/git-warp-wesley-4891a631/bin/wesleyADR checks