refactor: return complete analysis results inline

This commit is contained in:
morluto
2026-09-29 08:07:24 +08:00
parent 07ff8b30ee
commit a2a3243ea8
127 changed files with 402 additions and 1508 deletions
@@ -6,7 +6,7 @@ import {
ArtifactOperationError,
EvidenceFileError,
HopperRemoteError,
InvestigationWorkspaceError,
WorkspaceStorageError,
UnknownRegistryError,
projectAnalysisError,
type AnalysisError,
@@ -53,7 +53,7 @@ describe("analysis error projection contract", () => {
"name-conflict",
"io",
] as const
).map((reason) => new InvestigationWorkspaceError("update", reason)),
).map((reason) => new WorkspaceStorageError("update", reason)),
...(
[
"not-found",
@@ -1,14 +1,12 @@
import { describe, expect, it } from "vitest";
import {
CONFORMANCE_PACKAGE_VERSION,
createConformancePackage,
parseConformancePackage,
type ConformancePackageInput,
} from "../../../src/domain/conformancePackage.js";
const validPackageInput: ConformancePackageInput = {
schema_version: CONFORMANCE_PACKAGE_VERSION,
name: "test-fixture",
description: "A test conformance fixture",
created_at: "2026-07-28T00:00:00Z",
@@ -72,7 +70,7 @@ describe("conformance package parsing", () => {
it("rejects invalid package structure", () => {
expect(
parseConformancePackage({ ...validPackage, schema_version: 999 }),
parseConformancePackage({ ...validPackage, name: "" }),
).toMatchObject({ ok: false, error: { kind: "invalid_package" } });
});
@@ -1,7 +1,6 @@
import { describe, expect, it } from "vitest";
import {
CONFORMANCE_PACKAGE_VERSION,
createConformancePackage,
type ConformancePackageInput,
} from "../../../src/domain/conformancePackage.js";
@@ -13,7 +12,6 @@ import {
} from "../../../src/domain/conformanceReplay.js";
const validPackageInput: ConformancePackageInput = {
schema_version: CONFORMANCE_PACKAGE_VERSION,
name: "test-fixture",
description: "A test conformance fixture",
created_at: "2026-07-28T00:00:00Z",