@mikeargento/bitgraph-player 0.2.1 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (61) hide show
  1. package/README.md +40 -0
  2. package/SPEC.md +95 -6
  3. package/dist/__tests__/check.test.d.ts +2 -0
  4. package/dist/__tests__/check.test.d.ts.map +1 -0
  5. package/dist/__tests__/check.test.js +358 -0
  6. package/dist/__tests__/check.test.js.map +1 -0
  7. package/dist/__tests__/sig-v2.test.d.ts +2 -0
  8. package/dist/__tests__/sig-v2.test.d.ts.map +1 -0
  9. package/dist/__tests__/sig-v2.test.js +266 -0
  10. package/dist/__tests__/sig-v2.test.js.map +1 -0
  11. package/dist/check.d.ts +156 -0
  12. package/dist/check.d.ts.map +1 -0
  13. package/dist/check.js +640 -0
  14. package/dist/check.js.map +1 -0
  15. package/dist/cli.js +84 -15
  16. package/dist/cli.js.map +1 -1
  17. package/dist/evaluate.d.ts +8 -21
  18. package/dist/evaluate.d.ts.map +1 -1
  19. package/dist/evaluate.js +93 -2
  20. package/dist/evaluate.js.map +1 -1
  21. package/dist/index.d.ts +8 -3
  22. package/dist/index.d.ts.map +1 -1
  23. package/dist/index.js +4 -2
  24. package/dist/index.js.map +1 -1
  25. package/dist/play.d.ts +12 -2
  26. package/dist/play.d.ts.map +1 -1
  27. package/dist/play.js +39 -4
  28. package/dist/play.js.map +1 -1
  29. package/dist/rule.d.ts +0 -13
  30. package/dist/rule.d.ts.map +1 -1
  31. package/dist/rule.js +84 -8
  32. package/dist/rule.js.map +1 -1
  33. package/dist/sig.d.ts +38 -0
  34. package/dist/sig.d.ts.map +1 -0
  35. package/dist/sig.js +154 -0
  36. package/dist/sig.js.map +1 -0
  37. package/dist/types.d.ts +21 -3
  38. package/dist/types.d.ts.map +1 -1
  39. package/dist/verdict.d.ts +1 -1
  40. package/dist/verdict.d.ts.map +1 -1
  41. package/dist/verdict.js +17 -2
  42. package/dist/verdict.js.map +1 -1
  43. package/dist-web/verify.html +159 -0
  44. package/package.json +8 -3
  45. package/src/__tests__/check.test.ts +417 -0
  46. package/src/__tests__/fixtures/export-random-043/ethereum-anchors/anchor-after-witness.json +6 -0
  47. package/src/__tests__/fixtures/export-random-043/ethereum-anchors/anchor-after.json +43 -0
  48. package/src/__tests__/fixtures/export-random-043/ethereum-anchors/anchor-before-witness.json +6 -0
  49. package/src/__tests__/fixtures/export-random-043/ethereum-anchors/anchor-before.json +47 -0
  50. package/src/__tests__/fixtures/export-random-043/proof.json +38 -0
  51. package/src/__tests__/fixtures/export-random-043/random-043.txt +1 -0
  52. package/src/__tests__/sig-v2.test.ts +315 -0
  53. package/src/check.ts +873 -0
  54. package/src/cli.ts +82 -16
  55. package/src/evaluate.ts +107 -2
  56. package/src/index.ts +9 -2
  57. package/src/play.ts +43 -5
  58. package/src/rule.ts +93 -9
  59. package/src/sig.ts +170 -0
  60. package/src/types.ts +21 -4
  61. package/src/verdict.ts +18 -2
package/README.md CHANGED
@@ -25,6 +25,33 @@ folders the BitGraph Folder writes). Exit codes: `0` TRUE, `1` FALSE,
25
25
  `2` UNDETERMINED, `3` error. `--out file` writes the verdict to a file;
26
26
  `--summary` prints a bundle reconnaissance to stderr.
27
27
 
