refactor(tools): return complete analysis results inline

This commit is contained in:
morluto
2026-09-29 14:53:50 +08:00
parent c34efca4cd
commit 2a6eb41147
156 changed files with 2529 additions and 1891 deletions
+15 -1
View File
@@ -2,7 +2,10 @@ import { describe, expect, it } from "vitest";
import { RECONSTRUCTION_READINESS_EXAMPLE } from "../contracts/reconstructionReadinessExample.js";
import { createReconstructionReadinessReport } from "./reconstructionReadiness.js";
import type { ReconstructionReadinessInput } from "./reconstructionReadinessSchemas.js";
import {
reconstructionReadinessInputSchema,
type ReconstructionReadinessInput,
} from "./reconstructionReadinessSchemas.js";
const input = (
overrides: Partial<ReconstructionReadinessInput> = {},
@@ -12,6 +15,17 @@ const input = (
});
describe("reconstruction readiness report", () => {
it("accepts every caller supplied capability", () => {
const capability = RECONSTRUCTION_READINESS_EXAMPLE.capabilities[0];
if (capability === undefined) throw new TypeError("Missing capability");
const parsed = reconstructionReadinessInputSchema.parse(
input({ capabilities: Array.from({ length: 1_001 }, () => capability) }),
);
expect(parsed.capabilities).toHaveLength(1_001);
});
it("passes the complete repository conformance journey deterministically", () => {
const first = createReconstructionReadinessReport(input());
const second = createReconstructionReadinessReport(input());