mirror of
https://github.com/morluto/rea.git
synced 2026-11-16 19:53:50 +00:00
build(scripts): type-check the Evidence verification scripts against src (#11579)
* build(scripts): type-check the Evidence verification scripts against src Six JavaScript callers kept passing `undefined` as an Evidence subject after `createEvidence` stopped accepting it (#11536); `npm run typecheck` saw only the TypeScript callers. The scripts import built modules by relative `../dist/` paths, which a checker resolves to the built JavaScript (or nothing, before a build) rather than the source types. A package-private `#dist/*` import alias resolves to `./dist/*` at run time, and `tsconfig.scripts.json` maps it to `./src/*` and checks the listed scripts with `checkJs` under the main compiler options. `typecheck`, and so `check:fast`, runs it; turbo's typecheck inputs include the scripts and the new config. First slice: `verify-package-evidence.mjs` (its evidence-bundle import becomes static), `verify/javascript/output.mjs` and `verify/javascript/digests.mjs`, with the JSDoc types the check required. Refs #11545 * build(scripts): type-check the MCP verifier results and Ghidra snapshot lifecycle helpers (#11590) * build(scripts): type-check the managed app manifest verifier (#11592) * build(scripts): type-check the managed oracles and completion report (#11605) oracles.mjs and completion-report.mjs join tsconfig.scripts.json (72 errors). ensureIlspy is an assertion function, the ILSpy import returns the imported Evidence and reads its normalized result through managedReconstructionImportResultSchema, the manifest-rejection controls are named records walked by a checked field lookup, and the completion report names its input.
This commit is contained in:
1 parent
6eb42a8d8d
commit
b3ca03972a
15 files changed
+847
-169
No files matched your search
@@ -4,12 +4,9 @@ import assert from "node:assert/strict";
|
||||
import { constants } from "node:buffer";
|
||||
import { createHash } from "node:crypto";
|
||||
|
||||
import { digestCanonicalValue } from "../../../dist/domain/canonicalDigest.js";
|
||||
import {
|
||||
createEvidence,
|
||||
parseEvidence,
|
||||
} from "../../../dist/domain/evidence.js";
|
||||
import { unknownTarget } from "../../../dist/domain/targetIdentity.js";
|
||||
import { digestCanonicalValue } from "#dist/domain/canonicalDigest.js";
|
||||
import { createEvidence, parseEvidence } from "#dist/domain/evidence.js";
|
||||
import { unknownTarget } from "#dist/domain/targetIdentity.js";
|
||||
|
||||
// This opt-in check crosses the actual engine string limit; keep it outside
|
||||
// routine source tests. Build first, then run this script with the local Node.
|
||||
|
||||
Reference in new issue
Block a user