mirror of
https://github.com/morluto/rea
synced 2026-10-26 06:16:17 -04:00
fix(verifiers): centralize failure and cleanup ownership
Own operation results and exact rejections in withVerifierCleanup, including undefined, null and independent cleanup failures. Remove the optional-primary cleanup contract and migrate every caller, preserving returns, annotations, signal restoration and dependent cleanup order. Make Frida/JEB reporters fail on reasonless rejections and retain JEB fixture files while provider cleanup is incomplete. Own the nested packaged WASM verifier and expose its composite process/root cleanup capability for retry. Update runnable docs and isolated fixture dependencies. Validation: 547 focused cases in 20 files, eight isolated boundary unit checks, static/build/docs/discovery gates and duplication check (3.58%). Node process, SDK and descriptor cleanup are exercised; provider and packaging results in orchestration tests are simulated. Pack/install subprocess ownership remains with the existing shared package runner outside the nested-command change.
This commit is contained in:
@@ -9,7 +9,7 @@ import { toolContract } from "../dist/contracts/toolContracts.js";
|
||||
import { analysisViewResultSchema } from "../dist/domain/analysisView/analysisView.js";
|
||||
import { ArtifactResourceScope } from "../dist/artifacts/ArtifactResourceScope.js";
|
||||
import { mcpTextValue } from "./lib/mcp-verifier-results.mjs";
|
||||
import { closeVerifierResources } from "./lib/verifier-cleanup.mjs";
|
||||
import { withVerifierCleanup } from "./lib/verifier-cleanup.mjs";
|
||||
import { hashVerifierFile } from "./lib/verifier-file-resources.mjs";
|
||||
|
||||
const args = process.argv.slice(2);
|
||||
@@ -47,8 +47,7 @@ const call = async (name, input) => {
|
||||
return JSON.parse(mcpTextValue(response));
|
||||
};
|
||||
const resources = new ArtifactResourceScope();
|
||||
let primaryError;
|
||||
try {
|
||||
await withVerifierCleanup(async () => {
|
||||
await client.connect(transport);
|
||||
const { tools } = await client.listTools();
|
||||
assert(tools.some((tool) => tool.name === operation));
|
||||
@@ -182,13 +181,5 @@ try {
|
||||
`[ok] summary and page parity; ${report.images.length} images, ${report.types.length} types, ${report.methods.length} methods; complete Evidence ${Buffer.byteLength(stdout)} bytes, summary ${Buffer.byteLength(JSON.stringify(summary))} bytes; CLI ${cliMs} ms`,
|
||||
);
|
||||
}
|
||||
} catch (cause) {
|
||||
primaryError = cause;
|
||||
throw cause;
|
||||
} finally {
|
||||
await closeVerifierResources(
|
||||
[() => client.close(), () => transport.close(), () => resources.close()],
|
||||
primaryError,
|
||||
);
|
||||
}
|
||||
}, [() => client.close(), () => transport.close(), () => resources.close()]);
|
||||
console.log("All asserted IL2CPP metadata CLI/MCP checks passed");
|
||||
|
||||
Reference in New Issue
Block a user