[PR #4434] [CLOSED] fix(native): retain valid Swift vtables beside empty class names #6240

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

📋 Pull Request Information

Original PR: https://github.com/morluto/rea/pull/4434
Author: @xiaofeilovecoding
Created: 10/16/2026
Status: ❌ Closed

Base: main ← Head: fix/swift-vtable-empty-owner-4369


📝 Commits (1)

  • 6952860 fix(native): retain valid Swift vtables beside empty class names

📊 Changes

2 files changed (+125 additions, -0 deletions)

View changed files

📝 src/native/AppleDispatchMetadata.test.ts (+123 -0)
📝 src/native/AppleSwiftVtables.ts (+2 -0)

📄 Description

Summary

Fixes #4369. Retain valid Swift vtable records when a sibling class has an empty name.

Problem and expected behavior

An empty owner reaches final result validation and aborts the whole metadata decode. The malformed descriptor should produce located partial coverage while valid siblings remain available.

Change and scope

Validate the owner in the class-vtable producer, inside its existing per-descriptor recovery boundary, following the Objective-C class/protocol pattern.

Contract and boundary impact

  • Semantic owner: Swift class-vtable decoding.
  • Scope decision: not applicable to this routine fix within existing static analysis.
  • CLI/MCP and catalog: schemas unchanged; the decoder preserves partial results.
  • Format/platform: existing Mach-O support and host requirements.
  • Evidence/provenance: retain valid records and the malformed descriptor's location.
  • Target/authority/cleanup: existing static byte parsing; no added execution, mutation or network effects.
  • Generated metadata/package/installation: no changes.

Evidence and regression coverage

On the unchanged base, both empty-name positions throw ZodError; 2 of 48 tests fail. After the fix, valid siblings survive with partial coverage. Controls cover valid names, unmapped names and the shared record budget.

Validation performed

  • Focused AppleDispatchMetadata, AppleSwiftVtables and objcSwiftMetadata tests: 53 passed.
  • npm run check:fast: passed.
  • npm run check: passed, including compilation and architecture guards; lint reports warnings, no errors.
  • npm run verify:test-discovery: all 1415 files discovered once.

Windows x64, Node 24.18.0/npm 11.16.0. The matching 6.5.0 packaged Windows artifact was restored using the documented method before the complete check.

Compatibility, safety, and release

Synthetic Mach-O bytes exercised the production decoder. Public CLI/MCP, real macOS artifacts and Hopper/Ghidra were not run. Real-artifact frequency remains unknown. Valid names retain their original spelling; schemas and release metadata are unchanged.

Author readiness

Human owner: @xiaofeilovecoding

  • 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

Required CI checks remain pending.


🔄 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/4434 **Author:** [@xiaofeilovecoding](https://github.com/xiaofeilovecoding) **Created:** 10/16/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `fix/swift-vtable-empty-owner-4369` --- ### 📝 Commits (1) - [`6952860`](https://github.com/morluto/rea/commit/69528606477e09ce7e1b29c9fcc9f9cc3c041cff) fix(native): retain valid Swift vtables beside empty class names ### 📊 Changes **2 files changed** (+125 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `src/native/AppleDispatchMetadata.test.ts` (+123 -0) 📝 `src/native/AppleSwiftVtables.ts` (+2 -0) </details> ### 📄 Description ## Summary Fixes #4369. Retain valid Swift vtable records when a sibling class has an empty name. ## Problem and expected behavior An empty owner reaches final result validation and aborts the whole metadata decode. The malformed descriptor should produce located partial coverage while valid siblings remain available. ## Change and scope Validate the owner in the class-vtable producer, inside its existing per-descriptor recovery boundary, following the Objective-C class/protocol pattern. ## Contract and boundary impact - Semantic owner: Swift class-vtable decoding. - Scope decision: not applicable to this routine fix within existing static analysis. - CLI/MCP and catalog: schemas unchanged; the decoder preserves partial results. - Format/platform: existing Mach-O support and host requirements. - Evidence/provenance: retain valid records and the malformed descriptor's location. - Target/authority/cleanup: existing static byte parsing; no added execution, mutation or network effects. - Generated metadata/package/installation: no changes. ## Evidence and regression coverage On the unchanged base, both empty-name positions throw `ZodError`; 2 of 48 tests fail. After the fix, valid siblings survive with partial coverage. Controls cover valid names, unmapped names and the shared record budget. ## Validation performed - Focused `AppleDispatchMetadata`, `AppleSwiftVtables` and `objcSwiftMetadata` tests: 53 passed. - `npm run check:fast`: passed. - `npm run check`: passed, including compilation and architecture guards; lint reports warnings, no errors. - `npm run verify:test-discovery`: all 1415 files discovered once. Windows x64, Node 24.18.0/npm 11.16.0. The matching 6.5.0 packaged Windows artifact was restored using the documented method before the complete check. ## Compatibility, safety, and release Synthetic Mach-O bytes exercised the production decoder. Public CLI/MCP, real macOS artifacts and Hopper/Ghidra were not run. Real-artifact frequency remains unknown. Valid names retain their original spelling; schemas and release metadata are unchanged. ## Author readiness Human owner: @xiaofeilovecoding - [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. ## Before merge Required CI checks remain pending. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-31 01:12:57 +00:00
bsakaguchi changed title from [PR #4434] [CLOSED] fix(native): retain valid Swift vtables beside empty class names to [PR #4434] fix(native): retain valid Swift vtables beside empty class names 2026-11-03 13:32:23 +00:00
bsakaguchi changed title from [PR #4434] fix(native): retain valid Swift vtables beside empty class names to [PR #4434] [CLOSED] fix(native): retain valid Swift vtables beside empty class names 2026-11-03 14:34:06 +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#6240
No description provided.