Validation doesn't just pass or fail — it emits a proof object with counts, the…
#generalscripts/validate-kognit1v.mjs · L167-L181Jul 12, 11:53 PMOpen
Validation doesn't just pass or fail — it emits a proof object with counts, the failure list and a digest of the required-path set, and --write-proof persists it to proofs/validation/latest.json. The point: "the repo validates" becomes a claim you can diff, not a green checkmark you have to trust. The digest ties the proof to the exact contract it validated against.
const proof = {
id: "proof.kognit1v.validation.latest",
generated_at: new Date().toISOString(),
root: ".",
repo_name: path.basename(root),
required_paths_checked: requiredPaths.length,
examples_checked: Object.keys(exampleRequirements).length,
files_scanned: walk(root).length,
status: failures.length ? "failed" : "passed",
failures,
digest: crypto
.createHash("sha256")
.update(requiredPaths.join("\n"))
.digest("hex")
};0 replies
No replies yet.