Skip to content

test: drop mid-run refusal tests left red by #204155 and #204134 - #204270

Merged
obviyus merged 2 commits into
mainfrom
fix/aclass-round5
Nov 23, 2026
Merged

obviyus merged 2 commits into
mainfrom
fix/aclass-round5

Conversation

@obviyus

@obviyus obviyus commented Nov 23, 2026 •

Copy link
Copy Markdown
Collaborator

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 on main (#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 parent ab24e714 is green. Every failure shows up at the merge named below. #204167 (ef48c716) adds no failure.

File Introduced by Action Why
src/agents/command/model-selection.configured.test.ts #204155 deleted "rechecks operator authority after loading the thinking catalog" #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 #204155 deleted the "role facts reader throws after abort" loop; cancellation of assertCurrent is kept #204155 removed the readCurrentRoleFacts re-check wrapper. Role facts are the admitted snapshot
src/gateway/local-request-context.session-tools.test.ts #204155 none: #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 #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 #204155 deleted
src/gateway/sessions-patch.operator-model-policy.test.ts #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 #204155 removed the source composition from createOperatorModelSelectionAssertion
src/gateway/server-methods/ui-command.test.ts #204155 none: 4efdef5 already dropped the mid-turn revoke step on main Same participant re-check
src/model-picker/apply-session-model-selection.operator-context.test.ts #204155 deleted "rechecks caller authority after model preparation before mutation" and its assertCurrent fixture plumbing Same composition
src/gateway/session-access-authority.test.ts #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. #204134 reworded prepareGatewayOperatorRunAuthority to "Gateway request could not start. Reconnect and try again."
src/gateway/server-plugins.panels.test.ts #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 #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 #204134 text only, registration row: /was reloaded during/ The plugin-reload fence is kept. #204134 reworded it to "Plugin discord was reloaded during alias resolution. Retry the action."
src/gateway/server-plugins.session-facts.test.ts #204134 none: #204191 already rewrote it on main See the leak check below

server.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 (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

…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]>
@clawsweeper

clawsweeper Bot commented Nov 23, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

@openclaw-barnacle openclaw-barnacle Bot added gateway Gateway runtime agents Agent runtime and tooling size: S labels Nov 23, 2026
# Conflicts:
#	src/gateway/local-request-context.session-tools.test.ts
@obviyus
obviyus merged commit 1f4e88f into main Nov 23, 2026
109 of 110 checks passed
@obviyus
obviyus deleted the fix/aclass-round5 branch November 23, 2026 23:18
@obviyus

obviyus commented Nov 23, 2026

Copy link
Copy Markdown
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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling gateway Gateway runtime size: S

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant