Repository navigation
test: drop mid-run refusal tests left red by #204155 and #204134 - #204270
Merged
Merged
Conversation
…204134 admission text Deleted cases asserted mid-run permission refusals that #204155 removed on purpose. Kept admission, turn-end, run-close and plugin-reload refusals; only their text changed after #204134. Co-authored-by: obviyus <[email protected]>
Contributor
|
🦞👀 Pull request received. I will update this pull request when review starts. |
# Conflicts: # src/gateway/local-request-context.session-tools.test.ts
Collaborator
Author
|
Landed in 1f4e88f. #204155 and #204134 removed mid-run authority re-checks on purpose, and these tests still asserted them. The changed cases are deleted, or keep their admission, turn-end or plugin-reload condition with the new text. No leak: the session-facts snapshot and the USER.md write both stay refused at admission for a caller who should be refused. CI is green and local review is clean. |
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
Nov 24, 2026
…claw#204134 (openclaw#204270) ## Result The 12 refusal-class test files that turned scheduled run 45259316971 (`7172fc1f`) red pass again. Two one-time-admission PRs caused these reds. Nine files change here; the other three were already fixed on `main` (openclaw#204191, openclaw#204255, 85559c3). Each changed case is deleted (it asserted a mid-run permission refusal that was removed on purpose) or keeps its condition with the new refusal text. There is no production change. ## Introducing PR per file I ran all 12 files at each suspect merge and at its parent (`28d97119` → `d4ff1834`, `f88a49de` → `8d86eea4`). The parent `28d97119` is green. Every failure shows up at the merge named below. openclaw#204167 (`941e90a3`) adds no failure. | File | Introduced by | Action | Why | |---|---|---|---| | `src/agents/command/model-selection.configured.test.ts` | openclaw#204155 | deleted "rechecks operator authority after loading the thinking catalog" | openclaw#204155 removed the `authority.assertCurrent` composition from `createOperatorModelSelectionAssertion`. A started selection now finishes after the authority ends; the next request is admitted again | | `src/gateway/operator-run-authority.worker.test.ts` | openclaw#204155 | deleted the "role facts reader throws after abort" loop; cancellation of `assertCurrent` is kept | openclaw#204155 removed the `readCurrentRoleFacts` re-check wrapper. Role facts are the admitted snapshot | | `src/gateway/local-request-context.session-tools.test.ts` | openclaw#204155 | none: openclaw#204255 already changed it on `main` (the revoked participant now gets a structured denial) | The participant `assertCurrent` was removed in `session-controller.tool-authority.ts` | | `src/agents/tools/image-tool.runtime-abort.test.ts` | openclaw#204155 | deleted the 2 "retired after download" rows; the denied-override and permitted-fallback rows are kept | Same as the `pdf-tool` "retired after extraction" case that openclaw#204155 deleted | | `src/gateway/sessions-patch.operator-model-policy.test.ts` | openclaw#204155 | deleted the source-revocation steps (4 cases); the admitted model policy, the denied model, the wildcard family and the policy-tightening checks are kept | openclaw#204155 removed the source composition from `createOperatorModelSelectionAssertion` | | `src/gateway/server-methods/ui-command.test.ts` | openclaw#204155 | none: 85559c3 already dropped the mid-turn revoke step on `main` | Same participant re-check | | `src/model-picker/apply-session-model-selection.operator-context.test.ts` | openclaw#204155 | deleted "rechecks caller authority after model preparation before mutation" and its `assertCurrent` fixture plumbing | Same composition | | `src/gateway/session-access-authority.test.ts` | openclaw#204134 | text only: `/could not start\|Session access changed/` | The refusal is still at admission, before route effects. The handler is not called and the leases are released. openclaw#204134 reworded `prepareGatewayOperatorRunAuthority` to "Gateway request could not start. Reconnect and try again." | | `src/gateway/server-plugins.panels.test.ts` | openclaw#204134 | text only, "caller revoked" and "requester disconnected" rows | The same admission refusal. No delivery happens (`broadcastToConnIds` is not called) | | `src/gateway/server-methods/users-personal-file.test.ts` | openclaw#204134 | text only: `/could not start\|connection/` | The change happens during operator-run preparation (admission). The request is still refused, and no `USER.md` is written (asserted after the refusal) | | `test/cli-message-authority.integration.test.ts` | openclaw#204134 | text only, registration row: `/was reloaded during/` | The plugin-reload fence is kept. openclaw#204134 reworded it to "Plugin discord was reloaded during alias resolution. Retry the action." | | `src/gateway/server-plugins.session-facts.test.ts` | openclaw#204134 | none: openclaw#204191 already rewrote it on `main` | See the leak check below | `server.chat-goal.test.ts` (small-4) is the known openclaw#204187 race. This PR does not change it. ## Leak check - `server-plugins.session-facts` "private cached snapshot": the consumer callback belongs to a request that was admitted before the grant, role or profile change. That request may finish (AGENTS.md "Check authority one time"). The next disclosure is refused at admission (`main` test, line 362). No snapshot goes to a caller who was refused at admission. **No leak.** - `users-personal-file`: the refusal still occurs at admission and nothing is written. Only the text changed. **No leak.** ## Evidence - Red on the scheduled run: 45259316971, shards large-8/19/20/22/28/32/37/41/42 and small-4. - Local attribution runs (12 files each): `28d97119` green; `d4ff1834` and `f88a49de` show the 5 openclaw#204134 files red; `8d86eea4` adds the 7 openclaw#204155 files. - Head: the 12 files pass locally (one unrelated `cli-message-authority` timeout under host load 66 passed on the rerun). CI on the head is green. Local ClawSweeper: patch is correct, no findings. 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.
Result
The 12 refusal-class test files that turned scheduled run 45259316971 (
cded11f8) red pass again. Two one-time-admission PRs caused these reds. Nine files change here; the other three were already fixed onmain(#204191, #204255, 4efdef5). Each changed case is deleted (it asserted a mid-run permission refusal that was removed on purpose) or keeps its condition with the new refusal text. There is no production change.Introducing PR per file
I ran all 12 files at each suspect merge and at its parent (
ab24e714→8ea0f171,412df906→515a93c6). The parentab24e714is green. Every failure shows up at the merge named below. #204167 (ef48c716) adds no failure.src/agents/command/model-selection.configured.test.tsauthority.assertCurrentcomposition fromcreateOperatorModelSelectionAssertion. A started selection now finishes after the authority ends; the next request is admitted againsrc/gateway/operator-run-authority.worker.test.tsassertCurrentis keptreadCurrentRoleFactsre-check wrapper. Role facts are the admitted snapshotsrc/gateway/local-request-context.session-tools.test.tsmain(the revoked participant now gets a structured denial)assertCurrentwas removed insession-controller.tool-authority.tssrc/agents/tools/image-tool.runtime-abort.test.tspdf-tool"retired after extraction" case that #204155 deletedsrc/gateway/sessions-patch.operator-model-policy.test.tscreateOperatorModelSelectionAssertionsrc/gateway/server-methods/ui-command.test.tsmainsrc/model-picker/apply-session-model-selection.operator-context.test.tsassertCurrentfixture plumbingsrc/gateway/session-access-authority.test.ts/could not start|Session access changed/prepareGatewayOperatorRunAuthorityto "Gateway request could not start. Reconnect and try again."src/gateway/server-plugins.panels.test.tsbroadcastToConnIdsis not called)src/gateway/server-methods/users-personal-file.test.ts/could not start|connection/USER.mdis written (asserted after the refusal)test/cli-message-authority.integration.test.ts/was reloaded during/src/gateway/server-plugins.session-facts.test.tsmainserver.chat-goal.test.ts(small-4) is the known #204187 race. This PR does not change it.Leak check
server-plugins.session-facts"private cached snapshot": the consumer callback belongs to a request that was admitted before the grant, role or profile change. That request may finish (AGENTS.md "Check authority one time"). The next disclosure is refused at admission (maintest, line 362). No snapshot goes to a caller who was refused at admission. No leak.users-personal-file: the refusal still occurs at admission and nothing is written. Only the text changed. No leak.Evidence
ab24e714green;8ea0f171and412df906show the 5 refactor: drop mid-request authority re-checks in gateway operator/plugin/MCP App paths, skill library, reclaim and channel reads (R6d part 3) #204134 files red;515a93c6adds the 7 refactor(agents): drop mid-run operator authority re-reads (R6c part 4c) #204155 files.