Skip to content

fix: keep generated app linting consistent - #1661

Merged
kang-heewon merged 3 commits into
trunkfrom
fix/1649-generated-app-lint
Jul 31, 2026
Merged

fix: keep generated app linting consistent#1661
kang-heewon merged 3 commits into
trunkfrom
fix/1649-generated-app-lint

Conversation

@kang-heewon

@kang-heewon kang-heewon commented Jul 31, 2026

Copy link
Copy Markdown
Member

Outcome

  • Generated root templates use one self-contained, exactly pinned Biome lint contract instead of repository-only Oxlint plugins.
  • Every generated-app smoke scenario runs lint before build, and smoke preflight rejects missing, mixed, or non-exact template lint contracts.
  • Scoped publish verification now builds both binary packages whenever package binary smoke is selected, preventing clean CI checkouts from packing a missing CLI or create-croco-app dist.
  • Template READMEs document the supported generated-app lint command and rationale.

Verification

  • Current head 10ebcda6b3064a36660155290406ee5b193906db: pnpm check — 24 passed, 1 not applicable, 0 failed.
  • Current head: pre-push workspace gates — 234 test tasks and 233 typecheck tasks passed.
  • Current head: pnpm exec vitest run scripts/tests/verification-manifest.spec.ts scripts/tests/release-spine-evidence.spec.ts --config vitest.config.ts — 37 tests passed.
  • Current head clean-artifact regression: scoped build restored both removed binary dist trees, then pnpm package-bins:smoke passed 5 packages and 5 bins.
  • Generated-app validation before the base-only rebase: all 17 generated scenarios passed lint and smoke; template/e2e and smoke-support suites passed.
  • Targeted Oxlint, Oxfmt, and git diff --check passed.

Review gates

Correctness

  • Claim: every direct generated template has an executable lint contract, every generated smoke scenario runs it before build, and scoped binary smoke has complete build prerequisites.
  • Evidence: template contract negative tests, all 17 generated scenarios, the CLI-only binary prerequisite regression test, and the clean-artifact binary smoke all passed.
  • Verdict: pass.

API, security, and release

  • Claim: no public export or lockfile change is introduced; generated apps receive an exact tool version and the publishable template change has release metadata.
  • Evidence: all five direct templates pin @biomejs/biome to 2.3.12, their biome.json files are identical, and the patch changeset covers create-croco-app.
  • Verdict: pass.

Maintainability

  • Claim: lint validation and CI remediation reuse shared manifest and smoke paths without template-specific exceptions.
  • Evidence: one shared generated lint validation covers 17 scenarios; one scoped build prerequisite covers both known binary roots; independent adversarial re-review has no actionable findings.
  • Verdict: pass.

Residual risk

Binary package discovery is dynamic while scoped prerequisite roots are explicit. A future independent binary package must update the applicability predicate and prerequisite roots together.

Fixes #1649

@coderabbitai

coderabbitai Bot commented Jul 31, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

생성 템플릿에 Biome 2.3.12 기반 lint 설정을 추가했습니다. 모든 생성 템플릿의 lint 계약과 smoke matrix 검증을 통합했습니다. 관련 바이너리 변경의 빌드 manifest 검증도 확장했습니다.

Changes

생성 앱 lint 검증

