Repository navigation
fix(kuna): keep the real lane's wide-string marker independent of layout - #4116
Merged
Merged
Conversation
On macOS arm64 the lane's UTF-8 marker ends right before the UTF-16 array, and its last byte plus NUL decode as the UTF-16LE unit 'r'. Kuna therefore reports "rREA wide marker", and the lane, which requires the exact text, failed with "Required string \"REA wide marker\" was not recovered". A leading NUL unit now ends any run the preceding bytes start, so the marker is recovered exactly on any layout. Refs #1957 Co-Authored-By: Claude Opus 5.5 <[email protected]>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
4 of 22 tasks
Contributor
[Low impact] The fixture-only change appears safe to merge. SummaryAdds a leading NUL to the real Kuna fixture’s UTF-16 marker so preceding bytes cannot become part of the expected string.
Reviews (1) · Last reviewed commit: "fix(kuna): keep the real lane's wide-str..." · Reviewed by Greptile |
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.
Summary
npm run verify:kunafails on macOS arm64 since the string feature (#4095), which was verified on Linux only ("No macOS/Windows … runtime claims"). The lane's fixture places a UTF-8 marker right before a UTF-16LE array. That marker's last byte (r) and its NUL decode as a valid UTF-16LE unit, so Kuna reports the wide run as"rREA wide marker". The lane requires the exact"REA wide marker". Refs #1957.Problem and expected behavior
On main e598b46, real Kuna 1.833, macOS arm64:
Root cause, with the fixture compiled by
cc -O1: the UTF-8 marker occupies0x100000598–0x1000005b9, NUL included, and the UTF-16 array starts at0x1000005ba.kuna strings --json --encoding allreports:Kuna's reading is valid for these bytes, so this is not a Kuna bug. REA's answer reports Kuna's observation as-is, as it should. The fixture's layout determines whether the exact marker can be recovered at all: on the Linux layout something else preceded the array.
Change and scope
The fixture's UTF-16 array starts with a NUL unit (
{0,'R','E','A',…,0}), with a comment saying why. Whatever bytes precede it now end at that NUL, and the marker is recovered exactly on any layout. With the same compiler, Kuna reports0x1000005bc utf16 "REA wide marker". No product code changes.Scope: test-lane fix within the existing Kuna provider boundary; no maintainer scope decision applies.
Contract and boundary impact
scripts/verify-real-kuna.mjs.Expected effects:
(Test fixture only.)
Evidence and regression coverage
Tests added or updated: the real lane is the coverage.
kunaVerifier.test.ts(9 tests) still passes.Base reproduction: the lane exits 1 on main with the assertion above (observed twice).
After the fix:
verify:kunapassed twice on macOS arm64 with real Kuna 1.833,status: "passed",cleanup: "complete".Remaining proof gaps: not re-run on Linux. The change only adds a leading NUL unit, which cannot form part of a printable run; Linux behavior is source-derived.
Observed, derived, and inferred claims remain distinguishable.
Artifact identity, source provenance, and failed attempts remain preserved.
Unsupported, incomplete, unavailable, or uncertain outcomes remain visible.
Validation performed
REA_KUNA_COMMAND=… node scripts/verify-real-kuna.mjson main: exit 1, "Required string "REA wide marker" was not recovered".kuna strings --json --encoding allon the fixture before and after, as quoted above.npm run test:focused -- tests/boundary/providers/kuna/kunaVerifier.test.ts: 9 passed.npm run check:fast: typecheck and lint passed.npm run docs:check: passed.Compatibility, safety, and release
Author readiness
Human owner:
Before merge
type(scope): outcome.🤖 Generated with Claude Code