[PR #3424] test(native): retain per-ivar alignment facts in mixed lists #5735

Open
opened 2026-10-31 01:09:02 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/morluto/rea/pull/3424
Author: @fengqiaoqu
Created: 10/14/2026
Status: 🔄 Open

Base: main ← Head: codex/issue-3186-ivar-alignment-sentinel


📝 Commits (2)

  • 0487012 fix(apple): decode the ivar WORD_ALIGN sentinel as 8-byte alignment
  • 31e4a4c test(native): retain mixed ivar alignment coverage

📊 Changes

1 file changed (+30 additions, -0 deletions)

View changed files

📝 src/native/AppleDispatchMetadata.test.ts (+30 -0)

📄 Description

Summary

Retain per-record Objective-C ivar alignment coverage for a single list containing an ordinary exponent (0), the WORD_ALIGN sentinel (0xffffffff), and an invalid non-sentinel (0xfffffffe). Expected alignments are respectively 1, 8, and null, with each record's offset and size preserved.

The runtime fix for #3186 already landed independently in main as 74afb04f. This PR now uses that implementation unchanged and keeps main's single-record parameterized tests. Its remaining diff is only the mixed-list regression, which catches accidentally reusing one ivar's raw alignment for sibling records. The obsolete duplicate decoder helper has been removed while resolving the main-branch conflict.

Validation

  • npm run test:focused -- src/native/AppleDispatchMetadata.test.ts — 37 passed.
  • npm run check — passed: compile, typecheck, formatting, lint, module boundaries, knip, metadata, and architecture guards. Lint reports existing warnings and zero errors.
  • Negative control: temporarily read every ivar's alignment from the first list entry. The mixed-list test failed on the sentinel and invalid records; restoring the production source made it pass. Temporary mutations were fully restored.
  • Coverage uses synthetic 64-bit Mach-O metadata on Windows (Node v24.18.0, npm 11.16.0). No real macOS provider run or compiler occurrence-frequency claim.

Related: #3186. No runtime behavior, CLI/MCP schema, package metadata, target authority, or cleanup changes remain in this PR.

Author readiness

Human owner: @fengqiaoqu

  • 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.

🔄 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/3424 **Author:** [@fengqiaoqu](https://github.com/fengqiaoqu) **Created:** 10/14/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `codex/issue-3186-ivar-alignment-sentinel` --- ### 📝 Commits (2) - [`0487012`](https://github.com/morluto/rea/commit/04870123aee097acbb53774425c80fb4ec6d77a7) fix(apple): decode the ivar WORD_ALIGN sentinel as 8-byte alignment - [`31e4a4c`](https://github.com/morluto/rea/commit/31e4a4c669603b5e18d4add6eff3deb65ebeeaec) test(native): retain mixed ivar alignment coverage ### 📊 Changes **1 file changed** (+30 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `src/native/AppleDispatchMetadata.test.ts` (+30 -0) </details> ### 📄 Description ## Summary Retain per-record Objective-C ivar alignment coverage for a single list containing an ordinary exponent (`0`), the `WORD_ALIGN` sentinel (`0xffffffff`), and an invalid non-sentinel (`0xfffffffe`). Expected alignments are respectively `1`, `8`, and `null`, with each record's offset and size preserved. The runtime fix for #3186 already landed independently in main as 74afb04f. This PR now uses that implementation unchanged and keeps main's single-record parameterized tests. Its remaining diff is only the mixed-list regression, which catches accidentally reusing one ivar's raw alignment for sibling records. The obsolete duplicate decoder helper has been removed while resolving the main-branch conflict. ## Validation - `npm run test:focused -- src/native/AppleDispatchMetadata.test.ts` — 37 passed. - `npm run check` — passed: compile, typecheck, formatting, lint, module boundaries, knip, metadata, and architecture guards. Lint reports existing warnings and zero errors. - Negative control: temporarily read every ivar's alignment from the first list entry. The mixed-list test failed on the sentinel and invalid records; restoring the production source made it pass. Temporary mutations were fully restored. - Coverage uses synthetic 64-bit Mach-O metadata on Windows (Node v24.18.0, npm 11.16.0). No real macOS provider run or compiler occurrence-frequency claim. Related: #3186. No runtime behavior, CLI/MCP schema, package metadata, target authority, or cleanup changes remain in this PR. ## Author readiness Human owner: @fengqiaoqu - [x] 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. - [x] I checked the evidence above, confirmed it supports the current change, and recorded meaningful validation gaps. - [x] I declare this PR ready for initial maintainer review. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
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#5735
No description provided.