Repository navigation
Correct the docket contract and policy keys in the docs - #16
Merged
Merged
Conversation
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(-)
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.
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 acrosssrc/andvisibility.tomlreturns nothing.VisibilityPolicy(src/visibility.rs:18) declaresprivate_paths,private_branches,embargo_until,embargo_recipients,resign_key_id. Neither struct setsdeny_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 isdetail, 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>andscope: <areas touched>. The renderer emitsvisibility: {n} private path(s), and only when the count is above zero (src/dispute.rs:216-221). It emitsintent:(src/dispute.rs:223), notscope:.scopesurvives 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
.intentacrosssrc/engine/andsrc/policy.rsreturns 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
adjudicatedand everything else nonzero so CI can gate on it. True foradjudicate, but--docket(src/main.rs:268-272) andoot docket(src/main.rs:771-776) returnExitCode::SUCCESSwhatever the stored verdict. Scoped the claim toadjudicate.Verification
cargo fmt --all -- --check→ clean, exit 0.CI verdict for fmt, clippy, tests, build and the dogfood adjudication job comes from this PR.
Not shipped
README.md:60describes--docketexiting 0. Making it propagate the stored verdict is a behavior change and needs the owner's call, so it is documented rather than changed.