Mark which folded parameters the tool cannot run without - #33
Open
CNSeniorious000 wants to merge 1 commit into
Open
Mark which folded parameters the tool cannot run without#33CNSeniorious000 wants to merge 1 commit into
CNSeniorious000 wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
Sorry @CNSeniorious000, you've used your own review budget of 250,000 diff characters for the last 7 days.
You can request another review in 4 days and 17 hours by commenting @sourcery-ai review. Upgrade to get a review now.
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.
A parameter Python cannot spell —
"a b","1st",""— is folded into**kwargsand named in a trailing comment. The comment gave names only:Nothing there says the tool cannot run without
"a b". It reads exactly like the optional"c d"beside it, so the model calls without it and the host rejects the call — which is the failure the comment above that line says the note exists to prevent: "a required argument the model never sees is one the host rejects it for."Spelled the way the named fields directly above it already are (
${p.name}: ${p.type}${p.required ? '' : ' = ...'}), so the two readings of the same signature do not need separate rules. Types come along for free, which the folded half was missing entirely.Note
On
mainthis comment is the only place these parameters are named at all —py/kernel.pysetsdropped = True, appends a barekwargs, and says nothing about what went in. The note that makes<tool>?the second reading is in #23, unmerged. So today this is not two views disagreeing; it is the one view being incomplete.Verification
node test/smoke.jspasses. Two existing assertions pinned the names-only wording and were updated; a third case is new, because none of the existing fixtures had a folded parameter that was required — the half the change is actually about. Mutation-checked: reverting the render torest.map((p) => JSON.stringify(p.name))fails both the updated assertion and the new one.A cross-half assertion — one schema, driven through
toolSpecsinto both the block and a live kernel, comparing the folds and their requiredness — belongs with #23, since that is where the kernel gains a note to compare against. Written and confirmed to fail againstmainfor the right reason (folded.__doc__is just the description).