refactor(analysis): remove fixed result quotas
This commit is contained in:
@@ -75,7 +75,7 @@ describe("application workflow MCP parity", () => {
|
||||
expect.arrayContaining([
|
||||
expect.objectContaining({
|
||||
operation: "compare_javascript_export_shapes",
|
||||
predicate_type: "rea.javascript-export-shape-comparison/v1",
|
||||
predicate_type: "rea.javascript-export-shape-comparison",
|
||||
}),
|
||||
]),
|
||||
);
|
||||
|
||||
@@ -243,10 +243,10 @@ async function executeCharacterizationScenario(
|
||||
expect(session.exportEvidenceBundle().records).toEqual(
|
||||
expect.arrayContaining([
|
||||
expect.objectContaining({
|
||||
predicate_type: "rea.javascript-export-transformation/v1",
|
||||
predicate_type: "rea.javascript-export-transformation",
|
||||
}),
|
||||
expect.objectContaining({
|
||||
predicate_type: "rea.runtime-characterization/v1",
|
||||
predicate_type: "rea.runtime-characterization",
|
||||
}),
|
||||
]),
|
||||
);
|
||||
|
||||
@@ -108,7 +108,7 @@ describe("application workflow CLI parity", () => {
|
||||
]);
|
||||
expect(traced).toMatchObject({
|
||||
operation: "trace_javascript_semantics",
|
||||
predicate_type: "rea.javascript-semantic-trace/v1",
|
||||
predicate_type: "rea.javascript-semantic-trace",
|
||||
normalized_result: {
|
||||
source_evidence_id: analyzed.value.evidence_id,
|
||||
source_graph_id: result.semantic_graph.graph_id,
|
||||
@@ -265,7 +265,7 @@ describe("application workflow CLI export Evidence", () => {
|
||||
);
|
||||
expect(compared).toMatchObject({
|
||||
operation: "compare_javascript_export_shapes",
|
||||
predicate_type: "rea.javascript-export-shape-comparison/v1",
|
||||
predicate_type: "rea.javascript-export-shape-comparison",
|
||||
normalized_result: {
|
||||
summary: { added: 1, removed: 0, changed: 0, unknown: 0 },
|
||||
changes: [
|
||||
|
||||
@@ -240,7 +240,7 @@ describe("JavaScript export return-shape projection", () => {
|
||||
});
|
||||
});
|
||||
|
||||
it("keeps incomplete source property coverage partial", async () => {
|
||||
it("returns every source property within the supplied inputs", async () => {
|
||||
const properties = [
|
||||
'a_type: "item"',
|
||||
...Array.from(
|
||||
@@ -254,7 +254,7 @@ describe("JavaScript export return-shape projection", () => {
|
||||
});
|
||||
const result = compare(left, right);
|
||||
|
||||
expect(result.coverage.status).toBe("partial");
|
||||
expect(result.coverage.status).toBe("complete-within-inputs");
|
||||
expect(result.coverage.left_omitted_fields).toBe(0);
|
||||
expect(result.coverage.right_omitted_fields).toBe(0);
|
||||
});
|
||||
|
||||
@@ -39,6 +39,26 @@ const observe = async (path: string) => {
|
||||
);
|
||||
};
|
||||
|
||||
const evidencePages = (
|
||||
inventory: Awaited<ReturnType<typeof observe>>,
|
||||
side: string,
|
||||
) =>
|
||||
Array.from({ length: 101 }, (_, index) =>
|
||||
createEvidence(
|
||||
{
|
||||
path: `${side}-${String(index)}`,
|
||||
sha256: inventory.subject?.digest.sha256 ?? "0".repeat(64),
|
||||
format: inventory.subject?.format ?? "directory",
|
||||
},
|
||||
PROVIDER,
|
||||
{
|
||||
operation: "inventory_artifact",
|
||||
parameters: { page: index, side },
|
||||
result: jsonValueSchema.parse(inventory.normalized_result),
|
||||
},
|
||||
),
|
||||
);
|
||||
|
||||
describe("artifact comparison", () => {
|
||||
it("classifies deterministic path changes and cites both inventories", async () => {
|
||||
const parent = await createTestTempDirectory("rea-artifact-compare-");
|
||||
@@ -144,6 +164,28 @@ describe("artifact comparison", () => {
|
||||
});
|
||||
}, 15_000);
|
||||
|
||||
it("retains every inventory citation when comparing many evidence pages", async () => {
|
||||
const parent = await createTestTempDirectory(
|
||||
"rea-artifact-pages-evidence-",
|
||||
);
|
||||
const leftPath = join(parent, "left.app");
|
||||
const rightPath = join(parent, "right.app");
|
||||
await Promise.all([mkdir(leftPath), mkdir(rightPath)]);
|
||||
await Promise.all([
|
||||
writeFile(join(leftPath, "main.js"), "left();"),
|
||||
writeFile(join(rightPath, "main.js"), "right();"),
|
||||
]);
|
||||
|
||||
const leftInventory = await observe(leftPath);
|
||||
const rightInventory = await observe(rightPath);
|
||||
const comparison = compareArtifacts(
|
||||
evidencePages(leftInventory, "left"),
|
||||
evidencePages(rightInventory, "right"),
|
||||
);
|
||||
|
||||
expect(comparison.changes[0]?.evidence_links).toHaveLength(202);
|
||||
});
|
||||
|
||||
it("rejects non-inventory and tampered Evidence", async () => {
|
||||
const root = await createTestTempDirectory("rea-artifact-invalid-");
|
||||
const evidence = await observe(root);
|
||||
|
||||
@@ -84,7 +84,7 @@ describe("managed application graph projection", () => {
|
||||
const parsed = parseEvidence(evidence.value);
|
||||
expect(parsed).toMatchObject({
|
||||
operation: "project_managed_application_graph",
|
||||
predicate_type: "rea.managed-application-graph/v1",
|
||||
predicate_type: "rea.managed-application-graph",
|
||||
provider: { id: "rea-dotnet-workflows" },
|
||||
confidence: "inferred",
|
||||
authority: "analyst-inference",
|
||||
|
||||
Reference in New Issue
Block a user