refactor(cli): project reconstruction and source-to-bundle documents from their contracts (#10697)

* refactor(cli): project reconstruction ledger and coverage commands from their contracts

* refactor(cli): project compare-source-to-bundle from its contract and refuse omitted document fields

* fix(cli): advertise caller paths in JSON documents as the CLI admits them

* fix(cli): advertise that JSON document caller paths exclude URLs

* refactor(cli): narrow omitted document field refusal to object documents

* test(cli): give the coverage document fixture the current evidence_format
This commit is contained in:
morluto authored and GitHub committed 2026-11-15 19:40:22 +08:00
1 parent fd2eabb12a
commit 9be6a96fd6
12 files changed
+456 -182

No files matched your search

@@ -6,7 +6,6 @@ import {
import {
compareApplicationVersionsRequestSchema,
compareJavaScriptExportShapesRequestSchema,
compareSourceToBundleCliInputSchema,
compareSourceToBundleRequestSchema,
traceApplicationFeatureRequestSchema,
} from "../../contracts/javascript/applicationWorkflowInputContracts.js";
@@ -235,12 +234,12 @@ export const compareApplicationVersionsEvidence = (
/** Select the application record and historical graph through their shared owners. */
export const executeSourceToBundleComparison = async (
rawInput: unknown,
schema:
| typeof compareSourceToBundleCliInputSchema
| typeof compareSourceToBundleRequestSchema,
lookup: EvidenceLookup | undefined,
resources: ArtifactResourceScope,
options: Pick<ExecutionOptions, "signal"> = {},
options: Pick<ExecutionOptions, "signal"> & {
/** The reference file path as the caller spelled it. */
readonly requestedReferencePath?: string;
} = {},
): Promise<
Result<
ApplicationWorkflowExecution<SourceToBundleComparisonResult>,
@@ -250,7 +249,7 @@ export const executeSourceToBundleComparison = async (
const selected = resolveEvidenceRequest(
"compare_source_to_bundle",
rawInput,
schema,
compareSourceToBundleRequestSchema,
lookup,
options,
);
@@ -261,6 +260,7 @@ export const executeSourceToBundleComparison = async (
selected.value.input.reference,
options.signal,
resources,
options.requestedReferencePath,
);
return reference.ok
? compareSourceToBundleEvidence({