fix(release): restack fatal UTF-8 publication evidence on current main - #204
Conversation
|
Warning Review limit reached
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 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: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthrough
ChangesUTF-8 검증
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related issues
Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 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 |
There was a problem hiding this comment.
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
📒 Files selected for processing (2)
scripts/release-publication-receipt.mjstest/immutable-release-publication.test.ts
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
cf0968fae88ab761c7fde38adf9ecdddbf349751is 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. Protectedscripts/release-publication-receipt.mjsstill usesreadFileSync(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
버그 수정
테스트