[PR #4116] [MERGED] fix(kuna): keep the real lane's wide-string marker independent of layout #6066

Closed
opened 2026-10-31 01:11:36 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/morluto/rea/pull/4116
Author: @kaoru0822-kitauji
Created: 10/15/2026
Status: ✅ Merged
Merged: 10/15/2026
Merged by: @kaoru0822-kitauji

Base: main ← Head: fix/kuna-lane-wide-marker-layout


📝 Commits (1)

  • d318b52 fix(kuna): keep the real lane's wide-string marker independent of layout

📊 Changes

1 file changed (+4 additions, -1 deletions)

View changed files

📝 scripts/verify-real-kuna.mjs (+4 -1)

📄 Description

Summary

npm run verify:kuna fails 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 e598b4656, real Kuna 1.833, macOS arm64:

$ REA_KUNA_COMMAND=… node scripts/verify-real-kuna.mjs
AssertionError: Required string "REA wide marker" was not recovered   (exit 1)

Root cause, with the fixture compiled by cc -O1: the UTF-8 marker occupies 0x100000598–0x1000005b9, NUL included, and the UTF-16 array starts at 0x1000005ba. kuna strings --json --encoding all reports:

0x100000598 utf8  "_φ( °-°)/ REA unicode marker"
0x1000005b8 utf16 "rREA wide marker"       ← starts at the bytes 72 00 of the UTF-8 marker's tail

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 reports 0x1000005bc 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

  • Semantic owner and earliest changed stage: the real-lane fixture source in scripts/verify-real-kuna.mjs.
  • Contribution scope fit and linked maintainer decision: not applicable.
  • CLI and MCP/tool-catalog contract: unchanged.
  • Provider, bridge, target-format, or platform compatibility: makes the lane pass on macOS arm64.
  • Evidence, artifact, provenance, or reconstruction contract: unchanged.
  • Target selection, authority, upstream behavior, and cleanup details: none.
  • Generated metadata, package, or installation impact: none.

Expected effects:

  • Read existing files or captured data.
  • Launch or attach to a process.
  • Inject instrumentation or run scripts/code.
  • Change process memory, registers, files, or configuration.
  • Contact network services.
  • Recover protected code or work around protections.
  • Documentation or usability only; no target interaction.
  • Not sure yet; investigation or maintainer guidance needed.

(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:kuna passed 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.mjs on main: exit 1, "Required string "REA wide marker" was not recovered".
  • The same with this change: passed, twice.
  • kuna strings --json --encoding all on 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

  • Breaking changes or migration steps: none.
  • Real Hopper/Ghidra, browser, or OS coverage: real Kuna on macOS arm64.
  • Package or release metadata impact: none.
  • Security, privacy, process, or containment review: none.

Author readiness

Human owner:

  • I reviewed the final diff and relevant existing code, understand the change and its edge cases, and take responsibility for the complete PR, including AI-assisted work.
  • I checked the evidence above, confirmed it supports the current change, and recorded meaningful validation gaps.
  • I declare this PR ready for initial maintainer review.

Before merge

  • This PR addresses a concrete problem or an agreed enhancement.
  • Material scope and authority questions are resolved, and any required maintainer scope decision covers the final diff.
  • The PR has one focused outcome and the title follows type(scope): outcome.
  • Related issue is linked, or the reason for not linking one is stated above.
  • Tests cover changed observable behavior and meaningful failure paths.
  • Owning docs, contracts, and generated metadata are updated where needed.
  • User-visible CLI/MCP changes include representative output.
  • I checked the final diff for secrets, unrelated cleanup, and unsupported claims.

🤖 Generated with Claude Code


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/morluto/rea/pull/4116 **Author:** [@kaoru0822-kitauji](https://github.com/kaoru0822-kitauji) **Created:** 10/15/2026 **Status:** ✅ Merged **Merged:** 10/15/2026 **Merged by:** [@kaoru0822-kitauji](https://github.com/kaoru0822-kitauji) **Base:** `main` ← **Head:** `fix/kuna-lane-wide-marker-layout` --- ### 📝 Commits (1) - [`d318b52`](https://github.com/morluto/rea/commit/d318b5221247abe7cf8881c418efefedf229101e) fix(kuna): keep the real lane's wide-string marker independent of layout ### 📊 Changes **1 file changed** (+4 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `scripts/verify-real-kuna.mjs` (+4 -1) </details> ### 📄 Description ## Summary `npm run verify:kuna` fails 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 e598b4656, real Kuna 1.833, macOS arm64: ``` $ REA_KUNA_COMMAND=… node scripts/verify-real-kuna.mjs AssertionError: Required string "REA wide marker" was not recovered (exit 1) ``` Root cause, with the fixture compiled by `cc -O1`: the UTF-8 marker occupies `0x100000598–0x1000005b9`, NUL included, and the UTF-16 array starts at `0x1000005ba`. `kuna strings --json --encoding all` reports: ``` 0x100000598 utf8 "_φ( °-°)/ REA unicode marker" 0x1000005b8 utf16 "rREA wide marker" ← starts at the bytes 72 00 of the UTF-8 marker's tail ``` 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 reports `0x1000005bc 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 - Semantic owner and earliest changed stage: the real-lane fixture source in `scripts/verify-real-kuna.mjs`. - Contribution scope fit and linked maintainer decision: not applicable. - CLI and MCP/tool-catalog contract: unchanged. - Provider, bridge, target-format, or platform compatibility: makes the lane pass on macOS arm64. - Evidence, artifact, provenance, or reconstruction contract: unchanged. - Target selection, authority, upstream behavior, and cleanup details: none. - Generated metadata, package, or installation impact: none. Expected effects: - [ ] Read existing files or captured data. - [ ] Launch or attach to a process. - [ ] Inject instrumentation or run scripts/code. - [ ] Change process memory, registers, files, or configuration. - [ ] Contact network services. - [ ] Recover protected code or work around protections. - [x] Documentation or usability only; no target interaction. - [ ] Not sure yet; investigation or maintainer guidance needed. (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:kuna` passed 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. - [x] Observed, derived, and inferred claims remain distinguishable. - [x] Artifact identity, source provenance, and failed attempts remain preserved. - [x] Unsupported, incomplete, unavailable, or uncertain outcomes remain visible. ## Validation performed - `REA_KUNA_COMMAND=… node scripts/verify-real-kuna.mjs` on main: exit 1, "Required string \"REA wide marker\" was not recovered". - The same with this change: passed, twice. - `kuna strings --json --encoding all` on 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 - Breaking changes or migration steps: none. - Real Hopper/Ghidra, browser, or OS coverage: real Kuna on macOS arm64. - Package or release metadata impact: none. - Security, privacy, process, or containment review: none. ## Author readiness Human owner: <!-- @GitHub-handle --> - [ ] I reviewed the final diff and relevant existing code, understand the change and its edge cases, and take responsibility for the complete PR, including AI-assisted work. - [ ] I checked the evidence above, confirmed it supports the current change, and recorded meaningful validation gaps. - [ ] I declare this PR ready for initial maintainer review. ## Before merge - [ ] This PR addresses a concrete problem or an agreed enhancement. - [ ] Material scope and authority questions are resolved, and any required maintainer scope decision covers the final diff. - [ ] The PR has one focused outcome and the title follows `type(scope): outcome`. - [ ] Related issue is linked, or the reason for not linking one is stated above. - [ ] Tests cover changed observable behavior and meaningful failure paths. - [ ] Owning docs, contracts, and generated metadata are updated where needed. - [ ] User-visible CLI/MCP changes include representative output. - [ ] I checked the final diff for secrets, unrelated cleanup, and unsupported claims. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-31 01:11:36 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
morluto/rea#6066
No description provided.