[PR #4543] [CLOSED] fix(native): preserve class metadata beside malformed Objective-C ivars #6295

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

📋 Pull Request Information

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

Base: main ← Head: fix/objc-empty-ivar-4533


📝 Commits (4)

  • 85b783c fix(native): reject empty Objective-C ivar names during recovery
  • ac0c573 fix(native): recover malformed ivars without skipping class facets
  • d513658 test(firmware): assert composed cleanup failure contracts
  • b64439d Merge upstream main and retain per-ivar recovery

📊 Changes

2 files changed (+157 additions, -34 deletions)

View changed files

📝 src/native/AppleDispatchMetadata.test.ts (+111 -1)
📝 src/native/AppleObjcDispatchFacets.ts (+46 -33)

📄 Description

Summary

Refs #4533.

Upstream a70c42e now rejects empty Objective-C ivar names before schema validation. This PR retains the remaining entry-level recovery fix: a malformed ivar must not discard the containing class, later valid ivars, or independent methods, properties and protocols.

Change and scope

Each fixed-stride ivar has its own recovery boundary. Empty, unmapped and invalid-UTF-8 names produce partial coverage with the entry address and class name. Budget admission remains outside that boundary and declared counts are preserved.

Merged main f22e8e7, retaining its class/category/protocol identity guards. Updated its empty-ivar regression to expect the valid containing class to survive. The earlier firmware-test repair is superseded by upstream 5eaef92; the firmware integration file now exactly matches main, including cleanup ownership and retry assertions.

Contract and boundary impact

  • Owner: Objective-C ivar decoding in AppleObjcDispatchFacets.
  • CLI/MCP schemas, tool catalog, installation and generated metadata: unchanged.
  • Valid ivars and independent class facets remain available after one malformed entry.
  • No target execution, network access, or new cleanup ownership.

Expected effects:

  • Read existing files or captured data.

Evidence and validation

Linux cloud checkout, Node 24.18.0 / npm 11.16.0:

  • Latest upstream decoder with the final regressions: 6 failed, 51 passed. Failures cover malformed-name class retention and budget behavior.
  • npm run test:focused -- src/native/AppleDispatchMetadata.test.ts src/domain/native/objcSwiftMetadata.test.ts tests/boundary/cli/nativeDispatchPropertyAttributes.test.ts tests/boundary/firmware/firmwareIntegration.test.ts: 95 passed, 9 Darwin-only CLI cases skipped.
  • npm run check: passed, including architecture guards.
  • git diff --check and git diff --cached --check: passed.
  • Independent code review found no blocking issue.

Compatibility and limits

Tests use synthetic Mach-O bytes. Local validation did not run a real macOS provider. Remote CI for head b64439d67b passed: https://github.com/morluto/rea/actions/runs/38960334958. The PR title check also passed.

Author readiness

Human owner: @maxazure

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

The human owner confirmed review of the updated diff and validation results at b64439d, including responsibility for the AI-assisted work and readiness for maintainer review: https://github.com/morluto/rea/pull/4543#pullrequestreview-5553335152.


🔄 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/4543 **Author:** [@maxazure](https://github.com/maxazure) **Created:** 10/16/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `fix/objc-empty-ivar-4533` --- ### 📝 Commits (4) - [`85b783c`](https://github.com/morluto/rea/commit/85b783c854e1e8ab7ca3cc5d2614c54bef7bb841) fix(native): reject empty Objective-C ivar names during recovery - [`ac0c573`](https://github.com/morluto/rea/commit/ac0c57332e42c7fc203c6bf0e2d3c52b47188b52) fix(native): recover malformed ivars without skipping class facets - [`d513658`](https://github.com/morluto/rea/commit/d513658560537e5e6a462edb4774c849031f51e7) test(firmware): assert composed cleanup failure contracts - [`b64439d`](https://github.com/morluto/rea/commit/b64439d67bf53628f6ebafe716a6218f9042ff0f) Merge upstream main and retain per-ivar recovery ### 📊 Changes **2 files changed** (+157 additions, -34 deletions) <details> <summary>View changed files</summary> 📝 `src/native/AppleDispatchMetadata.test.ts` (+111 -1) 📝 `src/native/AppleObjcDispatchFacets.ts` (+46 -33) </details> ### 📄 Description ## Summary Refs #4533. Upstream a70c42e now rejects empty Objective-C ivar names before schema validation. This PR retains the remaining entry-level recovery fix: a malformed ivar must not discard the containing class, later valid ivars, or independent methods, properties and protocols. ## Change and scope Each fixed-stride ivar has its own recovery boundary. Empty, unmapped and invalid-UTF-8 names produce partial coverage with the entry address and class name. Budget admission remains outside that boundary and declared counts are preserved. Merged main f22e8e7, retaining its class/category/protocol identity guards. Updated its empty-ivar regression to expect the valid containing class to survive. The earlier firmware-test repair is superseded by upstream 5eaef92; the firmware integration file now exactly matches main, including cleanup ownership and retry assertions. ## Contract and boundary impact - Owner: Objective-C ivar decoding in AppleObjcDispatchFacets. - CLI/MCP schemas, tool catalog, installation and generated metadata: unchanged. - Valid ivars and independent class facets remain available after one malformed entry. - No target execution, network access, or new cleanup ownership. Expected effects: - [x] Read existing files or captured data. ## Evidence and validation Linux cloud checkout, Node 24.18.0 / npm 11.16.0: - Latest upstream decoder with the final regressions: 6 failed, 51 passed. Failures cover malformed-name class retention and budget behavior. - npm run test:focused -- src/native/AppleDispatchMetadata.test.ts src/domain/native/objcSwiftMetadata.test.ts tests/boundary/cli/nativeDispatchPropertyAttributes.test.ts tests/boundary/firmware/firmwareIntegration.test.ts: 95 passed, 9 Darwin-only CLI cases skipped. - npm run check: passed, including architecture guards. - git diff --check and git diff --cached --check: passed. - Independent code review found no blocking issue. ## Compatibility and limits Tests use synthetic Mach-O bytes. Local validation did not run a real macOS provider. Remote CI for head b64439d67bf53628f6ebafe716a6218f9042ff0f passed: https://github.com/morluto/rea/actions/runs/38960334958. The PR title check also passed. ## Author readiness Human owner: @maxazure - [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. The human owner confirmed review of the updated diff and validation results at b64439d, including responsibility for the AI-assisted work and readiness for maintainer review: https://github.com/morluto/rea/pull/4543#pullrequestreview-5553335152. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-31 01:13:21 +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#6295
No description provided.