[PR #3278] [CLOSED] fix(javascript): report missing ASAR companions as unavailable instead of not-found #5695

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

📋 Pull Request Information

Original PR: https://github.com/morluto/rea/pull/3278
Author: @VarunGore36
Created: 10/14/2026
Status: ❌ Closed

Base: main ← Head: fix/3213-asar-companion-availability


📝 Commits (2)

  • 3804c10 fix(javascript): report missing ASAR companions as unavailable instead of not-found
  • 2dcea95 fix(javascript): keep missing manifests unknown and share container lookup

📊 Changes

11 files changed (+220 additions, -9 deletions)

View changed files

📝 src/application/javascript/ElectronBoundaryGraphWindows.ts (+2 -0)
📝 src/application/javascript/JavaScriptArtifactGraphBuilder.ts (+8 -0)
📝 src/application/javascript/JavaScriptArtifactGraphContext.ts (+6 -0)
📝 src/application/javascript/JavaScriptArtifactGraphDocuments.ts (+1 -0)
📝 src/application/javascript/JavaScriptArtifactGraphFindings.ts (+4 -0)
📝 src/application/javascript/JavaScriptArtifactGraphStructure.ts (+1 -0)
📝 src/application/javascript/JavaScriptArtifactPathResolution.ts (+40 -1)
📝 src/application/javascript/JavaScriptModuleRelationships.ts (+1 -0)
📝 src/artifacts/javascript/JavaScriptArtifactFiles.ts (+47 -7)
📝 src/domain/javascript/javascriptArtifactFiles.ts (+14 -0)
📝 tests/boundary/filesystem/javascript-applications/javascriptApplicationService.test.ts (+96 -1)

📄 Description

Fixes #3213.

Direct ASAR analysis dropped an inventoried unpacked native add-on whose companion bytes were unavailable, reporting its require target as not-found under complete coverage. The inventory already retains the occurrence with hash_status unavailable plus its limitation; this change carries those relevant files through the JavaScript projection as unavailable path facts:

  • domain/artifacts: new JavaScriptArtifactUnavailableFile + FileSet.unavailable_files; expectedInventory builds them with container identity instead of a bare path set.
  • resolution: findFileCandidate returns unavailable with candidate_path when the target is an unavailable relevant file in the same container; threaded through module, worker, role, package, HTML, preload and utility-process resolutions.
  • graph: coverage is partial when unavailable relevant files exist, with a per-file limitation naming the missing bytes. Unresolved module nodes/edges already surface resolution_status + candidate_path, so the import now reads unavailable rather than absent.

Validation: new boundary regression builds an ASAR with unpacked addon.node, deletes the companion, and asserts unavailable + candidate_path on the require edge, partial coverage, and an unavailable limitation. Verified it fails without the src fix and passes with it. Suites: javascript-applications boundary (337 tests across 17 files) + PathResolution unit (158) green; tsc clean; check:fast green.


🔄 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/3278 **Author:** [@VarunGore36](https://github.com/VarunGore36) **Created:** 10/14/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `fix/3213-asar-companion-availability` --- ### 📝 Commits (2) - [`3804c10`](https://github.com/morluto/rea/commit/3804c10de2a4de5f376c6d2a0c5f588d967e2c3c) fix(javascript): report missing ASAR companions as unavailable instead of not-found - [`2dcea95`](https://github.com/morluto/rea/commit/2dcea95295330fcf7cd9fc69ba7e6f93fb174aa5) fix(javascript): keep missing manifests unknown and share container lookup ### 📊 Changes **11 files changed** (+220 additions, -9 deletions) <details> <summary>View changed files</summary> 📝 `src/application/javascript/ElectronBoundaryGraphWindows.ts` (+2 -0) 📝 `src/application/javascript/JavaScriptArtifactGraphBuilder.ts` (+8 -0) 📝 `src/application/javascript/JavaScriptArtifactGraphContext.ts` (+6 -0) 📝 `src/application/javascript/JavaScriptArtifactGraphDocuments.ts` (+1 -0) 📝 `src/application/javascript/JavaScriptArtifactGraphFindings.ts` (+4 -0) 📝 `src/application/javascript/JavaScriptArtifactGraphStructure.ts` (+1 -0) 📝 `src/application/javascript/JavaScriptArtifactPathResolution.ts` (+40 -1) 📝 `src/application/javascript/JavaScriptModuleRelationships.ts` (+1 -0) 📝 `src/artifacts/javascript/JavaScriptArtifactFiles.ts` (+47 -7) 📝 `src/domain/javascript/javascriptArtifactFiles.ts` (+14 -0) 📝 `tests/boundary/filesystem/javascript-applications/javascriptApplicationService.test.ts` (+96 -1) </details> ### 📄 Description Fixes #3213. Direct ASAR analysis dropped an inventoried unpacked native add-on whose companion bytes were unavailable, reporting its require target as not-found under complete coverage. The inventory already retains the occurrence with hash_status unavailable plus its limitation; this change carries those relevant files through the JavaScript projection as unavailable path facts: - domain/artifacts: new JavaScriptArtifactUnavailableFile + FileSet.unavailable_files; expectedInventory builds them with container identity instead of a bare path set. - resolution: findFileCandidate returns unavailable with candidate_path when the target is an unavailable relevant file in the same container; threaded through module, worker, role, package, HTML, preload and utility-process resolutions. - graph: coverage is partial when unavailable relevant files exist, with a per-file limitation naming the missing bytes. Unresolved module nodes/edges already surface resolution_status + candidate_path, so the import now reads unavailable rather than absent. Validation: new boundary regression builds an ASAR with unpacked addon.node, deletes the companion, and asserts unavailable + candidate_path on the require edge, partial coverage, and an unavailable limitation. Verified it fails without the src fix and passes with it. Suites: javascript-applications boundary (337 tests across 17 files) + PathResolution unit (158) green; tsc clean; check:fast green. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-31 01:08:42 +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#5695
No description provided.