HUB
Sign inSign up
proofclaim logo

credkellar/proofclaim

By credkellar

β€’Updated 14 days ago

ProofClaim: claim verification lab - sha256 evidence, Merkle proofs, audit log, verdicts. Sim only!!

Image
Security
Machine learning & AI
Developer tools
1

180

credkellar/proofclaim repository overview

⁠ProofClaim πŸ§ΎπŸ”

Claim Verification & Evidence Proof Lab β€” by Darion Kellar

Educational claim-verification engine in ONE pure-Python file: a claim registry on a deterministic logical clock (no wall time), evidence items content-hashed with SHA-256 and combined into a from-scratch Merkle tree whose root is the claim's proof anchor, inclusion proofs that are generated and verified, a hash-chained audit log that detects its own rewrites, a labelled proof-scoring policy (primary document > measurement > testimony > hearsay; VERIFIED needs root match + β‰₯ 2 independent sources + the weight bar), and a from-scratch kNN claim classifier whose labels come from the verdict model itself.

Pure Python standard library. Zero dependencies. Zero network. Honest scope: this lab verifies INTERNAL CONSISTENCY only β€” that filed evidence still matches its hashes and proofs. It cannot prove a claim is true in the real world: a matching hash proves the evidence is the evidence that was filed, nothing more. Every legal / financial / court / identity / attestation use is a permanent HOLD gate (14 total).

⁠🐳 Quick start

docker pull credkellar/proofclaim:latest
docker run --rm credkellar/proofclaim:latest

The default command runs the full demo plus the built-in self-checks (CHECKS 43/43).

Run a specific command instead:

docker run --rm credkellar/proofclaim:latest python3 main.py checks   # CHECKS 43/43
docker run --rm credkellar/proofclaim:latest python3 main.py claims   # demo verdict book + scoring
docker run --rm credkellar/proofclaim:latest python3 main.py prove    # Merkle inclusion proof, one item
docker run --rm credkellar/proofclaim:latest python3 main.py verify   # verify the book / one claim
docker run --rm credkellar/proofclaim:latest python3 main.py log      # audit log + chain integrity
docker run --rm credkellar/proofclaim:latest python3 main.py classify # kNN claim classifier report
docker run --rm credkellar/proofclaim:latest python3 main.py holds    # 14 HOLD gates

β πŸ”¬ What's inside

  • Claim registry β€” claims with id, statement, claimant, and a logical-clock tick; lifecycle ASSERTED β†’ EVIDENCED β†’ VERIFIED / REFUTED / EXPIRED, every transition earned by verification, never typed in.
  • SHA-256 evidence hashing β€” each item is hashed over its canonical record; a one-character post-filing edit changes the digest and is named EVIDENCE_HASH_MISMATCH.
  • Merkle proof anchor β€” bundle leaves fold pairwise (sha256(left || right), odd node paired with itself) into one root, frozen at sealing; any later bundle change walks the root away from the anchor.
  • Inclusion proofs β€” any single evidence item can be proven against the sealed root from its sibling path alone; a forged leaf fails the fold.
  • Proof scoring β€” labelled source weights (primary 1.00, measurement 0.85, testimony 0.55, hearsay 0.25); VERIFIED requires root match, β‰₯ 2 independent sources (same source counts once), total weight β‰₯ 1.50, mean β‰₯ 0.50.
  • The demo verdict book β€” VERIFIED (archive + measurement, weight 1.85), REFUTED (a sealed reading quietly edited 0.62 β†’ 0.92, caught by hash), INSUFFICIENT (one testimony, one source), EXPIRED (calibration note past its tick window), plus a bare assertion.
  • Hash-chain audit log β€” genesis + 16 events, each carrying the previous hash; a mutated historical entry fails verification at its index with the reason named.
  • TinyML kNN classifier β€” likely-solid / shaky / baseless from (independent sources, mean weight, contradiction count); training labels generated by the verdict model itself.
  • Advisory seats β€” Gemini Argon 4 DECIDER (names-only, tighten-only, sha256 trace), Muse advisor (can never override HOLD), Google Flow plan-only (rendered = False, live = 0).

β βœ… Verified

  • pytest: 39 passed
  • Built-in checks: CHECKS 43/43
  • Deterministic: double-run byte-identical
  • Base image: python:3.12-slim

⁠🏷️ Categories

Security Β· Developer tools Β· Machine learning & AI

  • License: MIT Β© 2026 Darion Kellar
  • Image: credkellar/proofclaim:latest
Tag summary
Recent tags
Content type
Image
Digest
sha256:e43fb86e9…
Size
41.5 MB
Last updated
14 days ago
docker pull credkellar/proofclaim:latest