28
+ ## Check a bundle
29
+
30
+ bitgraph-play check "BitGraph (photo.jpg)/"
31
+ bitgraph-play check proof.json photo.jpg --json
32
+
33
+ No rule needed. `check` reads an export (a folder or archive, or a
34
+ proof.json beside the file it records) and says, offline, what the bundle
35
+ establishes about each recording in it: that the file in hand hashes to
36
+ the recorded digest, that the Ed25519 signature and slot binding verify,
37
+ that the AWS Nitro attestation validates to the AWS root and binds this
38
+ exact proof, that the attested PCR0 is a published BitGraph enclave
39
+ measurement, and, from block headers in the bundle, which Ethereum blocks
40
+ the recording sits between. Every line is TRUE, FALSE, or UNDETERMINED:
41
+ FALSE only when evidence in hand contradicts the recording (an edited
42
+ signature, a block header that does not hash to its anchor), UNDETERMINED
43
+ when the evidence does not decide (the file is not in the bundle, a
44
+ witness is missing). Absence is never a verdict. The report ends with what
45
+ no offline check can establish, stated rather than implied. `--json`
46
+ prints the `bitgraph-check/1` report; exit codes match evaluation.
47
+
48
+ The same check runs in a browser: `verify.html`, built from this package,
49
+ ships inside the BitGraph Folder, beside Recordings. Open it and choose or
50
+ drop a recording folder, offline, and it renders the same report from the
51
+ same code. It is not hosted anywhere: the site's own drop box checks a file
52
+ against the public ledger, and a second box that could only say
53
+ "self-consistent" would be two boxes with different meanings.
54
+
28
55
  ## Start a rule
29
56
 
30
57
  bitgraph-play init po.pdf delivery.jpg approval.pdf --out rule.json
