fix(javascript): preserve semantic gaps for unparseable sources

Successful worker transport can carry an explicit failed parser status
with no semantic projection. Preserve that producer fact through the
shared source-availability interpretation used by full and incremental
graph construction, rather than dropping the source's semantic scope.

Retain the module when capacity permits, per-family incomplete-module
unknowns, and unknown omitted extents. Preserve existing operational
failure reasons and limits without classifying syntax as resource loss.
Document this coverage behavior.

Validation: regression-first run had 3 expected failures; all 22 selected
projection and public CLI source-selection/HTML cases passed after repair.
No JavaScript target execution or live external provider was involved.
This commit is contained in:
morluto committed 2026-10-24 08:58:22 +08:00
1 parent 54646e8dc4
commit d81d6b6707
6 files changed
+105 -6

No files matched your search

@@ -20,7 +20,7 @@ import { sourceRangesEqual as rangesEqual } from "../../domain/javascript/javasc
import type { JavaScriptApplicationGraph } from "../../domain/javascript/javascriptApplicationGraph.js";
import type { JavaScriptArtifactAnalysis } from "./JavaScriptArtifactAnalysisTypes.js";
import {
javaScriptArtifactTextExclusion,
javaScriptSemanticSourceExclusion,
type JavaScriptArtifactFile,
} from "../../domain/javascript/javascriptArtifactFiles.js";
import {
@@ -160,7 +160,10 @@ export const buildJavaScriptSemanticGraph = ({
analyzed.javascript?.electron.call_paths,
);
else {
const reason = javaScriptArtifactTextExclusion(analyzed.file);
const reason = javaScriptSemanticSourceExclusion(
analyzed.file,
analyzed.javascript?.parse_status ?? null,
);
if (reason !== null)
projection.recordUnavailableFile(
analyzed.file,