[PR #1314] [CLOSED] fix(apple): bind keyed archive selection to normalized inventory paths #2794

Closed
opened 2026-10-17 21:10:18 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/morluto/rea/pull/1314
Author: @rudycelekli
Created: 10/9/2026
Status: ❌ Closed

Base: main ← Head: fix/keyed-archive-unicode-selection-20261009


📝 Commits (2)

  • 361b502 fix(apple): bind keyed archive selection to normalized inventory paths
  • 14afd2d fix(apple): reject selected directories before descending

📊 Changes

2 files changed (+165 additions, -63 deletions)

View changed files

📝 src/artifacts/apple/KeyedArchiveReader.ts (+86 -62)
📝 tests/boundary/filesystem/keyedArchiveSelection.test.ts (+79 -1)

📄 Description

Problem

Artifact inventory presents NFC-normalized paths, but selected keyed archives were matched against raw directory filenames. A decomposed Unicode filename could be listed yet fail inspection when the caller selected its exact inventory path.

Change

Resolve the normalized logical path to one original filesystem entry, retaining that entry for I/O, archive digest and source evidence. Reject Unicode-equivalent collisions instead of selecting an arbitrary file. ASCII selection and regular-file checks remain intact.

Verification

  • Actual NFD filesystem filename containing a Foundation-produced golden archive: inventory NFC path failed selection before the fix; the unchanged regression passes after.
  • Final isolated checkout: 18 tests passed, one skipped across reader and filesystem selection owners. The collision fixture is skipped on macOS normalization-insensitive filesystems; Linux coverage awaits hosted CI.
  • npm run check passed.
  • npm run verify:keyed-archive passed eight tests with real public CLI and stdio MCP, binary/XML Foundation goldens, shared/cyclic identity and no target class instantiation.
  • Selection now traverses the complete bundle to establish uniqueness. Existing permission/cancellation failures propagate; this is not a guarantee that an unreadable sibling can be ignored.
  • Hopper/Ghidra are unaffected and were not run. Hosted checks may still be pending.

AI assistance was used for investigation, implementation and verification.


🔄 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/1314 **Author:** [@rudycelekli](https://github.com/rudycelekli) **Created:** 10/9/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `fix/keyed-archive-unicode-selection-20261009` --- ### 📝 Commits (2) - [`361b502`](https://github.com/morluto/rea/commit/361b50267f6295dccfce898ec2dd92de43ed4f6f) fix(apple): bind keyed archive selection to normalized inventory paths - [`14afd2d`](https://github.com/morluto/rea/commit/14afd2d0b83f0e8fc24e3e4e6ccfcff4bcc43b0f) fix(apple): reject selected directories before descending ### 📊 Changes **2 files changed** (+165 additions, -63 deletions) <details> <summary>View changed files</summary> 📝 `src/artifacts/apple/KeyedArchiveReader.ts` (+86 -62) 📝 `tests/boundary/filesystem/keyedArchiveSelection.test.ts` (+79 -1) </details> ### 📄 Description ## Problem Artifact inventory presents NFC-normalized paths, but selected keyed archives were matched against raw directory filenames. A decomposed Unicode filename could be listed yet fail inspection when the caller selected its exact inventory path. ## Change Resolve the normalized logical path to one original filesystem entry, retaining that entry for I/O, archive digest and source evidence. Reject Unicode-equivalent collisions instead of selecting an arbitrary file. ASCII selection and regular-file checks remain intact. ## Verification - Actual NFD filesystem filename containing a Foundation-produced golden archive: inventory NFC path failed selection before the fix; the unchanged regression passes after. - Final isolated checkout: 18 tests passed, one skipped across reader and filesystem selection owners. The collision fixture is skipped on macOS normalization-insensitive filesystems; Linux coverage awaits hosted CI. - `npm run check` passed. - `npm run verify:keyed-archive` passed eight tests with real public CLI and stdio MCP, binary/XML Foundation goldens, shared/cyclic identity and no target class instantiation. - Selection now traverses the complete bundle to establish uniqueness. Existing permission/cancellation failures propagate; this is not a guarantee that an unreadable sibling can be ignored. - Hopper/Ghidra are unaffected and were not run. Hosted checks may still be pending. AI assistance was used for investigation, implementation and verification. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-17 21:10:18 +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#2794
No description provided.