[PR #1492] [MERGED] perf(artifacts): stop repeating every artifact path as Evidence locations #2922

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

📋 Pull Request Information

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

Base: main ← Head: perf/artifact-evidence-locations


📝 Commits (1)

  • b8ebdf3 perf(artifacts): stop repeating every artifact path as Evidence locations

📊 Changes

3 files changed (+12 additions, -14 deletions)

View changed files

📝 src/artifacts/ArtifactProvider.ts (+7 -14)
📝 tests/boundary/providers/native/artifactProvider.archiveInventory.test.ts (+3 -0)
📝 tests/boundary/providers/native/artifactProvider.extraction.test.ts (+2 -0)

📄 Description

Summary

ArtifactProvider filled the Evidence locations array with one {"kind":"artifact-path","path":…} entry for every record in the result:

  • inventory_artifact used every occurrence's logical_path;
  • inspect_artifact did the same twice: once in the nested inventory Evidence (substeps[0].evidence.locations) and once in its own Evidence;
  • extract_artifact used every extracted file's relative_path.

Each of those paths is already in the result (occurrences[].logical_path, artifacts[].relative_path). Nothing in src, tests or scripts reads these locations; every other use of locations just passes it through. These operations describe the whole selected artifact, so they now report locations: [], like other whole-target Evidence (inspect_macho, inspect_signature). The small fixed lists the provider also mirrors are unchanged: decoded IB documents, asset catalogs, dylib images.

Measured effect

rea <command> <app> --format json:

command app main this branch
inspect-artifact Transmission.app 1,095,316 945,356 (−13.7%)
inspect-artifact Visual Studio Code.app 15,366,749 13,070,979 (−14.9%)
extract-artifact Transmission.app 255,714 198,532 (−22.4%)
extract-artifact Visual Studio Code.app 1,398,854 1,062,289 (−24.1%)

Verification

  • New assertions in artifactProvider.archiveInventory.test.ts (both inspection Evidence records) and artifactProvider.extraction.test.ts check that locations is empty.
  • npm run test:focused passes on all tests/boundary/providers/native/artifactProvider.*, tests/boundary/mcp/artifactMcp*, tests/boundary/filesystem/artifactZipIntegrity, tests/composition/analysis-sessions/artifactComparison, tests/boundary/cli/cliOutput and tests/process-global/cliSelectedEnvironment (17 files).
  • npm run check:fast and npm run docs:check pass.
  • I ran the CLI by hand against two real app bundles to get the numbers above.
  • No real Hopper or Ghidra verification was needed.

🤖 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/1492 **Author:** [@kaoru0822-kitauji](https://github.com/kaoru0822-kitauji) **Created:** 10/10/2026 **Status:** ✅ Merged **Merged:** 10/10/2026 **Merged by:** [@kaoru0822-kitauji](https://github.com/kaoru0822-kitauji) **Base:** `main` ← **Head:** `perf/artifact-evidence-locations` --- ### 📝 Commits (1) - [`b8ebdf3`](https://github.com/morluto/rea/commit/b8ebdf3ae9934cc117c0a308092dbdea0441ca9e) perf(artifacts): stop repeating every artifact path as Evidence locations ### 📊 Changes **3 files changed** (+12 additions, -14 deletions) <details> <summary>View changed files</summary> 📝 `src/artifacts/ArtifactProvider.ts` (+7 -14) 📝 `tests/boundary/providers/native/artifactProvider.archiveInventory.test.ts` (+3 -0) 📝 `tests/boundary/providers/native/artifactProvider.extraction.test.ts` (+2 -0) </details> ### 📄 Description ## Summary `ArtifactProvider` filled the Evidence `locations` array with one `{"kind":"artifact-path","path":…}` entry for every record in the result: - `inventory_artifact` used every occurrence's `logical_path`; - `inspect_artifact` did the same twice: once in the nested inventory Evidence (`substeps[0].evidence.locations`) and once in its own Evidence; - `extract_artifact` used every extracted file's `relative_path`. Each of those paths is already in the result (`occurrences[].logical_path`, `artifacts[].relative_path`). Nothing in `src`, `tests` or `scripts` reads these locations; every other use of `locations` just passes it through. These operations describe the whole selected artifact, so they now report `locations: []`, like other whole-target Evidence (`inspect_macho`, `inspect_signature`). The small fixed lists the provider also mirrors are unchanged: decoded IB documents, asset catalogs, dylib images. ## Measured effect `rea <command> <app> --format json`: | command | app | main | this branch | |---|---|---|---| | inspect-artifact | Transmission.app | 1,095,316 | 945,356 (−13.7%) | | inspect-artifact | Visual Studio Code.app | 15,366,749 | 13,070,979 (−14.9%) | | extract-artifact | Transmission.app | 255,714 | 198,532 (−22.4%) | | extract-artifact | Visual Studio Code.app | 1,398,854 | 1,062,289 (−24.1%) | ## Verification - New assertions in `artifactProvider.archiveInventory.test.ts` (both inspection Evidence records) and `artifactProvider.extraction.test.ts` check that `locations` is empty. - `npm run test:focused` passes on all `tests/boundary/providers/native/artifactProvider.*`, `tests/boundary/mcp/artifactMcp*`, `tests/boundary/filesystem/artifactZipIntegrity`, `tests/composition/analysis-sessions/artifactComparison`, `tests/boundary/cli/cliOutput` and `tests/process-global/cliSelectedEnvironment` (17 files). - `npm run check:fast` and `npm run docs:check` pass. - I ran the CLI by hand against two real app bundles to get the numbers above. - No real Hopper or Ghidra verification was needed. 🤖 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:11:52 +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#2922
No description provided.