Repository navigation
fix(client): the admission examines each nested call that its caller does not declare - #600
Open
mark1russell7 wants to merge 2 commits into
Open
mark1russell7 wants to merge 2 commits into
mark1russell7 wants to merge 2 commits into
Conversation
…does not declare A procedure of code with declared effects answered for each of its nested calls, also without metadata.calls. Now the exemption covers one declared edge: an entry of the calls of the caller names the callee, and the effects of the callee are in the declaration of the caller. - examinesNestedCall() gets the optional parameter callee. Without it, the function gives true. - edgeFaults() is the one rule of an edge. checkEffects() and the admission use it. - Five tests: a caller without calls, a callee outside the calls, a pattern entry with more effects, a callee without effects, and no callee. Each one fails with the old rule. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
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.
The change
The admission skips a nested call when its caller is a procedure of code with declared effects and the same capability. Before, this exemption covered each nested call of such a caller, also a caller without
metadata.calls.checkEffects()examines only the callers withcalls, so no check examined the other edges.The exemption covers a declared edge only:
callsof the caller names the callee (callMatches).edgeFaults()gives this rule, andcheckEffects()uses the same function. A callee that registers after the static check, through a pattern entry, gets the same examination.The admission examines each other nested call. With no capability, nothing changes.
API
examinesNestedCall()gets the optional parametercallee. Without it, the function cannot name the edge, so it gives true. The API report has the new signature.Tests
capability.test.tsgets five rows:callsunder a read-only capability: the nested write is refused before its handler.callsof the caller do not name.examinesNestedCall()without the callee.A flip run with the old rule: the five rows fail, and the other 40 rows pass. With the fix, the 45 rows pass. The related tests of the package passed: 2192 passed, 7 skipped.
Docs
CAPABILITIES.mdand the decision record state the rule of one edge.PATCH: a fix of the admission, and a new optional parameter.
🤖 Generated with Claude Code