refactor(contracts): simplify workflows and drop readiness tool
This commit is contained in:
@@ -29,7 +29,7 @@ fixtures provide metadata-oriented inputs without package
|
||||
or network dependencies.
|
||||
|
||||
`readiness/` adds source-only generated JavaScript CLI and Electron fixtures for
|
||||
the public reconstruction-readiness journey. `npm run verify:readiness` combines
|
||||
them with the compiled native fixtures, exercises CLI and MCP parity, and emits
|
||||
the versioned machine-readable readiness report documented in
|
||||
`docs/reconstruction-readiness.md`.
|
||||
the repository's reconstruction-readiness verifier. `npm run verify:readiness`
|
||||
combines them with the compiled native fixtures, exercises CLI and MCP parity
|
||||
for real analysis operations, and checks the internal machine-readable report
|
||||
documented in `docs/reconstruction-readiness.md`.
|
||||
|
||||
@@ -1,41 +1,25 @@
|
||||
import { readFile } from "node:fs/promises";
|
||||
|
||||
import { describe, expect, it } from "vitest";
|
||||
|
||||
import {
|
||||
generateLargeFixture,
|
||||
HOPPER_C_ORACLE,
|
||||
LARGE_FIXTURE_COUNT,
|
||||
sha256,
|
||||
sourceDigest,
|
||||
} from "../../../scripts/lib/conformance-fixtures.mjs";
|
||||
|
||||
describe("source-built conformance fixtures", () => {
|
||||
it("grounds the Hopper semantic oracle in the source-owned C fixture", async () => {
|
||||
const source = await readFile("tests/conformance/c/fixture.c", "utf8");
|
||||
for (const procedure of [
|
||||
HOPPER_C_ORACLE.mainProcedure,
|
||||
HOPPER_C_ORACLE.entryProcedure,
|
||||
HOPPER_C_ORACLE.branchProcedure,
|
||||
HOPPER_C_ORACLE.leafProcedure,
|
||||
])
|
||||
expect(source).toContain(`int ${procedure}`);
|
||||
expect(source).toContain(HOPPER_C_ORACLE.entryString);
|
||||
expect(source).toContain(HOPPER_C_ORACLE.leafString);
|
||||
expect(source).toContain(HOPPER_C_ORACLE.globalName);
|
||||
});
|
||||
|
||||
it("generates a deterministic large complete-inventory fixture", () => {
|
||||
it("generates deterministic large-fixture source", () => {
|
||||
const first = generateLargeFixture();
|
||||
const second = generateLargeFixture();
|
||||
|
||||
expect(first).toBe(second);
|
||||
expect(first.match(/int rea_inventory_/gu)).toHaveLength(
|
||||
LARGE_FIXTURE_COUNT,
|
||||
);
|
||||
expect(first).toContain("rea_inventory_0000");
|
||||
expect(first).toContain("rea_inventory_1204");
|
||||
expect(() => generateLargeFixture(0)).toThrow(/positive integer/u);
|
||||
expect(first).toContain(
|
||||
`rea_inventory_${String(LARGE_FIXTURE_COUNT - 1).padStart(4, "0")}`,
|
||||
);
|
||||
expect(() => generateLargeFixture(0)).toThrow(
|
||||
"Fixture count must be a positive integer",
|
||||
);
|
||||
});
|
||||
|
||||
it("hashes source manifests independently of input ordering", () => {
|
||||
|
||||
Reference in New Issue
Block a user