@@ -123,6 +150,19 @@ const verdict = buildVerdict(rule, ruleSha256Hex, resolutions, evaluation, audit
123
150
  process.stdout.write(serializeVerdict(verdict));
124
151
  ```
125
152
 
153
+ `check` is exported the same way, in two halves that the CLI and the
154
+ browser page share:
155
+
156
+ ```ts
157
+ import { ingestBundle, ingestEntries } from "@mikeargento/bitgraph-audit";
158
+ import { checkIngest, renderCheckText } from "@mikeargento/bitgraph-player";
159
+
160
+ const report = await checkIngest(await ingestBundle("BitGraph (photo.jpg)/"));
161
+ // or, from bytes already in hand (a browser drop):
162
+ // await checkIngest(await ingestEntries([{ path: "proof.json", open: () => bytes }]));
163
+ process.stdout.write(renderCheckText(report));
164
+ ```
165
+
126
166
  ## License
127
167
 
128
168
  MIT. Verification and evaluation are permissionless by design.
package/SPEC.md CHANGED
@@ -1,7 +1,10 @@
1
- # BitGraph Player specification, version 1
1
+ # BitGraph Player specification
2
2
 
3
- This document is the normative semantics of `bitgraph-player/1` rules and
4
- `bitgraph-player-verdict/1` verdicts. The TypeScript package in this
3
+ This document is the normative semantics of `bitgraph-player/1` and
4
+ `bitgraph-player/2` rules and their verdicts (`bitgraph-player-verdict/1`
5
+ and `/2`). Sections 1 through 8 define format 1; section 9 defines the
6
+ format 2 extension. A format 1 rule MUST evaluate identically under an
7
+ evaluator that also implements format 2, to the byte. The TypeScript package in this
5
8
  directory is the reference implementation; a conforming Player in any
6
9
  language MUST reach the same result and, for the serialization defined in
7
10
  section 7, the same bytes.
@@ -41,11 +44,12 @@ A rule is a JSON object with exactly these top-level fields:
41
44
 
42
45
  | field | required | value |
43
46
  |---|---|---|
44
- | `rule` | yes | the string `"bitgraph-player/1"` |
47
+ | `rule` | yes | `"bitgraph-player/1"`, or `"bitgraph-player/2"` (section 9) |
45
48
  | `id` | yes | non-empty string naming the rule |
46
49
  | `cast` | yes | object of at least one role (section 3) |
47
50
  | `world` | yes | the string `"closed"` (the only defined value) |
48
51
  | `requires` | yes | `{ "ordering": "hash-linked" \| "assumption-dependent" }` |
52
+ | `trustedKeys` | no | format 2 only (section 9.1) |
49
53
  | `claim` | yes | a claim (section 5) |
50
54
  | `then` | no | `{ "label": <non-empty string> }` |
51
55
 
@@ -234,6 +238,91 @@ bundle contents MUST be byte-identical.
234
238
  Diagnostics go to stderr. Stdout carries verdict bytes only.
235
239
 
236
240
  These requirements govern evaluation invocations. A command-line Player
237
- MAY offer authoring conveniences (such as rule scaffolding) as distinct
241
+ MAY offer authoring conveniences (such as rule scaffolding) and reading
242
+ conveniences (such as a bundle check that reports, in the three values,
243
+ what a bundle establishes about the recordings it holds) as distinct
238
244
  subcommands; those are outside this specification and MUST NOT change
239
- the behavior of evaluation invocations.
245
+ the behavior of evaluation invocations. The reference implementation's
246
+ `check` subcommand uses the same exit-code mapping as evaluation.
247
+
248
+ ## 9. Format 2: trustedKeys and signedBy
249
+
250
+ Format 2 (`"rule": "bitgraph-player/2"`) is format 1 plus signature
251
+ claims. Everything in sections 1 through 8 applies unchanged. Two
252
+ additions:
253
+
254
+ ### 9.1 trustedKeys
255
+
256
+ An optional top-level object naming keys the rule author trusts:
257
+
258
+ "trustedKeys": { "<name>": { "alg": "ed25519" | "es256",
259
+ "publicKey": "<base64>" } }
260
+
261
+ Key names obey the role-name grammar (at least one non-digit). For
262
+ `ed25519` the publicKey is the raw 32-byte key in standard base64 — the
263
+ spelling bitgraph/1 proofs use for signer keys. For `es256` (ECDSA P-256
264
+ over SHA-256) it is SPKI DER in base64.
265
+
266
+ The name-to-key binding is DECLARED trust: the verdict surfaces every
267
+ entry in `declared` as `{ assertion: "trusted-key", verifiedHere: false }`.
268
+ Player verifies signature MATH against the key material; that the key
269
+ belongs to the named party is the rule author's assertion, exactly like a
270
+ cast digest's `means`. SIGNED_BY remains not a BitGraph primitive:
271
+ format 2 does not change what the chain knows, only what a rule can
272
+ verify about supplied evidence.
273
+
274
+ ### 9.2 The bitgraph-sig/1 evidence file
275
+
276
+ A signature file is a JSON object:
277
+
278
+ { "sig": "bitgraph-sig/1", "over": <digest>, "alg": <alg>,
279
+ "publicKey": <base64>, "signature": <base64> }
280
+
281
+ `over` accepts the digest spellings of section 3. The signed message is
282
+ the UTF-8 bytes of:
283
+
284
+ "bitgraph-sig/1\n" + lowercase hex SHA-256 of the target bytes
285
+
286
+ Domain separation is deliberate: a signature made in any other protocol
287
+ over the same digest is not a bitgraph-sig. For `ed25519` the signature
288
+ is the raw 64-byte form, base64; for `es256` it is DER-encoded ECDSA,
289
+ base64, verified over SHA-256 of the message.
290
+
291
+ ### 9.3 The signedBy claim
292
+
293
+ { "signedBy": [<roleName>, <trustedKeyName>] }
294
+
295
+ Valid only in format 2. The key name MUST be declared in trustedKeys;
296
+ an unresolvable reference is a parse error. Semantics:
297
+
298
+ | situation | result |
299
+ |---|---|
300
+ | role not declared in the cast | UNDETERMINED |
301
+ | trusted key material not decodable | UNDETERMINED |
302
+ | a supplied evidence file parses as bitgraph-sig/1, its `over` decodes to the role's digest bytes, its alg and publicKey equal the trusted key's, and the signature verifies | TRUE |
303
+ | otherwise | UNDETERMINED |
304
+
305
+ **signedBy is TRUE or UNDETERMINED, never FALSE.** "This key never
306
+ signed these bytes" is a negative over an open world: signatures can
307
+ exist outside any bundle, so absence of one proves nothing, and
308
+ `not(signedBy(...))` is therefore permanently UNDETERMINED under the
309
+ section 1 tables. A malformed or non-verifying signature file is not
310
+ evidence and not an error.
311
+
312
+ The claim is about BITS, not occurrences: it evaluates against the
313
+ declared role digest whether or not the role resolved to a recording.
314
+ Signature claims carry no ordering tier and never contribute to
315
+ `weakestEvidence`; a signature file's own causal position, when it has
316
+ been recorded, is claimed with the ordinary ordering predicates over a
317
+ role declaring the signature file's digest.
318
+
319
+ ### 9.4 Evidence supply
320
+
321
+ Evaluation is a pure function; candidate signature bytes are an input.
322
+ A command-line Player evaluating a bundle MUST take as candidates every
323
+ bundle artifact that is matched to an observed proof and no larger than
324
+ 1,048,576 bytes, keyed by content hash; embedders MAY supply additional
325
+ candidates. Candidates are scanned in ascending content-hash order and
326
+ the first verifying file decides, so the verdict is deterministic for a
327
+ given evidence set. A format 2 verdict is `bitgraph-player-verdict/2`;
328
+ the serialization discipline of section 7 is unchanged.
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=check.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"check.test.d.ts","sourceRoot":"","sources":["../../src/__tests__/check.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,358 @@
1
+ // Copyright (c) 2024-2026 Mike Argento. Licensed under the MIT License. See LICENSE.
2
+ /**
3
+ * `check` tests.
4
+ *
5
+ * The real fixture is a genuine export from the production ledger: a
6
+ * 685-byte random text file, its proof (real Ed25519 signature, real AWS
7
+ * Nitro attestation, enclave v5 measurement), both bounding anchors, and
8
+ * both block-header witnesses. Copied verbatim from a BitGraph Folder
9
+ * export; read-only here, no ledger writes, no network.
10
+ *
11
+ * The parity test is the one that matters most: the same bundle ingested
12
+ * from disk (the CLI's path) and from memory (the browser page's path)
13
+ * must produce byte-identical reports, or the two fronts have drifted.
14
+ */
15
+ import { describe, it, before, after } from "node:test";
16
+ import * as assert from "node:assert/strict";
17
+ import { spawnSync } from "node:child_process";
18
+ import { cp, mkdtemp, readFile, rm, writeFile, readdir } from "node:fs/promises";
19
+ import { tmpdir } from "node:os";
20
+ import { join, relative } from "node:path";
21
+ import { fileURLToPath } from "node:url";
22
+ import { ingestBundle, ingestEntries } from "@mikeargento/bitgraph-audit";
23
+ import { buildCheckReport, checkIngest, renderCheckText, serializeCheckReport, KNOWN_ENCLAVE_MEASUREMENTS } from "../check.js";
24
+ import { PLAYER_VERSION } from "../verdict.js";
25
+ import { digestFor, makeAudit } from "./fixtures.js";
26
+ const FIXTURE = fileURLToPath(new URL("../../src/__tests__/fixtures/export-random-043", import.meta.url));
27
+ const CLI_PATH = fileURLToPath(new URL("../cli.js", import.meta.url));
28
+ async function walk(root, rel = "") {
29
+ const out = [];
30
+ const dir = rel === "" ? root : join(root, rel);
31
+ for (const entry of await readdir(dir, { withFileTypes: true })) {
32
+ const r = rel === "" ? entry.name : `${rel}/${entry.name}`;
33
+ if (entry.isDirectory())
34
+ out.push(...(await walk(root, r)));
35
+ else if (entry.isFile())
36
+ out.push(r);
37
+ }
38
+ return out;
39
+ }
40
+ async function memoryEntriesOf(root) {
41
+ const paths = await walk(root);
42
+ return paths.map((p) => ({
43
+ path: p,
44
+ open: () => readFile(join(root, ...p.split("/"))).then((b) => new Uint8Array(b)),
45
+ }));
46
+ }
47
+ /** Fill the audit sections makeAudit leaves empty so buildCheckReport can run over synthetic input. */
48
+ function complete(audit, overrides = {}) {
49
+ const a = audit;
50
+ return {
51
+ ...audit,
52
+ anomalies: { anomalies: [], divergences: [], boundaryEntryPoints: [] },
53
+ authorities: { groups: [], anomalies: [], sharedSignersAcrossEpochs: [] },
54
+ anchors: { anchors: [], metadataOnlyProofHashes: [], findings: [] },
55
+ witnesses: { outcomes: [], findings: [] },
56
+ attestations: {
57
+ records: [],
58
+ findings: [],
59
+ counts: {
60
+ proofsWithDeclaredMeasurement: 0,
61
+ proofsWithDocument: 0,
62
+ documentsValidated: 0,
63
+ documentsFailed: 0,
64
+ pcr0Matches: 0,
65
+ pcr0Mismatches: 0,
66
+ userDataBound: 0,
67
+ userDataUnbound: 0,
68
+ },
69
+ },
70
+ ...(a["temporal"] !== undefined ? {} : {}),
71
+ ...overrides,
72
+ };
73
+ }
74
+ describe("check: real export fixture (disk)", () => {
75
+ let report;
76
+ before(async () => {
77
+ report = await checkIngest(await ingestBundle(FIXTURE));
78
+ });
79
+ it("is TRUE end to end: file, signature, attestation, enclave, both anchors, both witnesses", () => {
80
+ assert.equal(report.check, "bitgraph-check/1");
81
+ assert.equal(report.result, "TRUE");
82
+ assert.equal(report.recordings.length, 1);
83
+ assert.equal(report.anchors.length, 2);
84
+ const rec = report.recordings[0];
85
+ assert.equal(rec.result, "TRUE");
86
+ assert.equal(rec.filePath, "random-043.txt");
87
+ assert.deepEqual(rec.lines.map((l) => [l.name, l.result]), [
88
+ ["file", "TRUE"],
89
+ ["signature", "TRUE"],
90
+ ["attestation", "TRUE"],
91
+ ["enclave", "TRUE"],
92
+ ]);
93
+ for (const anchor of report.anchors) {
94
+ assert.equal(anchor.result, "TRUE");
95
+ assert.deepEqual(anchor.lines.map((l) => [l.name, l.result]), [
96
+ ["signature", "TRUE"],
97
+ ["witness", "TRUE"],
98
+ ]);
99
+ }
100
+ assert.equal(report.contradictions.length, 0);
101
+ });
102
+ it("brackets the recording between the two verified block headers", () => {
103
+ const b = report.recordings[0].bounds;
104
+ assert.equal(b.status, "bracketed");
105
+ assert.equal(b.notBefore?.blockNumber, "25735831");
106
+ assert.equal(b.notAfter?.blockNumber, "25735832");
107
+ assert.match(b.detail, /after Ethereum block 25735831 and before block 25735832/);
108
+ });
109
+ it("orders anchors by causal position, not file name", () => {
110
+ assert.deepEqual(report.anchors.map((a) => a.blockNumber), ["25735831", "25735832"]);
111
+ assert.equal(report.anchors[0].witnessPath, "ethereum-anchors/anchor-before-witness.json");
112
+ });
113
+ it("names the excerpt gaps as notes, never as verdicts", () => {
114
+ assert.ok(report.notes.some((n) => /causal positions? between the earliest and latest recording/.test(n)));
115
+ assert.ok(report.notes.some((n) => /link(s)? to a predecessor that is not in this bundle/.test(n)));
116
+ assert.equal(report.contradictions.length, 0);
117
+ });
118
+ it("states what it cannot check", () => {
119
+ assert.ok(report.notChecked.some((n) => /canonical/.test(n)));
120
+ assert.ok(report.notChecked.some((n) => /ledger/.test(n)));
121
+ assert.equal(report.network, "none");
122
+ assert.equal(report.evaluator.version, PLAYER_VERSION);
123
+ });
124
+ it("recognizes the enclave v5 measurement from PINS.md", () => {
125
+ const enclave = report.recordings[0].lines.find((l) => l.name === "enclave");
126
+ assert.match(enclave.detail, /enclave v5/);
127
+ assert.equal(KNOWN_ENCLAVE_MEASUREMENTS.length, 4);
128
+ });
129
+ it("serializes deterministically: no timestamps, no machine paths", async () => {
130
+ const again = await checkIngest(await ingestBundle(FIXTURE));
131
+ assert.equal(serializeCheckReport(again), serializeCheckReport(report));
132
+ const bytes = serializeCheckReport(report);
133
+ assert.ok(!bytes.includes(FIXTURE), "report must not contain the machine path");
134
+ assert.ok(!bytes.includes("startedAt"));
135
+ assert.ok(renderCheckText(report).startsWith("TRUE: this file was recorded at position 1576"));
136
+ });
137
+ });
138
+ describe("check: disk and memory ingest produce byte-identical reports (the no-drift guarantee)", () => {
139
+ it("ingestEntries over the same files equals ingestBundle over the directory", async () => {
140
+ const fromDisk = await checkIngest(await ingestBundle(FIXTURE));
141
+ const fromMemory = await checkIngest(await ingestEntries(await memoryEntriesOf(FIXTURE)));
142
+ assert.equal(serializeCheckReport(fromMemory), serializeCheckReport(fromDisk));
143
+ assert.equal(fromMemory.result, "TRUE");
144
+ });
145
+ it("memory ingest tolerates any supply order (entries are sorted by path)", async () => {
146
+ const entries = await memoryEntriesOf(FIXTURE);
147
+ const reversed = [...entries].reverse();
148
+ const a = await checkIngest(await ingestEntries(entries));
149
+ const b = await checkIngest(await ingestEntries(reversed));
150
+ assert.equal(serializeCheckReport(a), serializeCheckReport(b));
151
+ });
152
+ it("memory ingest accepts whole bytes, promises, and chunk streams alike", async () => {
153
+ const paths = await walk(FIXTURE);
154
+ const entries = [];
155
+ for (const [i, p] of paths.entries()) {
156
+ const bytes = new Uint8Array(await readFile(join(FIXTURE, ...p.split("/"))));
157
+ const open = i % 3 === 0
158
+ ? () => bytes
159
+ : i % 3 === 1
160
+ ? () => Promise.resolve(bytes)
161
+ : () => (async function* () {
162
+ const half = Math.floor(bytes.length / 2);
163
+ yield bytes.subarray(0, half);
164
+ yield bytes.subarray(half);
165
+ })();
166
+ entries.push({ path: p, open });
167
+ }
168
+ const report = await checkIngest(await ingestEntries(entries));
169
+ assert.equal(report.result, "TRUE");
170
+ });
171
+ });
172
+ describe("check: what evidence in hand contradicts, and what it merely leaves open", () => {
173
+ let dir;
174
+ before(async () => {
175
+ dir = await mkdtemp(join(tmpdir(), "bitgraph-check-"));
176
+ });
177
+ after(async () => {
178
+ await rm(dir, { recursive: true, force: true });
179
+ });
180
+ async function copyFixture(name) {
181
+ const dest = join(dir, name);
182
+ await cp(FIXTURE, dest, { recursive: true });
183
+ return dest;
184
+ }
185
+ it("an edited file is UNDETERMINED (not FALSE) with a note naming it: absence is not a verdict", async () => {
186
+ const d = await copyFixture("edited");
187
+ const p = join(d, "random-043.txt");
188
+ await writeFile(p, Buffer.concat([await readFile(p), Buffer.from("x")]));
189
+ const report = await checkIngest(await ingestBundle(d));
190
+ assert.equal(report.result, "UNDETERMINED");
191
+ const file = report.recordings[0].lines.find((l) => l.name === "file");
192
+ assert.equal(file.result, "UNDETERMINED");
193
+ assert.ok(report.notes.some((n) => /random-043\.txt/.test(n) && /bytes differ/.test(n)));
194
+ // Everything else about the recording still holds.
195
+ assert.equal(report.recordings[0].lines.find((l) => l.name === "signature").result, "TRUE");
196
+ assert.equal(report.recordings[0].lines.find((l) => l.name === "attestation").result, "TRUE");
197
+ });
198
+ it("a tampered signature is FALSE", async () => {
199
+ const d = await copyFixture("badsig");
200
+ const p = join(d, "proof.json");
201
+ const proof = JSON.parse(await readFile(p, "utf8"));
202
+ const sig = Buffer.from(proof.signer.signatureB64, "base64");
203
+ sig[0] = sig[0] ^ 1;
204
+ proof.signer.signatureB64 = sig.toString("base64");
205
+ await writeFile(p, JSON.stringify(proof));
206
+ const report = await checkIngest(await ingestBundle(d));
207
+ assert.equal(report.result, "FALSE");
208
+ assert.equal(report.recordings[0].lines.find((l) => l.name === "signature").result, "FALSE");
209
+ assert.match(report.summary, /^FALSE/);
210
+ });
211
+ it("a tampered block header is FALSE on that anchor, and the bound it gave is withdrawn", async () => {
212
+ const d = await copyFixture("badwitness");
213
+ const p = join(d, "ethereum-anchors", "anchor-after-witness.json");
214
+ const w = JSON.parse(await readFile(p, "utf8"));
215
+ const h = w.headerRlpHex;
216
+ w.headerRlpHex = h.slice(0, -2) + (h.slice(-2) === "00" ? "11" : "00");
217
+ await writeFile(p, JSON.stringify(w));
218
+ const report = await checkIngest(await ingestBundle(d));
219
+ assert.equal(report.result, "FALSE");
220
+ const after = report.anchors.find((a) => a.blockNumber === "25735832");
221
+ assert.equal(after.lines.find((l) => l.name === "witness").result, "FALSE");
222
+ assert.equal(report.recordings[0].result, "TRUE", "the recording itself is still sound");
223
+ assert.equal(report.recordings[0].bounds.status, "lower-bounded");
224
+ });
225
+ it("proof plus file with no anchors is TRUE and unanchored", async () => {
226
+ const entries = ["proof.json", "random-043.txt"].map((name) => ({
227
+ path: name,
228
+ open: () => readFile(join(FIXTURE, name)).then((b) => new Uint8Array(b)),
229
+ }));
230
+ const report = await checkIngest(await ingestEntries(entries));
231
+ assert.equal(report.result, "TRUE");
232
+ assert.equal(report.recordings[0].bounds.status, "unanchored");
233
+ assert.equal(report.anchors.length, 0);
234
+ assert.match(report.summary, /with no Ethereum bound in this bundle/);
235
+ });
236
+ it("proof alone (no file) is UNDETERMINED: signature and attestation hold, binding to bytes does not", async () => {
237
+ const entries = [
238
+ { path: "proof.json", open: () => readFile(join(FIXTURE, "proof.json")).then((b) => new Uint8Array(b)) },
239
+ ];
240
+ const report = await checkIngest(await ingestEntries(entries));
241
+ assert.equal(report.result, "UNDETERMINED");
242
+ const rec = report.recordings[0];
243
+ assert.equal(rec.lines.find((l) => l.name === "file").result, "UNDETERMINED");
244
+ assert.equal(rec.lines.find((l) => l.name === "signature").result, "TRUE");
245
+ assert.equal(rec.filePath, undefined);
246
+ });
247
+ it("without WebCrypto the attestation is UNDETERMINED with the reason, never FALSE", async () => {
248
+ const report = await checkIngest(await ingestBundle(FIXTURE), { webCryptoAvailable: false });
249
+ const rec = report.recordings[0];
250
+ assert.equal(rec.lines.find((l) => l.name === "attestation").result, "UNDETERMINED");
251
+ assert.match(rec.lines.find((l) => l.name === "attestation").detail, /WebCrypto/);
252
+ assert.equal(rec.lines.find((l) => l.name === "enclave").result, "UNDETERMINED");
253
+ assert.equal(report.result, "UNDETERMINED");
254
+ });
255
+ it("an empty bundle is UNDETERMINED and says so", async () => {
256
+ const report = await checkIngest(await ingestEntries([]));
257
+ assert.equal(report.result, "UNDETERMINED");
258
+ assert.match(report.summary, /no BitGraph proofs were found/);
259
+ });
260
+ });
261
+ describe("check: synthetic audit shapes", () => {
262
+ it("an unknown PCR0 is UNDETERMINED (outside this verifier's knowledge), never FALSE", () => {
263
+ const audit = complete(makeAudit({
264
+ proofs: [{ name: "a", digestB64: digestFor("a"), epochId: "E", counter: "5", slotCounter: "4" }],
265
+ partitions: [{ epochId: "E", members: ["a"] }],
266
+ }));
267
+ audit.attestations.records.push({
268
+ proofHash: "proofhash-a",
269
+ declaredMeasurementPresent: true,
270
+ declaredMeasurement: "ff".repeat(48),
271
+ documentPresent: true,
272
+ attestationFormat: "aws-nitro",
273
+ documentValidated: true,
274
+ checks: [],
275
+ attestedPcr0: "ff".repeat(48),
276
+ pcr0MatchesDeclared: true,
277
+ userDataBoundToProof: true,
278
+ });
279
+ const report = buildCheckReport(audit);
280
+ const rec = report.recordings[0];
281
+ assert.equal(rec.lines.find((l) => l.name === "attestation").result, "TRUE");
282
+ const enclave = rec.lines.find((l) => l.name === "enclave");
283
+ assert.equal(enclave.result, "UNDETERMINED");
284
+ assert.match(enclave.detail, /not among the BitGraph enclave measurements this verifier knows/);
285
+ assert.equal(report.result, "UNDETERMINED");
286
+ });
287
+ it("an attestation bound to some other proof is FALSE", () => {
288
+ const audit = complete(makeAudit({
289
+ proofs: [{ name: "a", digestB64: digestFor("a"), epochId: "E", counter: "5" }],
290
+ partitions: [{ epochId: "E", members: ["a"] }],
291
+ }));
292
+ audit.attestations.records.push({
293
+ proofHash: "proofhash-a",
294
+ declaredMeasurementPresent: true,
295
+ documentPresent: true,
296
+ documentValidated: true,
297
+ checks: [],
298
+ attestedPcr0: KNOWN_ENCLAVE_MEASUREMENTS[3].pcr0,
299
+ pcr0MatchesDeclared: true,
300
+ userDataBoundToProof: false,
301
+ });
302
+ const report = buildCheckReport(audit);
303
+ assert.equal(report.recordings[0].lines.find((l) => l.name === "attestation").result, "FALSE");
304
+ assert.equal(report.result, "FALSE");
305
+ });
306
+ it("structural contradictions surface as FALSE while excerpt gaps stay notes", () => {
307
+ const audit = complete(makeAudit({
308
+ proofs: [
309
+ { name: "a", digestB64: digestFor("a"), epochId: "E", counter: "5" },
310
+ { name: "b", digestB64: digestFor("b"), epochId: "E", counter: "5" },
311
+ ],
312
+ partitions: [{ epochId: "E", members: ["a", "b"] }],
313
+ }));
314
+ audit.anomalies.anomalies.push({ code: "unexplained-counter-positions", proofHashes: [], message: "gap", details: { count: "3", ranges: [], positions: [], truncated: false } }, { code: "chain-break-missing", proofHashes: ["proofhash-a"], message: "missing pred", details: {} }, { code: "counter-collision", proofHashes: ["proofhash-a", "proofhash-b"], message: "two commits at position 5" });
315
+ const report = buildCheckReport(audit);
316
+ assert.equal(report.contradictions.length, 1);
317
+ assert.match(report.contradictions[0].detail, /^counter-collision/);
318
+ assert.ok(report.notes.some((n) => /3 causal positions/.test(n)));
319
+ assert.equal(report.result, "FALSE");
320
+ });
321
+ });
322
+ describe("check: CLI", () => {
323
+ it("prints the human report and exits 0 on the real fixture", () => {
324
+ const r = spawnSync(process.execPath, [CLI_PATH, "check", FIXTURE], { encoding: "utf8" });
325
+ assert.equal(r.status, 0, r.stderr);
326
+ assert.match(r.stdout, /^TRUE: this file was recorded at position 1576/);
327
+ assert.match(r.stdout, /Result: TRUE/);
328
+ });
329
+ it("--json prints the bitgraph-check/1 report", () => {
330
+ const r = spawnSync(process.execPath, [CLI_PATH, "check", FIXTURE, "--json"], { encoding: "utf8" });
331
+ assert.equal(r.status, 0, r.stderr);
332
+ const parsed = JSON.parse(r.stdout);
333
+ assert.equal(parsed.check, "bitgraph-check/1");
334
+ assert.equal(parsed.result, "TRUE");
335
+ });
336
+ it("accepts a list of files and ingests them in memory", () => {
337
+ const r = spawnSync(process.execPath, [CLI_PATH, "check", join(FIXTURE, "proof.json"), join(FIXTURE, "random-043.txt")], { encoding: "utf8" });
338
+ assert.equal(r.status, 0, r.stderr);
339
+ assert.match(r.stdout, /no Ethereum bound in this bundle/);
340
+ });
341
+ it("exits 2 for UNDETERMINED (proof alone) and 3 for a missing path", () => {
342
+ const u = spawnSync(process.execPath, [CLI_PATH, "check", join(FIXTURE, "proof.json")], { encoding: "utf8" });
343
+ assert.equal(u.status, 2, u.stderr);
344
+ const e = spawnSync(process.execPath, [CLI_PATH, "check", join(FIXTURE, "does-not-exist")], { encoding: "utf8" });
345
+ assert.equal(e.status, 3);
346
+ assert.match(e.stderr, /cannot read bundle/);
347
+ });
348
+ it("evaluate and init reject --json (it belongs to check only)", () => {
349
+ const r = spawnSync(process.execPath, [CLI_PATH, "init", join(FIXTURE, "random-043.txt"), "--json"], { encoding: "utf8" });
350
+ assert.equal(r.status, 3);
351
+ assert.match(r.stderr, /usage:/);
352
+ });
353
+ it("the relative path helper is unused by the report (paths are bundle-relative only)", () => {
354
+ // Guard against a future report field leaking absolute paths.
355
+ assert.equal(relative(FIXTURE, join(FIXTURE, "proof.json")), "proof.json");
356
+ });
357
+ });
358
+ //# sourceMappingURL=check.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"check.test.js","sourceRoot":"","sources":["../../src/__tests__/check.test.ts"],"names":[],"mappings":"AAAA,qFAAqF;AAErF;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM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