fix: make generated app validation portable to Windows - #1425
Conversation
|
Warning Review limit reached
Next review available in: 23 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 Run ID: 📒 Files selected for processing (8)
📝 WalkthroughWalkthroughcreate-croco-app이 Windows 경로와 명령 실행을 지원하도록 CLI 결과, 템플릿 스크립트, 계약 로더, smoke 실행기를 수정했습니다. Windows 패키징 검증 잡과 관련 테스트, changeset도 추가되었습니다. Changes크로스 플랫폼 스캐폴드
Estimated code review effort: 4 (Complex) | ~45 minutes Sequence Diagram(s)sequenceDiagram
participant WindowsCI
participant CreateCrocoApp
participant GeneratedProject
participant SmokeValidation
WindowsCI->>CreateCrocoApp: 패키징된 CLI 실행
CreateCrocoApp->>GeneratedProject: 공백 포함 Windows 경로에 scaffold 생성
SmokeValidation->>GeneratedProject: corepack.cmd로 install 실행
SmokeValidation->>GeneratedProject: contract 및 doctor validation 실행
Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
📊 Benchmark Results✅ All benchmarks passed
Updated: 2026-07-22T18:28:23.572Z · Commit: 3e3b53d |
91b4135 to
dd5f368
Compare
There was a problem hiding this comment.
Actionable comments posted: 4
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
scripts/create-croco-app-generated-smoke.mts (1)
2345-2368: 📐 Maintainability & Code Quality | 🟠 Major | ⚡ Quick win검증 실패를
Problem하위 클래스로 교체하세요.
scripts/create-croco-app-generated-smoke.mts:2345-2368의throw new Error(...)는 코딩 가이드라인의 “Throw only Problem subclasses, never generic Error instances”와 RFC 7807Problemcontract에 맞지 않습니다.code와category를 포함하는 전용Problem하위 클래스로 교체하세요.🤖 Prompt for 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. In `@scripts/create-croco-app-generated-smoke.mts` around lines 2345 - 2368, Replace the generic Error throws in the generated package validation checks with a dedicated Problem subclass that includes the required code and category fields. Update each validation failure in the smoke-test logic around the engines.node, .nvmrc, README guidance, and runtime-target checks to instantiate that subclass while preserving the existing messages.Source: Coding guidelines
🤖 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 @.github/workflows/ci.yml:
- Around line 419-428: Pin the action references in the CI workflow’s checkout,
pnpm setup, and Node.js setup steps to their verified full commit SHAs instead
of the mutable `@v4` tags, and add comments documenting the corresponding action
versions.
- Around line 413-419: Update the windows-scaffold job to declare permissions
with contents read-only, and configure its actions/checkout step with
persist-credentials disabled. Apply both changes specifically to the job and
checkout configuration without altering the remaining workflow steps.
In `@packages/framework-routes/scripts/generate-routes.js`:
- Around line 9-12: Rename the module constant sampleControllerSourcePath to
SAMPLE_CONTROLLER_SOURCE_PATH and update all references, including the
additional affected locations. Change the strings added or modified in this
change to single-quoted literals while preserving the existing behavior.
In `@scripts/create-croco-app-generated-smoke.mts`:
- Line 257: Rename the module constant corepackCommand to COREPACK_COMMAND and
update every reference to use the new SCREAMING_SNAKE_CASE name, preserving the
existing platform-specific command selection.
---
Outside diff comments:
In `@scripts/create-croco-app-generated-smoke.mts`:
- Around line 2345-2368: Replace the generic Error throws in the generated
package validation checks with a dedicated Problem subclass that includes the
required code and category fields. Update each validation failure in the
smoke-test logic around the engines.node, .nvmrc, README guidance, and
runtime-target checks to instantiate that subclass while preserving the existing
messages.
🪄 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
Run ID: 7d4307b5-31b1-4bd4-b909-221acd65cdc2
📒 Files selected for processing (23)
.changeset/portable-croco-scaffolds.md.github/workflows/ci.ymlpackages/create-croco-app/src/cli-result.tspackages/create-croco-app/src/options.tspackages/create-croco-app/src/template-path.tspackages/create-croco-app/src/tests/TemplatePath.spec.tspackages/create-croco-app/src/tests/cli-result.spec.tspackages/create-croco-app/src/tests/e2e-generation.spec.tspackages/create-croco-app/src/tests/options.spec.tspackages/create-croco-app/src/tests/templates-build.spec.tspackages/create-croco-app/templates/admin-console/package.json.hbspackages/create-croco-app/templates/ai-saas/package.json.hbspackages/create-croco-app/templates/saas/package.json.hbspackages/create-croco-app/templates/spa-be-split/package.json.hbspackages/framework-routes/scripts/generate-routes.jspackages/openapi-spec/src/libs/loadControllers.tspackages/openapi-spec/src/tests/loadControllers.spec.tspackages/rpc-codegen/src/libs/loadRoutes.tspackages/rpc-codegen/src/tests/loadRoutes.spec.tsscripts/create-croco-app-generated-smoke.mtsscripts/strict-contract-typecheck.mtsscripts/tests/create-croco-app-generated-smoke.spec.tstsconfig/contract-strict.baseline.json
Outcome
The published scaffold now resolves packaged template URLs through platform-aware file paths, including encoded spaces and Windows drive URLs. Machine-readable success output exposes executable
command,args, andcwdfields instead of shell-escaped strings, while human output retains platform-specific navigation guidance.Generated SaaS, AI-SaaS, SPA, and admin validation scripts use declared package binaries with portable quoting and no inline POSIX environment assignments or direct
node_modulesbinary paths. Generated-app smoke execution supports Windows command shims, and CI now runs a packed CLI from a Windows path containing spaces plus the SaaS contract snapshot, contract verification, doctor, typecheck, and build path.This resolves the P1 scaffold portability gap without adding dependencies or promising package-manager support beyond pnpm.
Fixes #1321
Verification
pnpm --filter create-croco-app test— 111/111pnpm --filter create-croco-app typecheckpnpm build --filter=create-croco-app...goal-saas-apigenerated-app case — contract snapshot, contract verification, doctor, typecheck, build, test, demo flow, and failure drill passedpnpm strict-contract-typecheck— 590 baseline diagnostics matchedpnpm checkpnpm test— 226/226 taskspnpm typecheck— 225/225 tasksReview gates
fileURLToPath, existing declared binaries, and one Windows.cmdexecution boundary; template edits are limited to portable command forms and CI evidence.The Windows runner result is intentionally left to the new required CI job; no issue-scoped local validation gap remains.
Summary by CodeRabbit
새 기능
버그 수정
테스트