Remove unreachable aborted-signal check and fix two malformed steps - #302
Open
emecii wants to merge 1 commit into
Open
Remove unreachable aborted-signal check and fix two malformed steps#302emecii wants to merge 1 commit into
emecii wants to merge 1 commit into
Conversation
`registerTool()` checks the same aborted signal twice. webmachinelearning#240 added an early check before the `exposedTo` validation but left the original in place inside the signal block. Between the two, the algorithm only builds a list of origins, runs the URL parser, and creates a promise — no step yields to the event loop or invokes author code, so the signal's aborted flag cannot change and the second check is dead. Removing the later one preserves webmachinelearning#240's intent, which was to let an aborted signal win over a `SecurityError`. `getTools()` reads "If |toolOwnerIsRequested| be true if ...", which binds nothing; the next step reads that variable, so the step is a `Let`. `registerTool()` dereferences a bare {{ModelContextTool/description}} with no object to read it from. Every other member access in the algorithm is written |tool|'s {{ModelContextTool/...}}. The |tool name| half of the same step is already covered by the next step, so this drops it rather than repeating it.
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.
Remove the second aborted-signal check in
registerTool(): the earlier check already returns, and the intervening steps neither yield nor invoke author code. This preserves the early-abort precedence from #240.Also qualify the description member access with its tool, retain empty-name validation in the following step, and replace
If ... be true ifwithLet ... be true ifingetTools().Validation:
bikeshed --print=plain --dry-run --die-on=warning spec index.bspassed without warnings. Branch is independent of the input/navigation fix and based on50c4b7f.