Wire the change store to the adjudication court - #7
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 :
read_blob,snapshot_from_tree(ls-tree -r -z then cat-file per blob), andresolve_change, which fails loudly on unknown ids and lists candidates on ambiguous prefixessrc/court.rsresolves head = the change's tree, base = FIRST parent tree, root = empty snapshot, and tags provenance[git]vs[oot]from source_sha.oot/:dockets/<change-id>.jsonholds the latest docket, overwritten per run;adjudications.jsonlis append-only audit, one line per runpolicy_keyfingerprints MeaningPolicy + VisibilityPolicy so a persisted docket records which rules produced it--changeengages 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)oot docket <id|prefix>renders a persisted docket;oot recordprints "next: oot adjudicate --change "Calls I made :
PersistedDocket) lives in court.rs rather than Store. Dockets are court business; Store stays bytes and records.oot logprints). The envelope's top-levelchangefield carries the full id, so anything referencing a docket can always resolve it.--authorsand--intentstill override when passed.snapshot_from_treeskips gitlinks (submodule pointers hold no content to judge) and reads symlinks as their target-path blob.resolve_changematches stored change ids only, not original commit shas in.oot/map.--merge_baseis 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_keyis 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.