Repository navigation
Conversation
tt-a1i
marked this pull request as ready for review
October 15, 2026 08:58
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Malformed UTF-8 in setup JSON is replacement-decoded and may be silently rewritten by an unrelated update.
Value
Preserve corrupt original bytes and refuse unsafe configuration writes.
Approach
Decode bytes once at inspectSetupConfig with fatal UTF-8 validation and retain BOM rejection. Preserve the existing diagnostics, runtime defaults, writer lock, mutation/apply and rollback ownership. No new setup choice or parser.
Integrates #714 onto current main. The original fork does not enable maintainer edits, so this companion retains its complete contributor history through a normal merge with fixed main
f98d6a47; the original PR remains open. Frozen local heada2088d1f765e57ad3962be013c121022913ecaa5, tree2bb414d2fe245e069062e4290df67a6d06452021.Validation
Frozen install, typecheck, repository format/lint and diff checks pass. 94 focused tests passed, including invalid ff/overlong/truncated byte admission, zero mutate/apply, real registered setup caller rejection, valid ASCII/CJK/emoji/literal replacement character, unknown fields and exact rollback.
This is a byte-admission invariant; no installed Pi or provider call is needed. An external synthetic integration with #832 passes the corruption and lock/setup tests.
Two independent final source reviews passed on this exact head. Exact frozen-head
bun run checkandbun run testboth exit 0: Node 2,458 passed / 9 skipped / 0 failed; UI 88 files / 1,338 passed. Head/tree/clean guards remain identical before and after. Fresh exact-head remote CI passed all 18 checks; the optional notification was skipped while draft. Independent last-push approval remains required.Impact
User: existing unreadable-config diagnostics block writes. Model: no tools or schema change. Persistence: malformed files stay byte-identical. Runtime: lock, atomic writer and apply/rollback remain current-main owned.