@pwngh/economy-lab
    Preparing search index...

    Function verifyAuditChain

    The ./ops entry point: an in-process supervisor over the lab's meter/logger ports. The dependency runs one way — ops imports the core, the core never imports ops (eslint enforces it) — and leaving the supervisor out of the composition is the off switch.

    The supervisor for the tier model, the signal path, and the per-signature runbooks.

    • Re-derives a hashChainedAuditSink trail: every line's hash must recompute over its own bytes and its prev must name the prior line's hash. The preimage is the literal line text minus its hash suffix, so verification needs no re-serialization to agree with the writer. Stops at the first break: count is how many records verified before it, and nothing after the break is checked. make audit-verify FILE=<jsonl> runs this over a trail file from the command line.

      Parameters

      • lines: readonly string[]
      • digest: Digest

      Returns Promise<AuditChainReport>

      const lines = trail.trimEnd().split('\n');
      const report = await verifyAuditChain(lines, ports.digest);
      if (!report.intact) {
      // e.g. { intact: false, firstBreak: { line: 7, reason: 'tampered-hash' }, count: 6 }
      }