Repository navigation
test(gateway): align placement standing grant test with check-once approvals - #201911
Merged
Merged
Conversation
…provals - #201812 removed the resolve-time run re-check, so resolving allow-always after the placement authority closes now records the decision. - The started launch is still refused when the grant would be retained (node-invoke-placement-grant), so no stale standing grant survives. - Assert that, plus a later request while authority is closed re-prompts without allow-always or a placement binding.
Contributor
|
🦞👀 Pull request received. I will update this pull request when review starts. |
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
Nov 20, 2026
…provals (openclaw#201911) Problem: operator-approval-placement-grants.test.ts "skips the second launch and re-prompts after the placement generation changes" failed on main since openclaw#201812. It expected resolve(allow-always) to be refused after the run's placement-grant authority closed mid-request, which came from the resolve-time run re-check openclaw#201812 deleted on purpose. CI's changed-file shards did not select it for that PR. Fix: test only. The resolve now records the decision. The started launch is still refused because grant retention checks the placement owner (node-invoke-placement-grant.ts), so no stale standing grant survives. A later request while authority is closed re-prompts without allow-always or a placement binding. Every other assertion is unchanged. Proof: the target test plus every approval, standing-grant, placement-grant and consumption test file (86 files, 2,163 tests) pass; tsgo, test types, oxlint, format and the lifetime-check and line-cap ratchets pass. Co-authored-by: Ayaan Zaidi <[email protected]>
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.
What problem this solves
src/gateway/operator-approval-placement-grants.test.ts> "skips the second launch and re-prompts after the placement generation changes" fails onmainsince #201812 ("check exec approval authority once at request start"). CI's changed-file shards did not select it for that PR.The test closed the run's placement-grant authority after the approval request started and expected
resolve(…, "allow-always")to return false. That refusal came from the resolve-time run re-check that #201812 deleted on purpose:isExecApprovalRuntimeActivecalled the record's placement-owner assertion.Change
Test only.
true).DENIED). Grant retention still checks the placement owner (node-invoke-placement-grant.ts:124), so no stale standing grant survives.allow-alwaysor a placement binding.Evidence
exec-approval-manager.ts:196reachednode-invoke-plugin-approval.ts:163-164throughrecord.approvalAuthority. That is a mid-request check of the requesting run's authority.ocx testover every approval, standing-grant, placement-grant and consumption test file (86 files, 2,163 tests): pass. No other test fails for this cause.pnpm tsgo,pnpm check:test-types, oxlint, format, and the lifetime-check and line-cap ratchets: pass.