Repository navigation
Conversation
A recommendation whose own requirement checks come back contradicted was kept as selected with only a warning string, so a caller reading recommendation.selected or status alone could act on a flagged candidate (jkudish#43). recommendation.contradicted_requirements now names the zero-based requirement indexes (the data contradictsRecommendation already computed), and the new optional escalate_on_contradiction input withdraws a contradicted recommendation as selected: null with status "escalate" (the jev_verify vocabulary) instead of the candidate id. Default behavior is unchanged; no re-selection ever happens, the probabilities stay inspectable.
Owner
|
Thank you — merged, with one docs amendment: escalation happens in addition to the warning, and the |
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.
Fixes #43. This includes the structural half of #44 (
recommendation.contradicted_requirements, same shape: zero-based requirement indexes fromcontradictsRecommendation) and adds the opt-in escalation half that issue left as a maintainer decision — happy to defer to #44 for the structural piece if that lands first.What
recommendation.contradicted_requirements: number[]now ships on everyjev_decideresult (empty when nothing contradicted,[]oninvalid_response), so the disagreement is structural, not a warning string.escalate_on_contradiction(defaultfalse, current behavior unchanged): when set, a recommendation whose own requirement checks came back contradicted returnsselected: nullwithstatus: "escalate"— thejev_verifyvocabulary — instead of the candidate id.probabilitiesandcontradicted_requirementsstay inspectable.Testing
npm run typecheck,npm run build,npm test: 245 tests. New coverage: default keepsselectedwith the structural array and the warning;escalate_on_contradictionwithdraws a contradicted pick without promoting the runner-up; the flag keeps a non-contradicted recommendation untouched (a contradiction on a different candidate never escalates).Docs
README
jev_decidesection: result example gains the field, and a bullet documents the flag and the no-re-selection rule.