feat(recommend): expose production dispositions through a Verdicts seam - #47
Merged
Conversation
Verdicts reports what the production recommender actually reached, without running pkg/decision a second time — a second evaluation can diverge from the answer production gave. Disposition (recommended / never-observed / insufficient-history / no-significant-change) sits on a separate axis from VerdictState (not-computed / computed). decision.Verdict stays unexported so v.Decision.Action does not compile and a dropped comma-ok yields an empty Action matching no real action. On the wire verdictState is always emitted and the verdict object omitted; UnmarshalJSON re-derives state from presence, so a forged computed still decodes to not-computed. Nothing can set VerdictComputed today. checkNoDisagreement enforces the full biconditional over 200 seeded scenarios in both call orders, including the silent side, and fails if any disposition count hits zero. The random corpus does not land on 29 samples, so TestVerdictsAgreeAtEveryGateBoundary walks each gate across its exact threshold plus a 101-step sweep through churn suppression. 8 of 8 mutations caught, coverage 95.3%. recommend.go is unmodified. Co-authored-by: kording <74226694+kording@users.noreply.github.com>
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.
Verdicts reports what the production recommender actually reached, without
running pkg/decision a second time — a second evaluation can diverge from the
answer production gave.
Disposition (recommended / never-observed / insufficient-history /
no-significant-change) sits on a separate axis from VerdictState (not-computed /
computed). decision.Verdict stays unexported so v.Decision.Action does not
compile and a dropped comma-ok yields an empty Action matching no real action.
On the wire verdictState is always emitted and the verdict object omitted;
UnmarshalJSON re-derives state from presence, so a forged computed still decodes
to not-computed. Nothing can set VerdictComputed today.
checkNoDisagreement enforces the full biconditional over 200 seeded scenarios in
both call orders, including the silent side, and fails if any disposition count
hits zero. The random corpus does not land on 29 samples, so
TestVerdictsAgreeAtEveryGateBoundary walks each gate across its exact threshold
plus a 101-step sweep through churn suppression. 8 of 8 mutations caught,
coverage 95.3%. recommend.go is unmodified.