Layer / File(s) Summary
템플릿 lint 구성
packages/create-croco-app/templates/*/package.json.hbs, packages/create-croco-app/templates/*/biome.json, packages/create-croco-app/templates/*/README.md.hbs
생성 템플릿에 lint 스크립트와 정확히 고정된 @biomejs/biome 버전 2.3.12를 추가했습니다. Biome 설정과 pnpm lint 문서를 추가했습니다.
lint 계약 검사
scripts/create-croco-app-generated-smoke-support.mts, scripts/tests/create-croco-app-generated-smoke.spec.ts, packages/create-croco-app/src/tests/templates-build.spec.ts
템플릿의 lint 스크립트, 설정 파일, 지원 린터, 정확한 의존성 버전을 검사하는 공통 검증과 테스트를 추가했습니다.
smoke matrix lint 실행
scripts/create-croco-app-generated-smoke.mts
모든 smoke case에 공통 lint 검증을 주입하고, smoke 실행 전에 전체 템플릿 lint 계약을 검사하도록 변경했습니다.
바이너리 검증 manifest 연동
scripts/verification-manifest.mts, scripts/tests/verification-manifest.spec.ts, .changeset/verified-generated-app-lint.md
CLI 또는 create-croco-app 변경 시 관련 빌드 필터와 package-bins-smoke 검사를 manifest에 포함하도록 변경했습니다. patch changeset도 추가했습니다.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Sequence Diagram(s)

sequenceDiagram
  participant TemplateAuthor
  participant LintContractValidator
  participant SmokeMatrix
  participant GeneratedApp
  TemplateAuthor->>LintContractValidator: 템플릿 lint 계약 등록
  LintContractValidator->>LintContractValidator: 스크립트, 설정, 버전 검사
  SmokeMatrix->>LintContractValidator: smoke 실행 전 전체 계약 검사
  SmokeMatrix->>GeneratedApp: 각 시나리오에서 lint 실행
  GeneratedApp-->>SmokeMatrix: lint 결과 반환
Loading

Possibly related PRs

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Out of Scope Changes check ⚠️ Warning [1649] 요구 범위를 벗어나 verification manifest의 CLI 및 create-croco-app 빌드 필터와 package-bins smoke 검사를 추가했습니다. verification-manifest 변경을 별도 PR로 분리하거나, 생성 앱 smoke 검증에 필요한 직접적인 근거와 범위를 PR 설명에 추가하십시오.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed [1649] 모든 대상 템플릿에 고정된 Biome lint 구성을 추가하고, 계약 검증과 전체 smoke lint 검증을 구현했습니다.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed 제목은 생성 앱의 lint 구성을 일관되게 표준화하는 변경 사항을 명확하게 요약합니다.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/1649-generated-app-lint

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.

@github-actions

github-actions Bot commented Jul 31, 2026

Copy link
Copy Markdown

📊 Benchmark Results

✅ All benchmarks passed

Benchmark p75 Threshold Baseline vs Baseline Status Notes
CrocoApp constructor 9.2μs 30.0ms 8.2μs +12.6% -
CrocoApp lambdaHandler (10 controllers) 336.4μs 50.0ms 258.4μs +30.2% -
Lambda cold-start simulation 505.0μs 80.0ms 418.1μs +20.8% -
Lambda cold-start with headers 399.9μs 80.0ms 369.7μs +8.2% -
Lambda cold-start with binary body 382.8μs 80.0ms 339.1μs +12.9% -
Lambda cold-start with query params 325.7μs 80.0ms 301.3μs +8.1% -
Lambda cold-start with authorizer context 332.8μs 80.0ms 299.8μs +11.0% -
Lambda cold-start realistic scenario 324.0μs 80.0ms 299.2μs +8.3% -
EventBusConfig.start (10 handlers) 1.6μs 10.0ms 1.4μs +13.3% -
EventPublisher.publishNow single event 1.9μs 2.0ms 1.7μs +11.3% -
DefaultHandlerResolver.resolve × 10 0.1μs 5.0ms 0.1μs -11.2% -
Container.get singleton (cold) 78.0μs 5.0ms 70.3μs +11.1% -
Container.register × 50 components 3.4ms 10.0ms 3.2ms +6.0% -
Container.validate (50 components) 4.0ms 20.0ms 3.4ms +16.9% -
Container.get singleton (warm) 1.7μs 500.0μs 1.6μs +3.7% -
TelemetryRuntime.init (lambda preset) 2.3μs 200.0ms 1.1ms -99.8% -
lambdaPreset config creation 1.5μs 2.0ms 1.4μs +4.3% -

Updated: 2026-07-31T17:26:57.142Z · Commit: e56f0b3

@kang-heewon
kang-heewon force-pushed the fix/1649-generated-app-lint branch from c5d24fb to 040964e Compare July 31, 2026 16:58

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 `@packages/create-croco-app/templates/blank/biome.json`:
- Around line 16-18: Configure JSX quote formatting by adding jsxQuoteStyle set
to single in the formatter configuration of
packages/create-croco-app/templates/blank/biome.json lines 16-18,
packages/create-croco-app/templates/saas/biome.json lines 16-18, and
packages/create-croco-app/templates/ai-saas/biome.json lines 16-18.

In `@scripts/create-croco-app-generated-smoke-support.mts`:
- Around line 72-76: Update the lint-script validation around
isGeneratedLintToolchain so it rejects shell control operators and
failure-masking constructs such as “|| true”, or otherwise validates the
complete command and arguments rather than only the first token; preserve
acceptance of supported lint commands. In
scripts/create-croco-app-generated-smoke-support.mts lines 72-76, implement the
contract check, and in scripts/tests/create-croco-app-generated-smoke.spec.ts
lines 115-144, add a regression test asserting that “biome lint . || true” is
rejected.
🪄 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: 25c86619-3fad-436f-a9d3-5d56e32e31da

📥 Commits

Reviewing files that changed from the base of the PR and between 00bfe50 and 040964e.

📒 Files selected for processing (19)
  • .changeset/verified-generated-app-lint.md
  • packages/create-croco-app/src/tests/templates-build.spec.ts
  • packages/create-croco-app/templates/admin-console/README.md.hbs
  • packages/create-croco-app/templates/admin-console/biome.json
  • packages/create-croco-app/templates/ai-saas/README.md.hbs
  • packages/create-croco-app/templates/ai-saas/biome.json
  • packages/create-croco-app/templates/ai-saas/package.json.hbs
  • packages/create-croco-app/templates/blank/README.md.hbs
  • packages/create-croco-app/templates/blank/biome.json
  • packages/create-croco-app/templates/blank/package.json.hbs
  • packages/create-croco-app/templates/saas/README.md.hbs
  • packages/create-croco-app/templates/saas/biome.json
  • packages/create-croco-app/templates/saas/package.json.hbs
  • packages/create-croco-app/templates/spa-be-split/README.md.hbs
  • scripts/create-croco-app-generated-smoke-support.mts
  • scripts/create-croco-app-generated-smoke.mts
  • scripts/tests/create-croco-app-generated-smoke.spec.ts
  • scripts/tests/verification-manifest.spec.ts
  • scripts/verification-manifest.mts

Comment thread packages/create-croco-app/templates/blank/biome.json
Comment thread scripts/create-croco-app-generated-smoke-support.mts
@kang-heewon

Copy link
Copy Markdown
Member Author

@coderabbitai resolve

@coderabbitai

coderabbitai Bot commented Jul 31, 2026

Copy link
Copy Markdown
✅ Action performed

Comments resolved and changes approved.

@kang-heewon
kang-heewon merged commit f327639 into trunk Jul 31, 2026
12 checks passed
@kang-heewon
kang-heewon deleted the fix/1649-generated-app-lint branch July 31, 2026 18:21
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.

[create-croco-app] Generated app lint setup is inconsistent and mostly unverified

1 participant