fix: keep release PR metadata synchronized - #1569
Conversation
|
Warning Review limit reached
Next review available in: 7 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)
📝 WalkthroughWalkthrough워크스페이스 패키지 버전을 Croco 호환성 범위와 문서 카탈로그에 동기화하는 스크립트를 추가하고, Changesets 릴리스 순서와 검증·릴리스 게이트 인벤토리에 연결했습니다. check/write 동작과 오류 처리를 검증하는 테스트도 추가했습니다. Changes릴리스 버전 동기화
Estimated code review effort: 4 (Complex) | ~45 minutes Sequence Diagram(s)sequenceDiagram
participant Changesets
participant VersionPackages as version-packages.mts
participant Sync as release-version-sync.mts
participant Catalog as docs:catalog:write
Changesets->>VersionPackages: 버전 적용
VersionPackages->>VersionPackages: package-manifests:write 실행
VersionPackages->>Sync: release-version-sync:write 실행
Sync->>Sync: Croco 범위와 인증 레코드 동기화
VersionPackages->>Catalog: docs:catalog:write 실행
Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 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-28T05:57:00.137Z · Commit: 8411e08 |
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 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/release-version-sync.mts`:
- Around line 69-263: Update release-version-sync.mts to use VerificationProblem
from scripts/verification-problem.mts instead of generic Error for argument,
file, JSON, and validation failures in parseArgs, readWorkspacePackageVersions,
synchronizeCrocoRanges, synchronizeCertificationVersions, readRequiredFile,
readJsonFile, and requireObject. Assign each failure an appropriate
code/category/message, and update the top-level error handling to format caught
problems with formatVerificationProblem(error) before output.
- Around line 141-183: Update the range-processing logic around
crocoRangeLinePattern to separately detect lines containing `@croco/` package
references that fail to match, count them, and throw an error when any are
found. Keep the existing rangeCount validation and successful rewrite/drift
behavior unchanged, ensuring nonstandard or commented Croco entries cannot pass
through silently.
In `@scripts/version-packages.mts`:
- Around line 15-16: Update the release-version-sync step in the versioning flow
to invoke the package.json script release-version-sync:write through
pnpmExecutable instead of calling nodeExecutable with hardcoded flags. Also
update the metadataIndex expectation in release-version-sync.spec.ts to match
the pnpm-based command.
🪄 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: d588c44b-9bde-4cfe-a2c9-b6bae2d01a79
📒 Files selected for processing (9)
.changeset/automatic-release-metadata.mdpackage.jsonscripts/release-gate-maintenance.mtsscripts/release-version-sync.mtsscripts/tests/release-version-sync.spec.tsscripts/tests/verification-manifest.spec.tsscripts/verification-manifest.mtsscripts/verification-policy.mtsscripts/version-packages.mts
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 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/release-version-sync.mts`:
- Line 8: Apply Biome’s single-quote formatting to the added import and string
literals: update the import in scripts/release-version-sync.mts lines 8-8, the
import path in scripts/version-packages.mts lines 4-4, and the added script
arguments in scripts/version-packages.mts lines 28-29.
- Around line 88-99: Update the --root argument handling in the argument-parsing
loop around rootDir and args[index + 1] so values beginning with "-" are
rejected immediately as missing/invalid paths, including when the next token is
another option such as --write. Preserve normal path resolution for valid
non-option values.
- Around line 180-186: Restrict crocoRangeLinePattern matching and rangeCount
updates to lines inside the managed declaration block tracked by
insideRangeDeclaration. Ensure identical `@croco/`* entries outside that block are
returned unchanged and excluded from unmatchedRangeLines and validation counts,
while still reporting unmatched entries within the managed block.
🪄 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: aa706c61-620b-462f-9497-d58fca11fb48
📒 Files selected for processing (3)
scripts/release-version-sync.mtsscripts/tests/release-version-sync.spec.tsscripts/version-packages.mts
Outcome
Automated Changesets release pull requests now regenerate version-derived Croco metadata after package versions change. The version step normalizes package manifests, synchronizes generated application compatibility ranges and certification package versions, and then regenerates the package documentation catalog before the release PR is updated.
Repository verification now checks this metadata directly with a read-only, deterministic gate, so stale release metadata fails with focused diagnostics before downstream package tests and promotion reports cascade.
Verification
pnpm test:release-gatespnpm release-version-sync:checkpnpm docs:catalog:checkpnpm --filter create-croco-app exec vitest run src/tests/croco-ranges.spec.tsReview gates
Residual risk
The synchronizer owns the two current version-derived sources: create-croco-app compatibility ranges and certification package versions. Future version-derived metadata must be added to the same explicit synchronization contract.
Summary by CodeRabbit