Skip to content

fix(webchat): show denied slash command feedback - #198874

Open
RomneyDa wants to merge 7 commits into
mainfrom
openclaw/fix24-ui
Open

RomneyDa wants to merge 7 commits into
mainfrom
openclaw/fix24-ui

Conversation

@RomneyDa

@RomneyDa RomneyDa commented Nov 14, 2026 •

Copy link
Copy Markdown
Member

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.

  • Exact current Workshop correction: all 34 integration tests passed under Node 24 in secretless, network-disabled Podman. Messaging typecheck, targeted type-aware lint (zero warnings/errors), formatting and whitespace passed. Independent review of blob 4fd157b30afd3bdc445c0652fa44bfd8e7e6e5e0 is READY with no findings. The persisted feed and both skill-file no-effect assertions remain unchanged. Initial dependency/cache setup failures occurred before meaningful testing; the corrected isolated setup passed.
  • Previous exact loop correction: 9 tests passed; messaging typecheck, type-aware lint, formatting and whitespace passed. The no-rewrite assertion and owner-only denial remain intact. Independent exact-blob review READY, no findings.
  • Previous 3817b58: 26 commands-info tests and messaging typecheck passed. These repeat prior coverage, not additional distinct tests.
  • Previous 66dbaee: four focused suites / 70 tests and full build passed (2m 19.6s). Budget warnings are not performance qualification.
  • Full-delta and subsequent test-only correction reviews retained. Neither old-head results nor pending/skipped checks establish current-head broad green CI.

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.

Current production guidance: unauthorized command with administrator next step

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.

Before (main) After (main plus original denial patch)
Before: slash command has no refusal After: visible authorization refusal

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:

  • Core / tooling: benchmark TS18048 recurs on actual main. Two inventory lanes expose baseline inventory assertions; three declaration/packed lanes expose fixtures omitting directory-walk.ts. Native i18n has 2,100 missing translations. These are not repaired here.
  • UI: model-picker spacing and WebKit history-stability assertions match retained actual-main signatures. The current UI2/3 failure is instead Bun mockClear is not a function in 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.
  • Agentic / runtime: exact recurrences include unsupported-chat, credential/catalog invalidation, Talk post-cancel completion and startup reload settlement; the socket setup failure also recurs on an earlier candidate. Other observed boundaries include Doctor/continuation/revocation timeouts, ACP session-creation timeout, role projection, database-engine selection before sanitization assertions, and cron command-timeout metadata preservation. The full logs and owning sources were inspected; precise dynamic causes are not all resolved. Source-boundary independence is not a claim that every failure was reproduced on baseline.
  • QA16 / QA19: Node fails respectively while rebuilding a removed symlink fixture without its pruned parent, and while reading a synthetic events.jsonl after the explicit update deadline expires. Bun passes both lanes. The former was traced to fixture reconstruction before GC assertions; the latter matches the preceding candidate. Neither enters chat-command authorization; timing cause remains unproven where applicable.
  • QA17: canceled at the explicit two-hour limit, with real failures before cancellation. Node completed with 2 failed / 60 passed / 2 skipped files and 2 failed / 888 passed / 2 skipped tests. Both dry-run update tests report UpdateCommandFailure through ExitError(1); the same two tests also failed visibly under Bun, but Bun never emitted a completed summary. November 15 follow-up closes the baseline-attribution gap: both exact test names and ExitError stacks occur under Bun in actual scheduled-main run 43604797931 at b274403. Canonical commit d133365 repairs exactly these fixtures by creating their claimed source directories before preview, and records both complete files passing under Node and pinned Bun. Candidate source inspection confirms the missing root reaches fs.realpath during interrupted-link destination inspection introduced by fix(update): retrying an update from a dev checkout is refused after a killed update #198673; the relevant main/candidate test and admission files are identical. These are inherited fixture failures, not command-denial defects. The canonical commit's recorded passes are not new candidate execution, and the current-head Bun shard remains incomplete.
  • iOS: the onboarding bootstrap test failed at BootstrapSetupFailureUITests.swift:53 waiting for Enter setup code, before entering a URL or connecting. The detailed artifact shows a permission interruption during Connect Manually and an invalid computed hit point; the precise navigation cause remains unknown. The settings companion and Watch reachability passed. The exact assertion recurs on the preceding candidate; this is not proof of actual-main dynamic recurrence.
  • macOS: canceled at the explicit 75-minute limit, not cancellation-only. The artifact contains 19 issue records across eight functions, including 600-second limits/wait diagnostics and a genuine MacNodeConnectionStatusTests.swift:87 identity assertion. Six functions completed as failed; pairing replacement and speech recovery remained incomplete. Pairing signatures recur on an earlier candidate, with direct-silent pairing also verified on actual main. Dashboard, health, node identity and speech dynamic attribution remains unresolved. Native sources are byte-identical to baseline, which establishes source independence, not blanket runtime recurrence.
  • Real-Gateway E2E: canceled at the explicit 40-minute limit. Seventy observed module completions were pass/skip and no assertion-failure block was found, but the whole suite did not complete and is not green.

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.

RomneyDa and others added 2 commits November 14, 2026 13:34
OpenClaw-Publication: fc2db33f-5381-438e-be16-5d4f52e90256
@clawsweeper

clawsweeper Bot commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. P2 Normal backlog priority with limited blast radius. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Nov 14, 2026
@clawsweeper

clawsweeper Bot commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: stale review; fresh review needed.

Summary
The latest durable ClawSweeper review was for head 1775f1e5a4e2d6b5a5e512065b016546ce32abb1, but the PR head is now 683d6c24b54059a95ecfac1354050ea480142ec1. Its old verdict and PR readiness labels are no longer current.

Next step
Comment @clawsweeper re-review when the current head is ready; pushes after the first review are not reviewed automatically.

Review history (1 earlier review cycle)
  • reviewed 2026-11-14T14:20:21.768Z sha 1775f1e :: needs changes before merge. :: [P2] Give denied WebChat callers a useful next action

RomneyDa and others added 2 commits November 14, 2026 17:01
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]>
@clawsweeper clawsweeper Bot removed rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Nov 19, 2026
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]>
@obviyus

obviyus commented Nov 24, 2026

Copy link
Copy Markdown
Collaborator

Thanks for this. The visible Control UI refusal landed in #204673 (7f5ec42), with credit to this PR. It also removes silentUnauthorized, so native denials always reply.

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
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

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P2 Normal backlog priority with limited blast radius. size: S

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants