Skip to content

docs(pg-ledger): two-tier value-bearing provenance ledger design + governed playbook - #229

Merged
rhCat merged 1 commit into
mainfrom
docs/pg-provenance-ledger
Jul 22, 2026
Merged

docs(pg-ledger): two-tier value-bearing provenance ledger design + governed playbook#229
rhCat merged 1 commit into
mainfrom
docs/pg-provenance-ledger

Conversation

@rhCat

@rhCat rhCat commented Jul 22, 2026

Copy link
Copy Markdown
Owner

Summary

Design + governed playbook for a two-tier provenance ledger that makes each run's tool-use inspectable and reproducible without weakening cyberware's value-free wire/monitor.

  • tier 1 (value-free chain.jsonl) unchanged — stays the artifact of record and the only thing on the wire/monitor.
  • tier 2 (new): govd records the already-filtered var_values per step, envelope-encrypted at rest (recipient-set DEKs — node-only standalone, +mothership at fleet join), with values_sha committed into the tier-1 chain so inputs become tamper-evident.
  • govd is sole DB writer; exod gets no DSN (its authority is the signed envelope stored in-row).
  • standalone holds its own (sqlite run_values); PG sidecar + logical replication materialize only at fleet join; the mothership initiates the subscribe (= admission).
  • overlay ≠ authorization: bind the tailscale interface only, admission = registration + pg_hba cert + subscribe (each layer severs a node alone).
  • raw-bytes + JSONB dual columns (JSONB does not preserve hashable bytes).

Files

  • docs/pg-provenance-ledger.md — design (9 tested invariants, verified code anchors, crypto, M0–M3), matching the per-actor-acl-design.md house pattern.
  • docs/pg-provenance-ledger.playbook.json — the 25-task governed board (fires the validator gates against the working tree; the work is kernel edits, gated, not cws-addperk scaffolding).

Validation

Baseline governed dry-run via cws:cws-pm/run: 25/25 tasks validate structurally through govd.

🤖 Generated with Claude Code

…verned playbook

Design for a Postgres provenance ledger that makes runs inspectable and
reproducible without weakening the value-free wire/monitor:

- tier 1 (value-free chain) unchanged; tier 2 records the filtered var_values
  per step, envelope-encrypted at rest (recipient-set DEKs: node-only standalone,
  +mothership at fleet join), with values_sha committed into the tier-1 chain.
- govd sole DB writer; exod gets no DSN (authority = its signed envelope in-row).
- standalone holds its own (sqlite run_values); PG sidecar + logical replication
  only at fleet join; mothership INITIATES the subscribe (= admission).
- tailnet = reachability, not authorization: bind tailscale iface only, admission
  is registration + pg_hba cert + subscribe, each layer severs a node alone.
- raw-bytes + JSONB dual columns (JSONB does not preserve hash-able bytes).

Companion playbook (docs/pg-provenance-ledger.playbook.json) fires the validator
GATES (modelcheck/py_qc/mutate/sec/redteam/conform/chaos) against the working
tree — the work is kernel edits, gated, not cws-addperk scaffolding. Baseline
governed dry-run via cws:cws-pm/run: 25/25 validate structurally.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@rhCat
rhCat merged commit d861733 into main Jul 22, 2026
2 checks passed
@rhCat
rhCat deleted the docs/pg-provenance-ledger branch July 22, 2026 06:02
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