Skip to content

Wire the change store to the adjudication court - #7

Merged
kridaydave merged 4 commits into
mainfrom
feat/store-court
Aug 23, 2026
Merged

Wire the change store to the adjudication court#7
kridaydave merged 4 commits into
mainfrom
feat/store-court

Conversation

@kridaydave

Copy link
Copy Markdown
Contributor

PR made by x-preview-f from opencode on behalf of Kriday.

The store kept history while the court only judged snapshots you handed it by hand. Now they talk: oot adjudicate --change <id> reads a stored change straight out of .oot/, judges it against its first parent, and files the verdict next to the history it describes. Nothing about existing adjudication modes changes, and ChangeRecord stays untouchable. Governance lives in sidecars.

Summary :

  • Store gains three reads: read_blob, snapshot_from_tree (ls-tree -r -z then cat-file per blob), and resolve_change, which fails loudly on unknown ids and lists candidates on ambiguous prefixes
  • New src/court.rs resolves head = the change's tree, base = FIRST parent tree, root = empty snapshot, and tags provenance [git] vs [oot] from source_sha
  • Sidecars under .oot/: dockets/<change-id>.json holds the latest docket, overwritten per run; adjudications.jsonl is append-only audit, one line per run
  • policy_key fingerprints MeaningPolicy + VisibilityPolicy so a persisted docket records which rules produced it
  • CLI: --change engages store mode only when a store opens, the id resolves, and no other mode flag was given; persistence is default with --no-save; exit codes unchanged (0 only Adjudicated)
  • New oot docket <id|prefix> renders a persisted docket; oot record prints "next: oot adjudicate --change "
  • Export coupling stays loose: dockets reference ids, the DAG never references dockets
  • Gate green: cargo fmt, clippy -D warnings, 131 tests across 14 suites including the new tests/adjudicate_store_test.rs

Calls I made :

  • The docket envelope (PersistedDocket) lives in court.rs rather than Store. Dockets are court business; Store stays bytes and records.
  • Inside the rendered docket, change/base/head show short ids (what oot log prints). The envelope's top-level change field carries the full id, so anything referencing a docket can always resolve it.
  • Authors default to the record's author name; --authors and --intent still override when passed.
  • snapshot_from_tree skips gitlinks (submodule pointers hold no content to judge) and reads symlinks as their target-path blob.
  • resolve_change matches stored change ids only, not original commit shas in .oot/map.
  • --merge_base is accepted but ignored in store mode since first-parent diff is the v1 rule; the spec did not list it among the excluding flags.
  • policy_key is FNV-1a hex over a labeled serialization of both policies. Any new policy field must join that string or stale keys will look equal; noted at the function.

@kridaydave
kridaydave merged commit 8d55362 into main Aug 23, 2026
5 checks passed
@kridaydave
kridaydave deleted the feat/store-court branch August 23, 2026 04:48
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