feat(analysis): add opt-in retained inventory and WASM views (#2122)

Add opt-in retained inventory and WASM Evidence views with exact nested output contracts and a small static WASM descriptor. Preserve old complete CLI/MCP workflows, producer choices, original authenticated Evidence and cleanup ownership.

Validated with real public applications, genuine old Evidence migration, 123 focused assertions, 11 synchronized description checks and 42 installed-package WABT cases. Detailed generated experiment JSON stays outside the final tree; concise findings and reproduction inputs remain. Main-existing completion/package CI failures are separately attributed and left unchanged.

Refs #2016

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
This commit is contained in:
Ysopwnable
2026-10-12 21:17:52 +08:00
committed by GitHub
co-authored by factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
parent 3159732597
commit 58fb372071
55 changed files with 4322 additions and 235 deletions
+4 -5
View File
@@ -1,7 +1,6 @@
import { z } from "incur";
import { resolve } from "node:path";
import { createWasmArtifactService } from "../composition/wasm.js";
import { CLI_COMMANDS } from "../cliCommandNames.js";
import { wasmArtifactModule } from "../composition/wasm.js";
import { logCliCommand } from "../cliLogging.js";
import { projectAnalysisError } from "../domain/analysisErrorProjection.js";
import type { Logger } from "pino";
@@ -14,8 +13,8 @@ export const registerWasmCommands = (
logger: Logger,
environment: Readonly<NodeJS.ProcessEnv>,
): void => {
const service = createWasmArtifactService(environment);
cli.command(CLI_COMMANDS.inspectWasmArtifact, {
const service = wasmArtifactModule.create(environment);
cli.command(wasmArtifactModule.cliCommand, {
description: "Inspect an explicit local WASM artifact with WABT",
args: z.object({
path: z.string().describe("Local WASM artifact"),
@@ -35,7 +34,7 @@ export const registerWasmCommands = (
try {
return await logCliCommand(
logger,
CLI_COMMANDS.inspectWasmArtifact,
wasmArtifactModule.cliCommand,
async () => {
const result = await service.inspect(
{