refactor(javascript): share the reconstruction input contract

Remove the reconstruction-only request schema and consume the canonical parsed
JavaScript application input. Production already owns parsing at the service
boundary; direct test seams now use that same schema instead of a weaker path
contract. Preserve format, filesystem, source selection and lifecycle validation.

Add a NUL-path regression for canonical admission and typed input-error
projection. Verified 63 focused cases plus static, build, docs, discovery and
duplication checks; no target execution or real-provider claims.
This commit is contained in:
morluto committed 2026-10-24 15:02:26 +08:00
1 parent d68d03e88f
commit bdf15b9bd5
5 files changed
+49 -31

No files matched your search

@@ -8,6 +8,7 @@ import { AsarArtifactReader } from "../../../src/artifacts/AsarArtifactReader.js
import { ArtifactResourceScope } from "../../../src/artifacts/ArtifactResourceScope.js";
import { ArtifactReaderFailure } from "../../../src/artifacts/ArtifactReader.js";
import { reconstructJavaScriptArtifact } from "../../../src/application/javascript/JavaScriptArtifactReconstruction.js";
import { analyzeJavaScriptApplicationInputSchema } from "../../../src/domain/javascript/javascriptApplicationAnalysis.js";
import { createTestTempDirectory } from "../../fixtures/temporaryDirectory.js";
it("retains a failed nested reader through blocked work and scope cleanup", async () => {
@@ -40,7 +41,9 @@ it("retains a failed nested reader through blocked work and scope cleanup", asyn
},
);
const input = { input_path: bundle };
const input = analyzeJavaScriptApplicationInputSchema.parse({
input_path: bundle,
});
const firstFailure = await reconstructJavaScriptArtifact(input, scope).catch(
(cause: unknown) => cause,
);