Skip to content

Correct the docket contract and policy keys in the docs - #16

Merged
kridaydave merged 1 commit into
mainfrom
k5/pass-oot-doc-contract
Oct 6, 2026
Merged

kridaydave merged 1 commit into
mainfrom
k5/pass-oot-doc-contract

Conversation

@kridaydave

Copy link
Copy Markdown
Contributor

Problem

Five statements in README.md and CONTRIBUTING.md contradict the code. Each fix below quotes the source it replaces. No code changed.

What was wrong

Policy schema named wrong. README.md:23 and CONTRIBUTING.md:15 described the policy schema as private-to, embargo-until, public. Grep for all three across src/ and visibility.toml returns nothing. VisibilityPolicy (src/visibility.rs:18) declares private_paths, private_branches, embargo_until, embargo_recipients, resign_key_id. Neither struct sets deny_unknown_fields, so a policy file written from the README parses into the serde defaults and reads as enforcement while doing nothing. Replaced with the real key names.

Dispute field count wrong. CONTRIBUTING.md:51 said four fields. Dispute (src/dispute.rs:44-55) has five. The omitted one is detail, which is the only human-readable field the docket actually prints.

Docket contract block wrong. CONTRIBUTING.md:41-42 listed visibility: <private paths>, <embargoed until date> and scope: <areas touched>. The renderer emits visibility: {n} private path(s), and only when the count is above zero (src/dispute.rs:216-221). It emits intent: (src/dispute.rs:223), not scope:. scope survives only as a serde deserialize alias for older files, so nothing Oot writes today produces it. The embargo date goes on its own line (src/dispute.rs:269-271). The README sample docket at README.md:38-57 already matched the renderer exactly, which is what the contract block should have said.

Intent claim overstated. README.md:24 said "We check semantic disputes against this" and :25 said two changes "clash on intent". Nothing reads intent for comparison. Grep for .intent across src/engine/ and src/policy.rs returns nothing; finalize_adjudication (src/dispute.rs:118) only falls back to the touched-path list for display. Reworded to describe what actually happens.

Exit code claim too broad. README.md:60 said exit 0 is adjudicated and everything else nonzero so CI can gate on it. True for adjudicate, but --docket (src/main.rs:268-272) and oot docket (src/main.rs:771-776) return ExitCode::SUCCESS whatever the stored verdict. Scoped the claim to adjudicate.

Verification

  • cargo fmt --all -- --check → clean, exit 0.
  • README sample docket lines 38-57 diffed against src/dispute.rs:205-274 → matches, which is the independent check that the contract block was the drifted half.
  • Every one of the five claims was re-verified against source after editing.

CI verdict for fmt, clippy, tests, build and the dogfood adjudication job comes from this PR.

CONTRIBUTING.md | 8 ++++----
README.md       | 6 +++---
2 files changed, 8 insertions(+), 8 deletions(-)

Not shipped

  • README.md:60 describes --docket exiting 0. Making it propagate the stored verdict is a behavior change and needs the owner's call, so it is documented rather than changed.

Five doc claims contradicted by the code. Each correction quotes the
source it replaces.

README.md:23 and CONTRIBUTING.md:15 named the policy schema as
`private-to`, `embargo-until`, `public`. None of those keys exist.
VisibilityPolicy (src/visibility.rs:18) declares `private_paths`,
`private_branches`, `embargo_until`, `embargo_recipients` and
`resign_key_id`. Neither struct sets deny_unknown_fields, so a policy
file written from the README parses into defaults and reads as
enforcement while doing nothing. Replaced with the real key names.

CONTRIBUTING.md:51 said a dispute has four fields. Dispute
(src/dispute.rs:44) has five; the fifth, `detail`, is the one the docket
prints.

The contract block in CONTRIBUTING.md:41-42 listed `visibility: <private
paths>, <embargoed until date>` and `scope: <areas touched>`. The
renderer emits `visibility: {n} private path(s)` only when the count is
above zero (src/dispute.rs:216-221) and `intent:` (src/dispute.rs:223).
`scope` survives only as a deserialize alias for old files, so nothing
Oot writes today produces it. The embargo date goes on its own line
(src/dispute.rs:269-271). The README sample docket at README.md:38-57
already matched the renderer, which is what the contract block should
have said.

README.md:24 and :25 claimed Oot checks semantic disputes against the
declared intent. Nothing reads intent for comparison: grep for `.intent`
across src/engine/ and src/policy.rs returns nothing, and
finalize_adjudication (src/dispute.rs:118) just falls back to the
touched-path list for display. Reworded to describe what it does.

README.md:60 said exit 0 is adjudicated and everything else nonzero so
CI can gate on it. True for `adjudicate`, but `--docket`
(src/main.rs:268-272) and `oot docket` (src/main.rs:771-776) return
SUCCESS whatever the stored verdict. Scoped the claim.

README.md  | 6 +++---
CONTRIBUTING.md | 8 ++++----
2 files changed, 8 insertions(+), 8 deletions(-)
@kridaydave
kridaydave merged commit 77de727 into main Oct 6, 2026
6 of 10 checks passed
@kridaydave
kridaydave deleted the k5/pass-oot-doc-contract branch October 6, 2026 03:03
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