Repository navigation
Conversation
Co-authored-by: RomneyDa <[email protected]>
OpenClaw-Publication: fc2db33f-5381-438e-be16-5d4f52e90256
Contributor
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
Contributor
|
Codex review: stale review; fresh review needed. Summary Next step Review history (1 earlier review cycle)
|
Preserve native refusal wording and external silence while giving internal text callers an administrator next step. Update the affected learn undo expectation. Co-authored-by: RomneyDa <[email protected]>
Baseline-Refresh: 5f27a828752c8dcd437df164787526feaace04b8 Co-authored-by: RomneyDa <[email protected]>
Co-authored-by: RomneyDa <[email protected]>
Co-authored-by: RomneyDa <[email protected]>
Co-authored-by: RomneyDa <[email protected]>
obviyus
added a commit
that referenced
this pull request
Nov 24, 2026
## Problem Fixes #198259. On a Gateway with `gateway.auth.mode=password` and `commands.allowFrom: {"*": [...]}`, the owner's Control UI `/status` (and every other text command) returned `started`, then a final with no assistant message. The command gate (`rejectUnauthorizedCommand`) replied only to native commands; every other denial was silent. Thirteen commands (`/status`, `/help`, `/commands`, `/skill`, `/context`, `/usage`, `/fast`, `/session`, `/diagnostics`, `/agents`/`/subagents`, `/tts`, `/whoami`, `/restart`, `/update`) also set `silentUnauthorized`, which dropped the native refusal too. ## Fix - `command-gates.ts` is the one owner of the denial outcome: - Gateway clients (Control UI, WebChat, CLI) get a refusal that names the policy and the next step: add the Gateway user profile ID to `commands.allowFrom`, or move the `"*"` entries to per-channel keys so Control UI commands follow operator access. - Native commands get the existing refusal for every command. - Text commands from external channel senders stay silent, so strangers in shared chats get no reply. This is the recorded intentional non-outcome. - Deleted the `silentUnauthorized` option and its 13 uses. - Docs (`docs/tools/slash-commands.md`): password/token Control UI clients have no user identity, and how to keep their commands available. Supersedes the denial part of #198874 (draft, maintainer edits off). Thanks @RomneyDa for the first cut of the visible WebChat refusal. ## Owner identity: no change (policy question) The issue asks that the password owner (`gateway-owner`) pass `commands.allowFrom`. The docs are not silent here: since #144601 they say "A shared owner profile used only for attribution does not grant this access." Every holder of the shared password or token gets that profile, so making it matchable would admit them all. This PR keeps that rule and does not add an owner bypass. The documented route for the reporter: list channel senders under per-channel keys and omit `"*"`; Control UI commands then follow operator scopes. Open policy question for @obviyus: should `operator.admin` Gateway clients pass `commands.allowFrom` (today the list is the only authority when set)? Default kept: no. ## User impact - Control UI owner denied by `commands.allowFrom`: sees why and what to change, instead of nothing. - Native `/status`, `/help` and the others from a denied sender: see "You are not authorized to use this command." instead of no response (Discord shows "did not respond" otherwise). - External channel text senders: unchanged (silent). ## Evidence - Red on base `e24a2eecffb7`, green on head: `commands-info.test.ts` "denied /status" (Control UI owner refusal names `commands.allowFrom`; native refusal). Silence for external text senders and the per-channel-key route pass on both. - Pre-push: touched tests + importers of every changed source (15 files), `tsgo:core`, `tsgo:test`, oxfmt, oxlint. - Head E2E `9f42a4647b`, isolated password-auth Gateway from source, Control UI client (`operator.admin`, password), `chat.send /status`: - `commands.allowFrom: {"*": ["someone-else"]}` (the issue config): base `736ec651c262` gave `started`, then a final with no assistant message; head replies with the refusal that names `commands.allowFrom`. - `commands.allowFrom: {"telegram": ["someone-else"]}` (the documented route): `/status` returns the full status card. - One-admission E2E on head (queued refusal, running turn finishes, Stop cancels): Q, R, S pass. Co-authored-by: Ayaan Zaidi <[email protected]>
Collaborator
tideclaw-bot
pushed a commit
that referenced
this pull request
Nov 25, 2026
## Problem Fixes #198259. On a Gateway with `gateway.auth.mode=password` and `commands.allowFrom: {"*": [...]}`, the owner's Control UI `/status` (and every other text command) returned `started`, then a final with no assistant message. The command gate (`rejectUnauthorizedCommand`) replied only to native commands; every other denial was silent. Thirteen commands (`/status`, `/help`, `/commands`, `/skill`, `/context`, `/usage`, `/fast`, `/session`, `/diagnostics`, `/agents`/`/subagents`, `/tts`, `/whoami`, `/restart`, `/update`) also set `silentUnauthorized`, which dropped the native refusal too. ## Fix - `command-gates.ts` is the one owner of the denial outcome: - Gateway clients (Control UI, WebChat, CLI) get a refusal that names the policy and the next step: add the Gateway user profile ID to `commands.allowFrom`, or move the `"*"` entries to per-channel keys so Control UI commands follow operator access. - Native commands get the existing refusal for every command. - Text commands from external channel senders stay silent, so strangers in shared chats get no reply. This is the recorded intentional non-outcome. - Deleted the `silentUnauthorized` option and its 13 uses. - Docs (`docs/tools/slash-commands.md`): password/token Control UI clients have no user identity, and how to keep their commands available. Supersedes the denial part of #198874 (draft, maintainer edits off). Thanks @RomneyDa for the first cut of the visible WebChat refusal. ## Owner identity: no change (policy question) The issue asks that the password owner (`gateway-owner`) pass `commands.allowFrom`. The docs are not silent here: since #144601 they say "A shared owner profile used only for attribution does not grant this access." Every holder of the shared password or token gets that profile, so making it matchable would admit them all. This PR keeps that rule and does not add an owner bypass. The documented route for the reporter: list channel senders under per-channel keys and omit `"*"`; Control UI commands then follow operator scopes. Open policy question for @obviyus: should `operator.admin` Gateway clients pass `commands.allowFrom` (today the list is the only authority when set)? Default kept: no. ## User impact - Control UI owner denied by `commands.allowFrom`: sees why and what to change, instead of nothing. - Native `/status`, `/help` and the others from a denied sender: see "You are not authorized to use this command." instead of no response (Discord shows "did not respond" otherwise). - External channel text senders: unchanged (silent). ## Evidence - Red on base `e24a2eecffb7`, green on head: `commands-info.test.ts` "denied /status" (Control UI owner refusal names `commands.allowFrom`; native refusal). Silence for external text senders and the per-channel-key route pass on both. - Pre-push: touched tests + importers of every changed source (15 files), `tsgo:core`, `tsgo:test`, oxfmt, oxlint. - Head E2E `9f42a4647b`, isolated password-auth Gateway from source, Control UI client (`operator.admin`, password), `chat.send /status`: - `commands.allowFrom: {"*": ["someone-else"]}` (the issue config): base `736ec651c262` gave `started`, then a final with no assistant message; head replies with the refusal that names `commands.allowFrom`. - `commands.allowFrom: {"telegram": ["someone-else"]}` (the documented route): `/status` returns the full status card. - One-admission E2E on head (queued refusal, running turn finishes, Stop cancels): Q, R, S pass. Co-authored-by: Ayaan Zaidi <[email protected]> (cherry picked from commit 7f5ec42) Co-authored-by: RomneyDa <[email protected]>
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
Nov 25, 2026
…w#204673) ## Problem Fixes openclaw#198259. On a Gateway with `gateway.auth.mode=password` and `commands.allowFrom: {"*": [...]}`, the owner's Control UI `/status` (and every other text command) returned `started`, then a final with no assistant message. The command gate (`rejectUnauthorizedCommand`) replied only to native commands; every other denial was silent. Thirteen commands (`/status`, `/help`, `/commands`, `/skill`, `/context`, `/usage`, `/fast`, `/session`, `/diagnostics`, `/agents`/`/subagents`, `/tts`, `/whoami`, `/restart`, `/update`) also set `silentUnauthorized`, which dropped the native refusal too. ## Fix - `command-gates.ts` is the one owner of the denial outcome: - Gateway clients (Control UI, WebChat, CLI) get a refusal that names the policy and the next step: add the Gateway user profile ID to `commands.allowFrom`, or move the `"*"` entries to per-channel keys so Control UI commands follow operator access. - Native commands get the existing refusal for every command. - Text commands from external channel senders stay silent, so strangers in shared chats get no reply. This is the recorded intentional non-outcome. - Deleted the `silentUnauthorized` option and its 13 uses. - Docs (`docs/tools/slash-commands.md`): password/token Control UI clients have no user identity, and how to keep their commands available. Supersedes the denial part of openclaw#198874 (draft, maintainer edits off). Thanks @RomneyDa for the first cut of the visible WebChat refusal. ## Owner identity: no change (policy question) The issue asks that the password owner (`gateway-owner`) pass `commands.allowFrom`. The docs are not silent here: since openclaw#144601 they say "A shared owner profile used only for attribution does not grant this access." Every holder of the shared password or token gets that profile, so making it matchable would admit them all. This PR keeps that rule and does not add an owner bypass. The documented route for the reporter: list channel senders under per-channel keys and omit `"*"`; Control UI commands then follow operator scopes. Open policy question for @obviyus: should `operator.admin` Gateway clients pass `commands.allowFrom` (today the list is the only authority when set)? Default kept: no. ## User impact - Control UI owner denied by `commands.allowFrom`: sees why and what to change, instead of nothing. - Native `/status`, `/help` and the others from a denied sender: see "You are not authorized to use this command." instead of no response (Discord shows "did not respond" otherwise). - External channel text senders: unchanged (silent). ## Evidence - Red on base `5bfd560ab5f1`, green on head: `commands-info.test.ts` "denied /status" (Control UI owner refusal names `commands.allowFrom`; native refusal). Silence for external text senders and the per-channel-key route pass on both. - Pre-push: touched tests + importers of every changed source (15 files), `tsgo:core`, `tsgo:test`, oxfmt, oxlint. - Head E2E `9f42a4647b`, isolated password-auth Gateway from source, Control UI client (`operator.admin`, password), `chat.send /status`: - `commands.allowFrom: {"*": ["someone-else"]}` (the issue config): base `d5af0116c7e3` gave `started`, then a final with no assistant message; head replies with the refusal that names `commands.allowFrom`. - `commands.allowFrom: {"telegram": ["someone-else"]}` (the documented route): `/status` returns the full status card. - One-admission E2E on head (queued refusal, running turn finishes, Stop cancels): Q, R, S pass. Co-authored-by: Ayaan Zaidi <[email protected]>
RomneyDa
marked this pull request as ready for review
November 25, 2026 19:21
tideclaw-bot
pushed a commit
that referenced
this pull request
Nov 30, 2026
## Problem Fixes #198259. On a Gateway with `gateway.auth.mode=password` and `commands.allowFrom: {"*": [...]}`, the owner's Control UI `/status` (and every other text command) returned `started`, then a final with no assistant message. The command gate (`rejectUnauthorizedCommand`) replied only to native commands; every other denial was silent. Thirteen commands (`/status`, `/help`, `/commands`, `/skill`, `/context`, `/usage`, `/fast`, `/session`, `/diagnostics`, `/agents`/`/subagents`, `/tts`, `/whoami`, `/restart`, `/update`) also set `silentUnauthorized`, which dropped the native refusal too. ## Fix - `command-gates.ts` is the one owner of the denial outcome: - Gateway clients (Control UI, WebChat, CLI) get a refusal that names the policy and the next step: add the Gateway user profile ID to `commands.allowFrom`, or move the `"*"` entries to per-channel keys so Control UI commands follow operator access. - Native commands get the existing refusal for every command. - Text commands from external channel senders stay silent, so strangers in shared chats get no reply. This is the recorded intentional non-outcome. - Deleted the `silentUnauthorized` option and its 13 uses. - Docs (`docs/tools/slash-commands.md`): password/token Control UI clients have no user identity, and how to keep their commands available. Supersedes the denial part of #198874 (draft, maintainer edits off). Thanks @RomneyDa for the first cut of the visible WebChat refusal. ## Owner identity: no change (policy question) The issue asks that the password owner (`gateway-owner`) pass `commands.allowFrom`. The docs are not silent here: since #144601 they say "A shared owner profile used only for attribution does not grant this access." Every holder of the shared password or token gets that profile, so making it matchable would admit them all. This PR keeps that rule and does not add an owner bypass. The documented route for the reporter: list channel senders under per-channel keys and omit `"*"`; Control UI commands then follow operator scopes. Open policy question for @obviyus: should `operator.admin` Gateway clients pass `commands.allowFrom` (today the list is the only authority when set)? Default kept: no. ## User impact - Control UI owner denied by `commands.allowFrom`: sees why and what to change, instead of nothing. - Native `/status`, `/help` and the others from a denied sender: see "You are not authorized to use this command." instead of no response (Discord shows "did not respond" otherwise). - External channel text senders: unchanged (silent). ## Evidence - Red on base `e24a2eecffb7`, green on head: `commands-info.test.ts` "denied /status" (Control UI owner refusal names `commands.allowFrom`; native refusal). Silence for external text senders and the per-channel-key route pass on both. - Pre-push: touched tests + importers of every changed source (15 files), `tsgo:core`, `tsgo:test`, oxfmt, oxlint. - Head E2E `9f42a4647b`, isolated password-auth Gateway from source, Control UI client (`operator.admin`, password), `chat.send /status`: - `commands.allowFrom: {"*": ["someone-else"]}` (the issue config): base `736ec651c262` gave `started`, then a final with no assistant message; head replies with the refusal that names `commands.allowFrom`. - `commands.allowFrom: {"telegram": ["someone-else"]}` (the documented route): `/status` returns the full status card. - One-admission E2E on head (queued refusal, running turn finishes, Stop cancels): Q, R, S pass. Co-authored-by: Ayaan Zaidi <[email protected]> (cherry picked from commit 7f5ec42) Companion audit: The approval context follow-up f57a179 is separately selected. #204756 is a main-only authority refactor, #205780 adds the /context budget card, and #207006 changes loop test scaffolding; none is needed for baseline denial. #144601 verified-sender matching is already an ancestor of the pinned baseline. Co-authored-by: RomneyDa <[email protected]>
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.
Problem
Related: #198259. When commands.allowFrom legitimately rejects a password-authenticated Control UI caller without a matching verified sender identity, plain-text /status previously vanished without a reply.
Change
Internal WebChat command denials now return a visible refusal with an actionable next step: “Ask your Gateway administrator for command access.” The native-command branch remains first and preserves its existing wording. External /status text and native wrappers retain their existing silence. This changes feedback only: operator.admin does not bypass commands.allowFrom, and verified identity, authorization checks, owner attribution, and scopes are unchanged.
The correction also updates the /learn undo and /loop regressions to expect the visible refusal while retaining no-effect assertions.
Current corrected candidate
Signed candidate: 683d6c2. It adds a one-line persisted Workshop /learn undo consumer correction to bddd646; earlier corrections fixed the /loop expectation and denial-table type inference. Production remains identical to 66dbaee; baseline remains d43de8d.
Current guidance browser proof
One real-Gateway Chromium scenario passed in a secretless, network-disabled Podman container. It uses real browser pairing, a synthetic session, a nonmatching commands.allowFrom identity, and /status entered through the composer. The screenshot below visibly includes the administrator-guidance sentence. No cloud model was contacted. The image was inspected and contains synthetic content only.
Provenance: archived source and compiled Gateway/UI from 66dbaee; all subsequent published corrections through 683d6c2 change tests only, so production source is identical. Supplemental browser harness and package build artifacts were staged separately. Earlier attempts failed during dependency setup before Gateway readiness; they are not browser proof and did not replace historical captures.
Historical real-Gateway visual proof
The original two-file denial patch was tested on canonical main d43de8d in an isolated, network-disabled Playwright container with a task-owned real Gateway and real browser pairing. This is historical main-plus-original-patch proof, not exact-candidate proof of the corrected administrator-guidance wording.
The scenario creates a synthetic session, sets an allowlist identity that does not match the authenticated WebChat operator, and sends /status through the visible composer. Before: the command finishes silently and the refusal assertion times out. After: the original bare refusal is visible. No cloud model is contacted. Both screenshots were inspected and contain synthetic content only.
Current-head CI and remaining qualification
Technical review-ready; broad CI remains red, not merge-ready. On November 16, 2026, native exact-head commit validation and correction-review gate admission completed successfully for 683d6c2; the latter records
github_pending, not successful CI proof. Feature-specific proof is satisfied by the retained focused checks and real-Gateway browser scenario on identical production bytes. No further PR-caused defect was demonstrated. The PR remains draft because the shared publisher's original publication receipt names an older head and refuses promotion of the current head; that publication-state blocker is separate from technical review readiness. Full run https://github.com/openclaw/openclaw/actions/runs/43632645107 completed on November 14, 2026, at 21:48 UTC: 269 jobs, 232 successful, 23 failed, 3 canceled, 11 skipped, zero pending. The 23 failures include the aggregate ci-gate, leaving 22 substantive failed jobs. Actual checkout logs confirm candidate 683d6c2, trusted harness c31bb2a, and baseline d43de8d; workflow metadata alone was not treated as checkout proof. Validation used full tier with no release gate. This is completed observation and attribution, not broad-green or merge readiness.The corrected Workshop QA4 job 132563023849 passed under both Node and Bun: 63 passed files / 1 skipped in each invocation, including the previously failing persisted unauthorized /learn undo case. The current messaging typecheck passed. All five Windows shards passed. QA10 passed 64 files / 1,150 tests under each runtime. These successes do not erase other failures or incomplete suites.
All substantive failed jobs and all three canceled jobs were examined. Attribution distinguishes demonstrated source defects, exact recurring signatures, and independent boundaries with unresolved dynamic causes:
mockClear is not a functionin the mocked inline-output transport fixture; Node passed. That fixture cannot call the changed backend command gate. The missing spy's precise runtime cause remains unknown.No further PR-caused defect was demonstrated after the three consumer corrections. This does not certify every unrelated failure harmless or resolve the outstanding runtime causes and incomplete native/QA/Gateway coverage. Full logs, artifacts, immutable source checks, final job inventory and per-lane reports are retained under the task's local proof directory. No unrelated repairs or additional reruns were made.
Historical CI receipts
The preceding full run https://github.com/openclaw/openclaw/actions/runs/43625456883 admitted target bddd646 with harness 5df28e7 and baseline d43de8d. Its final result was 269 jobs: 225 successful, 31 failed (including aggregate ci-gate), 2 canceled, 11 skipped. Earlier nonterminal snapshots are superseded. Core messaging types, core-fast-2 (793 files / 6,979 passed tests / 18 skipped), and all seven auto-reply lanes passed on that preceding head.
That run exposed the third confirmed PR-caused consumer regression: commands.workshop-contract.test.ts expected silence for an unauthorized persisted /learn undo. Both runtimes reached the real command gate and received the intended guidance. Commit 683d6c2 changes only that expectation, preserving all persisted-state assertions; current-head QA4 now confirms it passes. Earlier run https://github.com/openclaw/openclaw/actions/runs/43619399787 targeted 66dbaee and exposed commands-info TS2322 (fixed in 3817b58) and stale /loop silence (fixed in bddd646). Old-head evidence remains historical, not current-head proof.
Preceding-run failures were individually investigated rather than labeled flakes. They included inventory/declaration/i18n defects, recurring model-picker/history/runtime signatures, independent catalog/broker/update/fixture boundaries, and unresolved Windows readiness. Its check-lint-core-1 was canceled at the 15-minute limit without a usable job log. Its iOS onboarding assertion and both-runtime QA17 dry-run failures match the current signatures. Its macOS job exceeded 75 minutes; the old timeout receipt alone does not rule out prior assertions.
The first exact-target attempt https://github.com/openclaw/openclaw/actions/runs/43625100644 used validation_tier=main, which rejects cross-revision targets. It failed preflight before candidate tests; the receipt is preserved as a dispatch-input error, not a product failure. Recovery used the supported full tier. Draft-triggered skipped CI does not establish qualification. All source/review/proof receipts remain retained. No merge, backport or release was performed.