[PR #1298] [MERGED] test(artifacts): pin per-occurrence roles for direct Mach-O roots and shared bytes #2778

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

📋 Pull Request Information

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

Base: main ← Head: test/artifacts-direct-macho-root-kind


📝 Commits (1)

  • b9e29c5 test(artifacts): pin per-occurrence roles for direct Mach-O roots and shared bytes

📊 Changes

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

View changed files

📝 src/artifacts/inventory/ArtifactOccurrenceIdentity.test.ts (+104 -0)

📄 Description

Summary

#1234 and #1235 no longer reproduce on main. Both were fixed by 63bf9140 ("refactor!: enforce canonical evidence and provider boundaries"), which separated artifact byte identity from occurrence classification. Neither reproduction is covered by a test, so this PR adds regressions in src/artifacts/inventory/ArtifactOccurrenceIdentity.test.ts:

  • #1235: a directly selected arm64 MH_EXECUTE file, mode 755 and 644, inventoried both directly (root occurrence .) and inside Demo.app. Both report the same digest, artifact_kind: "executable", artifact_format: "mach-o", and executable matching the mode.
  • #1234: the issue's three ZIP shapes (a.js + z.txt, 0.txt + a.js, a.js alone, all with identical bytes) go through inventoryArtifact and projectAppleApplication. components.javascript is exactly ["Demo.app/Contents/Resources/a.js"] and runtime_families is ["javascript"] in all three.

Test-only change.

Verification

  • On main: all 8 tests in the file pass.
  • At f0da05f6 (the commit both issues were reported against): the new cases fail with the reported symptoms. #1235: the mode-755 direct root reports executable: false and no executable kind. #1234: [] for the later text resource and two components for the earlier one, while the solo-script control passes.
  • npm run check:changed
  • Full issue reproductions through the built CLI on main, including #1234's native .app variant (one bridge candidate, a.js → Contents/MacOS/demo) and #1235's mode-644 control, now match each issue's restoration check.

🤖 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/1298 **Author:** [@kaoru0822-kitauji](https://github.com/kaoru0822-kitauji) **Created:** 10/9/2026 **Status:** ✅ Merged **Merged:** 10/9/2026 **Merged by:** [@kaoru0822-kitauji](https://github.com/kaoru0822-kitauji) **Base:** `main` ← **Head:** `test/artifacts-direct-macho-root-kind` --- ### 📝 Commits (1) - [`b9e29c5`](https://github.com/morluto/rea/commit/b9e29c52d483704c64cd88f87eaa117066288602) test(artifacts): pin per-occurrence roles for direct Mach-O roots and shared bytes ### 📊 Changes **1 file changed** (+104 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `src/artifacts/inventory/ArtifactOccurrenceIdentity.test.ts` (+104 -0) </details> ### 📄 Description ## Summary #1234 and #1235 no longer reproduce on `main`. Both were fixed by 63bf9140 ("refactor!: enforce canonical evidence and provider boundaries"), which separated artifact byte identity from occurrence classification. Neither reproduction is covered by a test, so this PR adds regressions in `src/artifacts/inventory/ArtifactOccurrenceIdentity.test.ts`: - **#1235:** a directly selected arm64 `MH_EXECUTE` file, mode 755 and 644, inventoried both directly (root occurrence `.`) and inside `Demo.app`. Both report the same digest, `artifact_kind: "executable"`, `artifact_format: "mach-o"`, and `executable` matching the mode. - **#1234:** the issue's three ZIP shapes (`a.js` + `z.txt`, `0.txt` + `a.js`, `a.js` alone, all with identical bytes) go through `inventoryArtifact` and `projectAppleApplication`. `components.javascript` is exactly `["Demo.app/Contents/Resources/a.js"]` and `runtime_families` is `["javascript"]` in all three. Test-only change. ## Verification - On `main`: all 8 tests in the file pass. - At f0da05f6 (the commit both issues were reported against): the new cases fail with the reported symptoms. #1235: the mode-755 direct root reports `executable: false` and no executable kind. #1234: `[]` for the later text resource and two components for the earlier one, while the solo-script control passes. - `npm run check:changed` - Full issue reproductions through the built CLI on `main`, including #1234's native `.app` variant (one bridge candidate, `a.js` → `Contents/MacOS/demo`) and #1235's mode-644 control, now match each issue's restoration check. 🤖 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-17 21:10:08 +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#2778
No description provided.