Skip to content

fix(release): restack fatal UTF-8 publication evidence on current main - #204

Merged
seonghobae merged 4 commits into
mainfrom
fix/release-publication-fatal-utf8-current-main
Aug 12, 2026
Merged

fix(release): restack fatal UTF-8 publication evidence on current main#204
seonghobae merged 4 commits into
mainfrom
fix/release-publication-fatal-utf8-current-main

Conversation

@seonghobae

@seonghobae seonghobae commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Fresh protected-main test-first successor for #114 / #115 on exact base 6b90ee7be6e9d2da356d2f5ac703af7a2f09ee16. No predecessor checks, reviews, scanner output, model judgment, release evidence, or acquisition evidence transfers.

Current exact head cf0968fae88ab761c7fde38adf9ecdddbf349751 is intentionally test-only RED. The regression injects malformed UTF-8 into an otherwise structurally valid immutable-release policy JSON document and requires publication verification to fail before any receipt is written. Protected scripts/release-publication-receipt.mjs still uses readFileSync(path, "utf8"), so Node replacement decoding should make this new regression fail until the production byte/text boundary is narrowed.

After exact RED proof, apply only the narrow production remedy: read exact JSON bytes and decode with fatal UTF-8 before JSON.parse, preserving existing immutable-release, exact asset-set, digest, attestation, tag/commit/version, output, and acquisition-evidence semantics. Keep Draft until GREEN plus fresh exact-head application CI, reviewer-ci, protected-base eligible central Security Scan, reviews/threads, and live-base identity are reacquired.

Summary by CodeRabbit

  • 버그 수정

    • 잘못된 UTF-8 데이터가 포함된 발행 정보를 처리할 때 원인을 명확히 안내하도록 개선했습니다.
    • 유효하지 않은 데이터가 감지되면 안전하게 작업을 중단하며, 잘못된 영수증 파일이 생성되지 않습니다.
  • 테스트

    • 손상된 UTF-8 데이터가 포함된 발행 정보에 대한 오류 처리 검증을 추가했습니다.

@coderabbitai

coderabbitai Bot commented Aug 12, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

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

Next review available in: 48 minutes

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

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

Plan: Pro Plus

Run ID: ca9541ff-8827-488e-b282-a7f0bae4e5a3

📥 Commits

Reviewing files that changed from the base of the PR and between c8580e2 and 2688cdb.

📒 Files selected for processing (2)
  • scripts/release-publication-receipt.mjs
  • test/immutable-release-publication.test.ts
📝 Walkthrough

Walkthrough

readJson이 JSON 파싱 전에 UTF-8 디코딩 오류를 감지합니다. 잘못된 UTF-8 입력에 대한 receipt 실행 실패와 오류 메시지 및 파일 미생성을 테스트합니다.

Changes

UTF-8 검증

Layer / File(s) Summary
엄격한 디코딩 및 실패 경로 검증
scripts/release-publication-receipt.mjs, test/immutable-release-publication.test.ts
readJson이 fatal UTF-8 디코딩과 JSON 파싱을 분리합니다. 잘못된 UTF-8 바이트가 있으면 라벨이 포함된 오류를 발생시킵니다. 테스트는 실행 실패, UTF-8 오류 출력, receipt 파일 미생성을 검증합니다.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related issues

Possibly related PRs

🚥 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 제목은 publication evidence의 fatal UTF-8 처리 변경을 명확히 설명하며 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 docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/release-publication-fatal-utf8-current-main

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.

@seonghobae
seonghobae marked this pull request as ready for review August 12, 2026 03:07
@seonghobae seonghobae closed this Aug 12, 2026
@seonghobae seonghobae reopened this Aug 12, 2026

@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 `@scripts/release-publication-receipt.mjs`:
- Around line 96-100: Separate file reading from UTF-8 decoding in the
surrounding receipt-loading flow: read the file via readFileSync(path) before
the decoder try/catch, so ENOENT and EACCES propagate as file-read errors. Keep
the `${label} is not valid UTF-8` fail conversion only around
TextDecoder.decode, preserving the existing fatal decoding behavior.

In `@test/immutable-release-publication.test.ts`:
- Line 286: Update the assertion in the immutable release publication test to
directly verify that fixture.outputPath does not exist by asserting
existsSync(fixture.outputPath) is false. Add existsSync to the node:fs import if
needed, and remove the indirect readFileSync throw assertion.
🪄 Autofix

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

Plan: Pro Plus

Run ID: 78682761-ec31-4df0-bab2-893eb8112a9c

📥 Commits

Reviewing files that changed from the base of the PR and between 6b90ee7 and c8580e2.

📒 Files selected for processing (2)
  • scripts/release-publication-receipt.mjs
  • test/immutable-release-publication.test.ts

Comment thread scripts/release-publication-receipt.mjs
Comment thread test/immutable-release-publication.test.ts Outdated
@seonghobae
seonghobae merged commit fd0c4e9 into main Aug 12, 2026
16 checks passed
@seonghobae
seonghobae deleted the fix/release-publication-fatal-utf8-current-main branch August 12, 2026 03:36
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