Skip to content

fix: keep release PR metadata synchronized - #1569

Merged
kang-heewon merged 3 commits into
trunkfrom
agent/sync-release-version-metadata
Jul 29, 2026
Merged

fix: keep release PR metadata synchronized#1569
kang-heewon merged 3 commits into
trunkfrom
agent/sync-release-version-metadata

Conversation

@kang-heewon

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

Copy link
Copy Markdown
Member

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-gates
  • pnpm release-version-sync:check
  • pnpm docs:catalog:check
  • pnpm --filter create-croco-app exec vitest run src/tests/croco-ranges.spec.ts
  • Pre-push workspace tests — 232/232 tasks passed
  • Pre-push workspace typecheck — 231/231 tasks passed
  • PR Version Packages #1209 release snapshot — 66 version-derived drift diagnostics before synchronization, zero after synchronization

Review gates

  • Correctness: Changesets versioning completes before manifest normalization, version metadata synchronization, and documentation generation.
  • Reliability: check mode is non-mutating; write mode rejects missing workspace package references and emits deterministic files.
  • Scope: package runtime APIs and published behavior are unchanged; this affects release PR generation and repository verification only.

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

  • 새 기능
    • 자동 릴리스 과정에서 워크스페이스 패키지 버전과 릴리스 메타데이터, 문서 카탈로그/인증 정보가 최신 상태로 동기화되도록 개선했습니다.
    • 릴리즈 검증(게이트) 범위에 동기화 관련 항목을 추가했습니다.
  • 버그 수정
    • 버전/범위/카탈로그 정보 불일치 드리프트를 감지해 체크 모드에서 실패 처리 및 진단을 제공합니다.
  • 테스트
    • 동기화 결과, 체크/쓰기 동작, 오류 상황 및 실행 순서를 검증하는 통합 테스트를 추가/확대했습니다.

@coderabbitai

coderabbitai Bot commented Jul 27, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@kang-heewon, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 7 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 07889387-6164-46e1-97ee-39bffead54ff

📥 Commits

Reviewing files that changed from the base of the PR and between fc4a3b6 and 068a7b0.

📒 Files selected for processing (2)
  • scripts/release-version-sync.mts
  • scripts/tests/release-version-sync.spec.ts
📝 Walkthrough

Walkthrough

워크스페이스 패키지 버전을 Croco 호환성 범위와 문서 카탈로그에 동기화하는 스크립트를 추가하고, Changesets 릴리스 순서와 검증·릴리스 게이트 인벤토리에 연결했습니다. check/write 동작과 오류 처리를 검증하는 테스트도 추가했습니다.

Changes

릴리스 버전 동기화

Layer / File(s) Summary
동기화 엔진
scripts/release-version-sync.mts
워크스페이스 패키지 버전을 수집해 Croco 범위와 certification.records를 검사하거나 갱신하며, 잘못된 옵션·파일·JSON·구조와 누락된 패키지를 오류로 처리합니다.
릴리스 실행 순서
scripts/version-packages.mts, package.json, .changeset/automatic-release-metadata.md
Changesets 적용, 매니페스트 정규화, 버전 동기화, 카탈로그 생성을 순차 실행하는 스크립트와 관련 명령을 구성합니다.
검증 및 릴리스 게이트 연결
scripts/verification-manifest.mts, scripts/verification-policy.mts, scripts/release-gate-maintenance.mts
새 동기화 명령과 엔트리포인트·지원 스크립트·테스트를 검증 정책과 릴리스 게이트 경로에 등록합니다.
동기화 테스트 및 인벤토리 검증
scripts/tests/release-version-sync.spec.ts, scripts/tests/verification-manifest.spec.ts
check/write 결과, 파일 변경 여부, 오류 처리, 실행 순서 및 검증 인벤토리 변경을 테스트합니다.

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 실행
Loading

Possibly related PRs

  • croco-dev/framework#1291: Croco 범위와 생성 버전 메타데이터를 다루는 변경으로, 이번 동기화 대상과 직접 연결됩니다.
  • croco-dev/framework#1411: 검증 정책과 매니페스트에 검증 명령을 등록하는 구조가 이번 변경과 연결됩니다.
  • croco-dev/framework#1438: 릴리스 게이트 유지보수 경로에 새 동기화 관련 경로를 등록하는 변경과 연결됩니다.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed 제목이 릴리스 PR 메타데이터 동기화라는 핵심 변경점을 간결하게 잘 요약합니다.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch agent/sync-release-version-metadata

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 27, 2026

Copy link
Copy Markdown

📊 Benchmark Results

✅ All benchmarks passed

Benchmark p75 Threshold Baseline vs Baseline Status Notes
CrocoApp constructor 9.6μs 30.0ms 8.2μs +17.2% -
CrocoApp lambdaHandler (10 controllers) 286.7μs 50.0ms 258.4μs +10.9% -
Lambda cold-start simulation 459.8μs 80.0ms 418.1μs +10.0% -
Lambda cold-start with headers 403.2μs 80.0ms 369.7μs +9.1% -
Lambda cold-start with binary body 379.2μs 80.0ms 339.1μs +11.8% -
Lambda cold-start with query params 312.0μs 80.0ms 301.3μs +3.5% -
Lambda cold-start with authorizer context 299.8μs 80.0ms 299.8μs -0.0% -
Lambda cold-start realistic scenario 297.3μs 80.0ms 299.2μs -0.6% -
EventBusConfig.start (10 handlers) 2.0μs 10.0ms 1.4μs +39.8% -
EventPublisher.publishNow single event 2.1μs 2.0ms 1.7μs +26.1% -
DefaultHandlerResolver.resolve × 10 0.1μs 5.0ms 0.1μs +12.5% -
Container.get singleton (cold) 62.4μs 5.0ms 70.3μs -11.2% -
Container.register × 50 components 3.3ms 10.0ms 3.2ms +1.3% -
Container.validate (50 components) 3.7ms 20.0ms 3.4ms +9.5% -
Container.get singleton (warm) 1.7μs 500.0μs 1.6μs +1.2% -
TelemetryRuntime.init (lambda preset) 2.4μs 200.0ms 1.1ms -99.8% -
lambdaPreset config creation 1.4μs 2.0ms 1.4μs +0.7% -

Updated: 2026-07-28T05:57:00.137Z · Commit: 8411e08

@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: 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

📥 Commits

Reviewing files that changed from the base of the PR and between 425fbc3 and f1d6c60.

📒 Files selected for processing (9)
  • .changeset/automatic-release-metadata.md
  • package.json
  • scripts/release-gate-maintenance.mts
  • scripts/release-version-sync.mts
  • scripts/tests/release-version-sync.spec.ts
  • scripts/tests/verification-manifest.spec.ts
  • scripts/verification-manifest.mts
  • scripts/verification-policy.mts
  • scripts/version-packages.mts

Comment thread scripts/release-version-sync.mts
Comment thread scripts/release-version-sync.mts
Comment thread scripts/version-packages.mts Outdated

@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: 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

📥 Commits

Reviewing files that changed from the base of the PR and between f1d6c60 and fc4a3b6.

📒 Files selected for processing (3)
  • scripts/release-version-sync.mts
  • scripts/tests/release-version-sync.spec.ts
  • scripts/version-packages.mts

Comment thread scripts/release-version-sync.mts
Comment thread scripts/release-version-sync.mts
Comment thread scripts/release-version-sync.mts
@kang-heewon
kang-heewon merged commit 5ffdc0d into trunk Jul 29, 2026
11 checks passed
@kang-heewon
kang-heewon deleted the agent/sync-release-version-metadata branch July 29, 2026 06:05
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.

1 participant