Skip to content

feat: add VERUM-aligned audit trail with hash-chained score records#53

Merged
hummbl-dev merged 1 commit into
mainfrom
feat/claude/audit-trail
Apr 19, 2026
Merged

feat: add VERUM-aligned audit trail with hash-chained score records#53
hummbl-dev merged 1 commit into
mainfrom
feat/claude/audit-trail

Conversation

@hummbl-dev
Copy link
Copy Markdown
Owner

Summary

Append-only, SHA-256 hash-chained audit trail aligned with HUMMBL's VERUM primitive:

  • Every score is an immutable, verifiable record
  • Hash chain detects tampering (recompute + verify linkage)
  • VERUM invariants: append-only, minimal operators, external analysis
  • CLI: arbiter audit-trail score|list|verify

Usage

arbiter audit-trail score --repo /path/to/repo   # score + record
arbiter audit-trail list                           # show all records
arbiter audit-trail verify                         # check chain integrity

Test plan

  • Append creates record with hash
  • Chain links (prev_hash)
  • Verify passes on clean chain
  • Verify detects tampering
  • Timestamps in ISO format
  • Persistence across instances

🤖 Generated with Claude Code

Append-only, SHA-256 hash-chained JSONL audit trail for every
Arbiter score. Aligns with HUMMBL's VERUM sovereignty primitive:

- Invariant 1: append-only (no delete, no update)
- Invariant 3: minimal operators (append + read_all + verify)
- Invariant 4: external analysis only

Chain verification detects tampering — if any record is modified,
verify_chain() returns False.

CLI: arbiter audit-trail score/list/verify

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@hummbl-dev hummbl-dev merged commit 6929525 into main Apr 19, 2026
3 checks passed
@hummbl-dev hummbl-dev deleted the feat/claude/audit-trail branch April 19, 2026 02:06
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ad35d93e32

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/arbiter/__main__.py

elif args.action == "score":
# Score a repo and append to audit trail
repo_path = Path(args.repo).resolve()
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Guard score action when --repo is missing

The audit-trail score path unconditionally does Path(args.repo).resolve(), but --repo is optional in the parser, so invoking arbiter audit-trail score without --repo raises a TypeError traceback instead of a normal CLI validation error. This is a user-facing crash on a validly parsed command; add explicit validation for args.repo in the score branch (or make it required for that action).

Useful? React with 👍 / 👎.

line = line.strip()
if not line:
continue
data = json.loads(line)
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Handle invalid JSON lines as verification failure

read_all() directly calls json.loads(line) without error handling, so a malformed or partially written line causes audit-trail verify to crash with JSONDecodeError before verify_chain can report tampering. In practice this means corrupted audit files produce an exception instead of a clean failed verification result, which breaks the integrity-check workflow.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant