mirror of
https://github.com/morluto/rea.git
synced 2026-11-03 21:36:13 +00:00
test: strengthen integration oracles and verification (#8295)
* test: strengthen integration oracles and verification * test: bound lifecycle gates and strengthen workflow checks * test: verify complete paged and extracted results * test: preserve bytecode and cancellation evidence * test: strengthen retained evidence and fixture cleanup * test: require cross-projection bridge identities * test: retain fixture owners through cleanup failures * test: verify graph examples and project selectors * test: tighten provider and lifecycle regressions * test: consolidate hex coverage and bound cutter cleanup * test: bound subprocess output waits and strengthen graph checks * test: check mcp recovery and preserve cleanup owners * test: verify structured mcp argument failures * test: preserve artifact cleanup and gdb limit evidence * test: preserve evidence identities and bound provider gates * test: retain browser and comparison cleanup owners * test: bound startup and strengthen fixture oracles * test: bound lifecycle gates and verify recovered evidence * test: verify public outcomes and lifecycle ownership * test: assert precise evidence and release lifecycle gates * test: verify selected facts and bound cleanup waits * test: check retained evidence and decoded records * test: verify final reports and retain cleanup ownership * test: bound reviewed startup gates and retain cleanup * test: verify PE errors and preserve MCP cleanup * test: preserve MCP fixture cleanup ownership * test: release provider gates before late startup
This commit is contained in:
1 parent
2d5dec26c3
commit
60149282fc
342 files changed
+8844
-6279
No files matched your search
@@ -3,6 +3,7 @@ import { createHash } from "node:crypto";
|
||||
import { readFile, writeFile } from "node:fs/promises";
|
||||
import { join } from "node:path";
|
||||
import { afterEach, expect, it, vi } from "vitest";
|
||||
import { withVerifierCleanup } from "../../../scripts/lib/verifier-cleanup.mjs";
|
||||
import {
|
||||
AnalysisCancelledError,
|
||||
AnalysisCapabilityUnavailableError,
|
||||
@@ -24,6 +25,7 @@ import {
|
||||
createLinkedIl2cppMetadataFixture,
|
||||
} from "../../fixtures/il2cpp/metadata.js";
|
||||
import { createTestTempDirectory } from "../../fixtures/temporaryDirectory.js";
|
||||
import { awaitAcknowledgement } from "../../fixtures/lifecycleAcknowledgement.js";
|
||||
|
||||
afterEach(() => {
|
||||
vi.restoreAllMocks();
|
||||
@@ -325,12 +327,13 @@ it("bounds concurrent snapshots and retains active decoding until close complete
|
||||
return release;
|
||||
});
|
||||
const active = provider.inspect({ path });
|
||||
await entered;
|
||||
let closed = false;
|
||||
const closing = provider.close().then(() => {
|
||||
closed = true;
|
||||
});
|
||||
try {
|
||||
let closing: Promise<void> | undefined;
|
||||
await withVerifierCleanup(async () => {
|
||||
await awaitAcknowledgement(entered, active, "metadata decoding");
|
||||
closing = provider.close().then(() => {
|
||||
closed = true;
|
||||
});
|
||||
const refused = await provider.inspect({ path });
|
||||
expect(refused.ok).toBe(false);
|
||||
if (!refused.ok) {
|
||||
@@ -346,18 +349,30 @@ it("bounds concurrent snapshots and retains active decoding until close complete
|
||||
}
|
||||
await setImmediate();
|
||||
expect(closed).toBe(false);
|
||||
} finally {
|
||||
resume();
|
||||
await closing;
|
||||
}
|
||||
expect((await active).ok).toBe(true);
|
||||
expect(closed).toBe(true);
|
||||
const afterClose = await provider.inspect({ path });
|
||||
expect(afterClose.ok).toBe(false);
|
||||
if (!afterClose.ok) {
|
||||
expect(afterClose.error).toBeInstanceOf(AnalysisCapabilityUnavailableError);
|
||||
expect(projectAnalysisError(afterClose.error).retryable).toBe(false);
|
||||
}
|
||||
expect((await active).ok).toBe(true);
|
||||
expect(closed).toBe(true);
|
||||
const afterClose = await provider.inspect({ path });
|
||||
expect(afterClose.ok).toBe(false);
|
||||
if (!afterClose.ok) {
|
||||
expect(afterClose.error).toBeInstanceOf(
|
||||
AnalysisCapabilityUnavailableError,
|
||||
);
|
||||
expect(projectAnalysisError(afterClose.error).retryable).toBe(false);
|
||||
}
|
||||
}, [
|
||||
resume,
|
||||
async () => {
|
||||
await closing;
|
||||
},
|
||||
async () => {
|
||||
await active;
|
||||
},
|
||||
async () => {
|
||||
await provider.close();
|
||||
},
|
||||
]);
|
||||
});
|
||||
|
||||
it("keeps occupied capacity retryable while the reader remains open", async () => {
|
||||
@@ -377,8 +392,8 @@ it("keeps occupied capacity retryable while the reader remains open", async () =
|
||||
return release;
|
||||
});
|
||||
const active = provider.inspect({ path });
|
||||
await entered;
|
||||
try {
|
||||
await withVerifierCleanup(async () => {
|
||||
await awaitAcknowledgement(entered, active, "metadata decoding");
|
||||
const refused = await provider.inspect({ path });
|
||||
expect(refused.ok).toBe(false);
|
||||
if (!refused.ok) {
|
||||
@@ -394,11 +409,15 @@ it("keeps occupied capacity retryable while the reader remains open", async () =
|
||||
},
|
||||
});
|
||||
}
|
||||
} finally {
|
||||
resume();
|
||||
await active;
|
||||
await provider.close();
|
||||
}
|
||||
}, [
|
||||
resume,
|
||||
async () => {
|
||||
await active;
|
||||
},
|
||||
async () => {
|
||||
await provider.close();
|
||||
},
|
||||
]);
|
||||
});
|
||||
|
||||
it.each([false, true])(
|
||||
|
||||
Reference in new issue
Block a user