Repository navigation
feat!: let kind answer other instead of a guessed kind - #442
Merged
Merged
Conversation
Contributor
|
Perch Scan: no issues in 71 methods at |
Contributor
There was a problem hiding this comment.
Perch found an issue in code this pull request changed. See the scan
| return { type: 'choice', name, instructions: text, choices: type === 'choice' && !Object.hasOwn(options, NONE) ? [...choices, { value: NONE, description: 'None of these fits' }] : choices }; | ||
| }), | ||
| }), | ||
| reply: ({ answers = [], ...rest }, { questions }) => { |
Contributor
There was a problem hiding this comment.
Fixed: the scan of 69ec8da no longer reports this.
P2 Defect: wrong return value (83%)
Perch believes DECISIONS.reply has this problem. It is a probability, not a located defect: the cause may sit a few lines away.
Check a fix with perch check src/systemone.js::DECISIONS.reply. See the scan
Contributor
There was a problem hiding this comment.
The scan of 69ec8da no longer reports this, so Perch marked it fixed. Resolve this thread when you are done with it. See the scan
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.
kind names which kind of bug a method has, from nine options. When none of them fit, a model had to pick one anyway: OpenAI's Decisions refused the question, and the none_of_these fallback added for it was spread over the nine, so the scan reported its best guess as the kind.
kind now has a tenth option, other, "A defect that none of the kinds above describes", for every model. On Decisions, a none_of_these answer on a choice that has other is taken as other, its share added to other's, instead of being spread over the rest. A choice without other still spreads it. A reply whose only share is none_of_these used to throw on an empty list; it is now spread evenly over the options asked about. Options are looked up with Object.hasOwn, so a pick named like a built-in property, such as toString, is not taken as an option.
other is shown and filtered as other_defect. The plain word clashed with --filter rule=, which also matches issue labels: a rule named other selected the bug questions.
The scripted model in test/helpers.js answers the last option, so it now skips other, and the tests that relied on it read as before. npm run check passes except the pytest runner test, which fails on main too on this machine.
BEGIN_COMMIT_OVERRIDE
feat!: let kind answer other instead of a guessed kind (#442)
BREAKING CHANGE:
kindhas a tenth option,other, shown and filtered asother_defect, and a Decisions answer of none_of_these on it isotherinstead of a guess spread over the other kinds. A defect that was labelled with a guessed kind can now be labelledother_defect, so--filter kind=with the old label no longer matches it, and an issue closed under the old kind is listed again. Changingkind's options changes the question, so cachedkindanswers are asked again.END_COMMIT_OVERRIDE