Skip to content

fix(telegram): explain disabled plugin approval failures#95973

Merged
steipete merged 15 commits into
openclaw:mainfrom
MonkeyLeeT:codex/95800-telegram-approval-feedback
Jul 2, 2026
Merged

fix(telegram): explain disabled plugin approval failures#95973
steipete merged 15 commits into
openclaw:mainfrom
MonkeyLeeT:codex/95800-telegram-approval-feedback

Conversation

@MonkeyLeeT

@MonkeyLeeT MonkeyLeeT commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

What Problem This Solves

Fixes #95800.

Telegram-originated plugin approvals, such as skill_workshop apply, could fail with a generic no-route or timeout message when Telegram native approvals were unavailable because channels.telegram.execApprovals.approvers and commands.ownerAllowFrom were not configured. The Telegram setup guidance already existed, but the agent-facing plugin approval failure did not surface it.

Why This Change Was Made

The approval hook already receives the turn source. This PR updates the agent-side plugin approval no-route failure path so it can append channel setup guidance when the initiating channel's native plugin approval delivery route is disabled and that channel exposes plugin-specific setup text.

Accepted plugin approval timeouts now use the gateway's accepted-route marker: delivered prompts remain plain Approval timed out, while requests kept pending only by turn-source approval routing receive the same setup guidance. Visible approval clients no longer mask that turn-source marker, because a native approval runtime can be connected and still skip a request via its own shouldHandle logic.

The setup text is plugin-surface aware. Split-route channels with exec setup text but no plugin setup capability keep the generic plugin approval failure instead of receiving misleading exec setup instructions.

The final compatibility shape keeps approval authorization separate from native delivery setup guidance. Plugin approval availability used by /approve plugin:<id> remains based on configured approvers, so forwarded approvals from authorized operators still work even when native Telegram delivery is disabled. The native delivery state is used only to decide whether the failure reason should include setup guidance.

This keeps the current approver-gating model intact and does not auto-route, auto-approve, or enable Telegram approvals.

User Impact

Telegram-only operators get an actionable explanation telling them to use Web UI or terminal UI for now, or configure channels.telegram.execApprovals.approvers / commands.ownerAllowFrom, instead of a silent timeout-shaped denial.

Operators on split-route channels are not told to enable exec approvals for plugin approval failures unless the channel explicitly exposes plugin approval setup guidance.

Authorized approvers can still resolve forwarded plugin:<id> approvals even when native Telegram delivery is disabled.

Plugin authors now have documented guidance for approvalCapability.describePluginApprovalSetup, including that approver availability and native delivery availability are separate concerns.

Evidence

  • Current head: 90b7832dfe3a46055cd114cac59de1192418b514.
  • Out-of-scope follow-up code commit 34e3c10e23ec8d3cf00ff803188df4226cd60f8d was reverted by e924d2813c19d808fa1a583da03b10b642d162f2; this body describes only the current PR diff.
  • Review-response commit 59039ea530878706fdd70fad22eb2fcfee573b05 addresses the compatibility blocker by preserving approver-based plugin approval availability while using native delivery state only for setup guidance.
  • Review-response commit d348ee93e666697bb8aa55f83a00d069f2dd5801 addresses the split-route setup-copy blocker by removing the SDK helper-wide fallback from exec setup guidance to plugin setup guidance. Telegram now opts in explicitly because its plugin and exec approval setup guidance intentionally match; Slack does not opt in, so plugin approval failures cannot inherit Slack exec setup copy.
  • Scope-reduction commit b2faa9098063346dfdc47f08ed81b26087bcf1e2 removed the earlier broad e2e regression additions without changing runtime behavior.
  • Review-response commit e68cfa2cd8adc25344b45814994f753fcaa370c1 addressed the routed-timeout blocker by keeping setup guidance out of blindly accepted timeouts.
  • Review-response commit 179c4920fc961957020d8de620f8bd83ac4cdb2b addresses the accepted-but-undelivered timeout blocker by carrying the gateway accepted-route marker into the agent timeout branch; deliveryRoute: "turn-source" gets setup guidance, while delivered routes stay plain timeouts.
  • Review-response commit 90b7832dfe3a46055cd114cac59de1192418b514 addresses the visible-approval-client route blocker by letting turn-source routing stay explicit when a visible approval client exists but no delivery confirms. The focused regression covers a connected approval client plus an available turn-source route and asserts the accepted response reports deliveryRoute: "turn-source".

Real behavior proof for the user-facing Telegram failure path, captured on this PR branch at 858a7b2dda28a07982af45e01caad1b50644765b:

node --import tsx --input-type=module <stdin>

Run setup:

spawned a real isolated OpenClaw Gateway child from dist/index.js
staged the Telegram plugin
set skills.workshop.approvalPolicy=pending
set channels.telegram.enabled=true
left channels.telegram.execApprovals.approvers unset
set commands.ownerAllowFrom=[]
called runBeforeToolCallHook for skill_workshop apply
set turnSourceChannel=telegram and turnSourceAccountId=default
actual path: runBeforeToolCallHook -> requestPluginToolApproval -> gateway plugin.approval.request

Observed output:

OpenClaw PR #95973 real behavior proof
head=858a7b2dda28a07982af45e01caad1b50644765b
gateway=real child pid=12130 baseUrl=http://127.0.0.1:60953
path=runBeforeToolCallHook -> requestPluginToolApproval -> gateway plugin.approval.request
turnSourceChannel=telegram turnSourceAccountId=default
approvalSurface=telegram enabled with no approvers and empty commands.ownerAllowFrom
result.blocked=true
result.reason:
Plugin approval unavailable (no approval route)

Approve it from the Web UI or terminal UI for now. Telegram supports native exec approvals for this account. Configure `channels.telegram.execApprovals.approvers` or `commands.ownerAllowFrom`; leave `channels.telegram.execApprovals.enabled` unset/`auto` or set it to `true`.

This is not a unit-test-only proof: the run used the real agent approval hook and real Gateway plugin approval request path. The provider was mock-openai, which is not involved in plugin approval routing. The current-head patch keeps that Telegram no-route failure reason intact and narrows the accepted-timeout classification around actual delivery versus turn-source-only routing.

Current-head focused regression proof for 90b7832dfe3a46055cd114cac59de1192418b514:

node scripts/run-vitest.mjs src/agents/agent-tools.before-tool-call.e2e.test.ts src/gateway/server-methods/approval-shared.test.ts src/gateway/server-methods/plugin-approval.test.ts

Result: 2 Vitest shards passed. Gateway shard: 4 files passed, 114 tests passed. E2E shard: 1 file passed, 58 tests passed.

node scripts/run-vitest.mjs src/infra/exec-approval-channel-runtime.test.ts src/infra/approval-native-runtime.test.ts src/plugin-sdk/approval-delivery-helpers.test.ts

Result: 2 Vitest shards passed. Infra shard: 2 files passed, 27 tests passed. Plugin SDK shard: 1 file passed, 7 tests passed.

node scripts/run-tsgo.mjs -p test/tsconfig/tsconfig.test.src.json --incremental --tsBuildInfoFile .artifacts/tsgo-cache/test-src.tsbuildinfo
./node_modules/.bin/oxfmt --check --threads=1 src/gateway/server-methods/approval-shared.ts src/gateway/server-methods/approval-shared.test.ts
git diff --check
pnpm build

Result: all passed. pnpm build emitted the existing Vite large-chunk warning for the control UI bundle.

The focused coverage asserts:

  • A split-route channel with exec setup text but no plugin setup capability does not reuse exec setup guidance for plugin approval failures.
  • Native delivery state is used for setup guidance selection when plugin approval delivery is disabled.
  • Plugin approval availability remains approver-based when native delivery is off, preserving existing /approve plugin:<id> behavior.
  • Forwarded Telegram plugin approvals from configured approvers still resolve when native delivery is disabled.
  • The plugin SDK helper carries the optional plugin setup capability through the approval capability shape.
  • The channel approval adapter and approval surface helper still resolve the expected capability surfaces.
  • The real Gateway proof above covers the user-facing Telegram no-route failure path.
  • Gateway accepted responses distinguish actual forwarder delivery, visible approval-client routing, turn-source-only routing, and no route.
  • Accepted turn-source-only Telegram plugin approval timeouts with native delivery disabled append setup guidance; delivered approval routes stay plain Approval timed out.
  • Visible approval clients do not suppress the turn-source delivery marker when no delivery confirms, so a connected runtime that skips the request cannot hide setup guidance on timeout.

Autoreview note: .agents/skills/autoreview/scripts/autoreview --mode local could not start because the local Codex CLI config has service_tier=priority, which this helper rejects as an unknown variant; it expected fast or flex. It failed before reviewing code; no autoreview findings were produced.

GitHub checks for 90b7832dfe3a46055cd114cac59de1192418b514 are queued/running after the latest push.

Notes

  • The first push to openclaw/openclaw failed with GitHub 403, so this PR is from the MonkeyLeeT/openclaw fork with maintainer edits enabled.
  • Issue assignment to @steipete also failed from this token with GitHub 403.

@openclaw-barnacle openclaw-barnacle Bot added agents Agent runtime and tooling size: S labels Jun 23, 2026
@MonkeyLeeT MonkeyLeeT changed the title Explain disabled Telegram plugin approval failures fix(telegram): explain disabled plugin approval failures Jun 23, 2026
@MonkeyLeeT
MonkeyLeeT marked this pull request as ready for review June 23, 2026 05:10

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 638d5ce825

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/agents/agent-tools.before-tool-call.ts Outdated

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 193c044912

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/agents/agent-tools.before-tool-call.ts Outdated

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

Current head 193c0449123007e04d8102fcfb9d834249392769 includes the native-delivery follow-up patch; please run a fresh exact review on this head.

@clawsweeper

clawsweeper Bot commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: the existing ClawSweeper review comment will be edited in place when the review finishes.

@clawsweeper

clawsweeper Bot commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed July 2, 2026, 5:12 PM ET / 21:12 UTC.

Summary
The PR adds plugin-specific native approval setup guidance to Telegram-originated plugin approval no-route and turn-source timeout failures by extending channel approval capabilities, gateway delivery-route markers, agent failure text, docs, and focused tests.

PR surface: Source +303, Tests +827, Docs +25, Config 0, Other +887. Total +2042 across 79 files.

Reproducibility: yes. The linked issue and prior review source-reproduced the generic Telegram plugin approval no-route/timeout path, and the Mantis before/after proof shows baseline generic failure text versus candidate setup guidance.

Review metrics: 2 noteworthy metrics.

  • Effective Merge Surface: 15 files in potential merge, 0 dependency files. The live PR file list shows stale-base drift, but the merge result against current main is the relevant surface for dependency and supply-chain review.
  • Approval Contract Markers: 1 optional SDK callback, 1 gateway route marker. These small additive surfaces carry the compatibility semantics maintainers need to notice before merge.

Stored data model
Persistent data-model change detected: migration/backfill/repair: pnpm-lock.yaml, migration/backfill/repair: src/commands/doctor-auth.hints.test.ts, migration/backfill/repair: src/commands/doctor-auth.ts, unknown-data-model-change: extensions/memory-lancedb/npm-shrinkwrap.json, vector/embedding metadata: extensions/memory-lancedb/npm-shrinkwrap.json. Confirm migration or upgrade compatibility proof before merge.

Root-cause cluster
Relationship: fixed_by_candidate
Canonical: #95800
Summary: This PR is the open candidate fix for the canonical Telegram native approval no-route/timeout guidance bug; the duplicate-approval PR is related approval delivery work but not the same remaining root cause.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Merge readiness
Overall: 🐚 platinum hermit
Proof: 🦞 diamond lobster ✨ media proof bonus
Patch quality: 🐚 platinum hermit
Result: ready for maintainer review.

Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch.

Rank-up moves:

  • [P2] If dependency-graph guard remains blocked, refresh or rerun it against the current potential merge because the effective merge does not change dependency files.

Risk before merge

  • [P1] The PR adds an optional plugin SDK approval setup hook and a gateway accepted-response deliveryRoute marker, so maintainers should treat the API semantics as compatibility-sensitive even though the field is additive and documented.
  • [P2] The route marker controls whether a timeout is explained as undelivered turn-source setup versus a delivered approval that simply expired; tests and Telegram proof cover the intended cases, but this remains the message-delivery invariant to preserve.
  • [P1] The branch is behind current main and generated stale dependency-guard comments from the PR diff; the potential merge commit shows no dependency files, but a rebase or guard rerun may still be needed if required checks keep evaluating stale-base files.

Maintainer options:

  1. Accept the additive approval contract (recommended)
    Maintainers can accept the documented optional SDK hook and gateway route marker, then land after required checks confirm the effective merge result.
  2. Refresh stale dependency-guard state
    If dependency-graph guard checks remain blocked, rebase or rerun the guard against the potential merge commit because the actual merge result does not change dependency files.

Next step before merge

  • No ClawSweeper repair is needed; the remaining action is normal maintainer landing/check handling for a reviewed PR with sufficient proof.

Security
Cleared: No effective merge-result security or supply-chain regression was found; dependency files appear only in the stale PR diff, not in the potential merge commit against current main.

Review details

Best possible solution:

Land the focused approval-failure guidance once exact-head checks and guard state agree with the potential merge result, keeping approver authorization separate from native delivery/setup guidance.

Do we have a high-confidence way to reproduce the issue?

Yes. The linked issue and prior review source-reproduced the generic Telegram plugin approval no-route/timeout path, and the Mantis before/after proof shows baseline generic failure text versus candidate setup guidance.

Is this the best way to solve the issue?

Yes. Appending channel-owned plugin setup guidance only when the plugin hook exists and native delivery is disabled is the narrow fix; auto-routing, doctor hints, or broader discoverability can remain follow-up work.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 968aa51b8000.

Label changes

Label changes:

  • add proof: sufficient: Contributor real behavior proof is sufficient. Mantis Telegram Desktop before/after screenshots show the changed real Telegram failure response, and the PR body includes real Gateway/agent-hook terminal proof for the same path.
  • add proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence. Mantis Telegram Desktop before/after screenshots show the changed real Telegram failure response, and the PR body includes real Gateway/agent-hook terminal proof for the same path.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (screenshot): Mantis Telegram Desktop before/after screenshots show the changed real Telegram failure response, and the PR body includes real Gateway/agent-hook terminal proof for the same path.
  • remove rating: 🦪 silver shellfish: Current PR rating is rating: 🐚 platinum hermit, so this older rating label is no longer current.
  • remove status: 📣 needs proof: Current PR status label is status: 👀 ready for maintainer look.

Label justifications:

  • P2: This fixes a normal-priority Telegram/plugin approval failure mode with limited blast radius and clear validation.
  • merge-risk: 🚨 compatibility: The PR adds an optional plugin SDK approval setup callback and a gateway accepted-response route marker that plugin/client integrations may observe.
  • merge-risk: 🚨 message-delivery: The changed route classification controls whether approval timeout guidance is shown for undelivered turn-source routes versus delivered approval prompts.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (screenshot): Mantis Telegram Desktop before/after screenshots show the changed real Telegram failure response, and the PR body includes real Gateway/agent-hook terminal proof for the same path.
  • proof: sufficient: Contributor real behavior proof is sufficient. Mantis Telegram Desktop before/after screenshots show the changed real Telegram failure response, and the PR body includes real Gateway/agent-hook terminal proof for the same path.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence. Mantis Telegram Desktop before/after screenshots show the changed real Telegram failure response, and the PR body includes real Gateway/agent-hook terminal proof for the same path.
  • mantis: telegram-visible-proof: Mantis should capture Telegram visible proof. This changes visible Telegram chat failure text, so Telegram Desktop proof is the right label and is now present.
Evidence reviewed

PR surface:

Source +303, Tests +827, Docs +25, Config 0, Other +887. Total +2042 across 79 files.

View PR surface stats
Area Files Added Removed Net
Source 22 486 183 +303
Tests 18 866 39 +827
Docs 6 38 13 +25
Config 1 1 1 0
Generated 0 0 0 0
Other 32 1322 435 +887
Total 79 2713 671 +2042

What I checked:

Likely related people:

  • @gumadeiras: Prior merged work centralized native approval lifecycle assembly and made exec approval fallback guidance channel-specific on the same plugin SDK and Telegram approval capability surfaces. (role: native approval lifecycle contributor; confidence: high; commits: d78512b09d1d, 0ef9383487a2, c87c8e66bf7d; files: src/plugin-sdk/approval-delivery-helpers.ts, extensions/telegram/src/approval-native.ts, src/infra/exec-approval-surface.ts)
  • @steipete: Recent history includes gateway approval helper refactors and the maintainer route-classification commits on this PR, so this person is a strong routing candidate for the accepted-response semantics. (role: recent approval routing contributor; confidence: high; commits: b1117d98622f, 3ff1c4193099, c6c170bc90f7; files: src/gateway/server-methods/approval-shared.ts, src/channels/plugins/approvals.ts)
  • @vincentkoc: History on the gateway approval helper shows multiple shared approval registration, lookup, resolve, and visibility refactors that shape this PR's routing boundary. (role: shared approval helper contributor; confidence: medium; commits: 5adc681238c6, 56eadf36d019, c9e481ac48e5; files: src/gateway/server-methods/approval-shared.ts, src/agents/agent-tools.before-tool-call.ts)
  • @joshavant: Recent merged work on reviewer-device approval routing touched the same shared gateway approval request delivery path and is adjacent to route classification. (role: recent adjacent approval delivery contributor; confidence: medium; commits: 5d1e649aeadf; files: src/gateway/server-methods/approval-shared.ts)
What the crustacean ranks mean
  • 🦀 challenger crab: rare, exceptional readiness with strong proof, clean implementation, and convincing validation.
  • 🦞 diamond lobster: very strong readiness with only minor maintainer review expected.
  • 🐚 platinum hermit: good normal PR, likely mergeable with ordinary maintainer review.
  • 🦐 gold shrimp: useful signal, but proof or patch confidence is still limited.
  • 🦪 silver shellfish: thin signal; proof, validation, or implementation needs work.
  • 🧂 unranked krab: not merge-ready because proof is missing/unusable or there are serious correctness or safety concerns.
  • 🌊 off-meta tidepool: rating does not apply to this item.

Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

How this review workflow works
  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

@clawsweeper clawsweeper Bot added rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. mantis: telegram-visible-proof Mantis should capture Telegram visible proof. P2 Normal backlog priority with limited blast radius. labels Jun 23, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: da449cf6be

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/agents/agent-tools.before-tool-call.ts Outdated
@MonkeyLeeT
MonkeyLeeT force-pushed the codex/95800-telegram-approval-feedback branch from da449cf to ca2e0b1 Compare June 24, 2026 00:33

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ca2e0b1244

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/agents/agent-tools.before-tool-call.ts Outdated
@openclaw-barnacle openclaw-barnacle Bot added channel: telegram Channel integration: telegram size: M and removed size: S labels Jun 24, 2026
@MonkeyLeeT

MonkeyLeeT commented Jun 24, 2026

Copy link
Copy Markdown
Contributor Author

Superseded by the latest patch-quality fix and PR body refresh.

Current head 858a7b2dda28a07982af45e01caad1b50644765b addresses the remaining ClawSweeper P2 concern by making plugin approval failure guidance use plugin-specific setup text instead of reusing exec setup text. The PR body includes copied live output from a real isolated Gateway child using the production approval path:

runBeforeToolCallHook -> requestPluginToolApproval -> gateway plugin.approval.request
turnSourceChannel=telegram turnSourceAccountId=default
approvalSurface=telegram enabled with no approvers and empty commands.ownerAllowFrom
result.blocked=true
result.reason:
Plugin approval unavailable (no approval route)

Approve it from the Web UI or terminal UI for now. Telegram supports native exec approvals for this account. Configure `channels.telegram.execApprovals.approvers` or `commands.ownerAllowFrom`; leave `channels.telegram.execApprovals.enabled` unset/`auto` or set it to `true`.

The current head also adds split-route regression coverage so channels with exec setup text but no plugin setup capability do not receive misleading exec setup instructions for plugin approval failures.

@clawsweeper

clawsweeper Bot commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: the existing ClawSweeper review comment will be edited in place when the review finishes.

@MonkeyLeeT

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

Current head e924d2813c19d808fa1a583da03b10b642d162f2 has the PR body refreshed with real behavior proof. The copied output is from an isolated real Gateway child and the production approval path:

runBeforeToolCallHook -> requestPluginToolApproval -> gateway plugin.approval.request
turnSourceChannel=telegram turnSourceAccountId=default
approvalSurface=telegram enabled with no approvers and empty commands.ownerAllowFrom
result.blocked=true
result.reason:
Plugin approval unavailable (no approval route)

Approve it from the Web UI or terminal UI for now. Telegram supports native exec approvals for this account. Configure `channels.telegram.execApprovals.approvers` or `commands.ownerAllowFrom`; leave `channels.telegram.execApprovals.enabled` unset/`auto` or set it to `true`.

No implementation changes were made for this proof-only refresh.

@clawsweeper

clawsweeper Bot commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: the existing ClawSweeper review comment will be edited in place when the review finishes.

@clawsweeper clawsweeper Bot added the proof: sufficient ClawSweeper judged the real behavior proof convincing. label Jun 24, 2026
@steipete steipete self-assigned this Jul 2, 2026
@steipete

steipete commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

@openclaw-mantis Telegram visible proof.

Compare this PR head with its baseline using a real Telegram user in Crabbox. Configure Telegram so native exec/plugin approvals have no configured approver: omit or disable channels.telegram.execApprovals, and do not configure commands.ownerAllowFrom. From Telegram, trigger a deterministic plugin approval; prefer skill_workshop with action: apply and a harmless missing proposal id, or another built-in plugin-approval path that cannot mutate user data. Wait for the no-route or timeout response.

Required proof: baseline lacks actionable Telegram setup guidance; candidate explains how to enable channels.telegram.execApprovals.enabled, set channels.telegram.execApprovals.approvers, or use commands.ownerAllowFrom. Capture the visible Telegram response plus transcript/report evidence. Unit tests or a mocked transport alone are not sufficient.

@steipete

steipete commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

@openclaw-mantis Telegram visible proof.

Retry the exact-head comparison for PR #95973. Prior run 28614561109 skipped both baseline and candidate because the shared Telegram Desktop session was unavailable; it did not test or find a product failure.

Compare current PR head 3ff1c41 with its baseline using a real Telegram user in Crabbox. Configure Telegram with no native exec/plugin approval route: omit or disable channels.telegram.execApprovals, and do not configure commands.ownerAllowFrom. From Telegram, trigger a deterministic plugin approval; prefer skill_workshop with action: apply and a harmless missing proposal id, or another built-in plugin-approval path that cannot mutate user data. Wait for the no-route or timeout response.

Required proof: baseline lacks actionable Telegram setup guidance; candidate explains how to enable channels.telegram.execApprovals.enabled, set channels.telegram.execApprovals.approvers, or use commands.ownerAllowFrom. Capture the visible Telegram response plus transcript/report evidence. Unit tests or a mocked transport alone are insufficient.

@steipete

steipete commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

@mantis please rerun the Telegram Desktop comparison for exact candidate head 3ff1c41930994c176b965d25313fb34ced9dd816 with a deterministic approval-triggering model response.

The previous run correctly exercised the real Telegram/Gateway path, but the default scripts/e2e/mock-openai-server.mjs returns plain text for an ordinary prompt, so it could never call skill_workshop and both comparison sides skipped before reaching the approval behavior.

For this proof only, in each detached proof worktree, use an uncommitted temporary mock response that:

  1. returns an OpenAI Responses function call to skill_workshop with arguments {"action":"apply","proposal_id":"mantis-nonexistent"} on the first model turn;
  2. returns final text after receiving the function output;
  3. exposes the tool explicitly with the coding tool profile or tools.alsoAllow;
  4. keeps the plugin approval policy at its default pending behavior;
  5. configures no Telegram approval recipients, no Telegram owner allowlist, and no active WebUI/TUI approval client.

Keep the real Telegram user, Telegram transport, Gateway, agent tool loop, and Crabbox Desktop verification unchanged. Only the deterministic mock model response should differ from the standard proof setup.

Required comparison:

  • Baseline a004e18b4bbd30b784239741e07fdcaf569968f2: the Telegram reply reaches the generic approval failure/timeout without Telegram setup guidance.
  • Candidate 3ff1c41930994c176b965d25313fb34ced9dd816: the Telegram reply includes actionable Telegram setup guidance naming channels.telegram.execApprovals.approvers, commands.ownerAllowFrom, and the enabled/auto options.

Please publish the before/after Telegram Desktop evidence and exact refs used.

@steipete

steipete commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

@openclaw-mantis please rerun the Telegram Desktop proof comparison for exact candidate head 3ff1c41930994c176b965d25313fb34ced9dd816 with a deterministic approval-triggering model response.

The previous run correctly exercised the real Telegram/Gateway path, but the default scripts/e2e/mock-openai-server.mjs returns plain text for an ordinary prompt, so it could never call skill_workshop and both comparison sides skipped before reaching the approval behavior.

For this proof only, in each detached proof worktree, use an uncommitted temporary mock response that:

  1. returns an OpenAI Responses function call to skill_workshop with arguments {"action":"apply","proposal_id":"mantis-nonexistent"} on the first model turn;
  2. returns final text after receiving the function output;
  3. exposes the tool explicitly with the coding tool profile or tools.alsoAllow;
  4. keeps the plugin approval policy at its default pending behavior;
  5. configures no Telegram approval recipients, no Telegram owner allowlist, and no active WebUI/TUI approval client.

Keep the real Telegram user, Telegram transport, Gateway, agent tool loop, and Crabbox Desktop verification unchanged. Only the deterministic mock model response should differ from the standard proof setup.

Required comparison:

  • Baseline a004e18b4bbd30b784239741e07fdcaf569968f2: the Telegram reply reaches the generic approval failure/timeout without Telegram setup guidance.
  • Candidate 3ff1c41930994c176b965d25313fb34ced9dd816: the Telegram reply includes actionable Telegram setup guidance naming channels.telegram.execApprovals.approvers, commands.ownerAllowFrom, and the enabled/auto options.

Please publish the before/after Telegram Desktop evidence and exact refs used.

@mantis

mantis commented Jul 2, 2026

Copy link
Copy Markdown

Hi, Not a member of this project

@openclaw-mantis

Copy link
Copy Markdown
Contributor

Mantis Telegram Desktop Proof

Summary: Mantis captured native Telegram Desktop before/after GIF evidence for Telegram plugin approval setup guidance.

Main screenshot This PR screenshot
Baseline native Telegram Desktop screenshot Candidate native Telegram Desktop screenshot
Main This PR
Baseline native Telegram Desktop proof GIF Candidate native Telegram Desktop proof GIF

Motion-trimmed clips:

Raw QA files: https://artifacts.openclaw.ai/mantis/telegram-desktop/pr-95973/run-28619690514-1/index.json

@steipete

steipete commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Land-ready maintainer proof

The maintainer pass tightened the cross-channel behavior before landing:

  • delivered forwarders and active visible approval clients remain authoritative, so Telegram setup guidance appears only when Telegram is the undelivered turn source;
  • the channel-owned describePluginApprovalSetup capability is projected through the SDK adapter consistently;
  • approver authorization and allowlists remain unchanged and separate from delivery availability.

Validation on exact candidate head 3ff1c41930994c176b965d25313fb34ced9dd816:

  • scripts/pr review-tests 95973 src/gateway/server-methods/approval-shared.test.ts src/channels/plugins/approvals.test.ts — 61 tests passed;
  • fresh Codex autoreview — clean, no actionable findings, 0.82 confidence;
  • hosted CI — all exact-head checks passed;
  • real-user Telegram Desktop/Crabbox proof — baseline a004e18b4bbd30b784239741e07fdcaf569968f2 shows only the generic no-route failure; candidate 3ff1c41930994c176b965d25313fb34ced9dd816 adds the actionable Telegram setup guidance. The evidence manifest reports baseline pass, candidate pass/fixed, and overall true.

The Mantis workflow's product proof job passed. Its overall run is red only because the final, unrelated cleanup step could not remove the workflow's eyes reaction (403 Resource not accessible by integration) after artifacts and the evidence comment were already published.

Review artifacts validate with zero findings and zero proof gaps. Ready to land.

@github-actions

github-actions Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Dependency Guard

This PR changes dependency-related files. Maintainers should confirm these changes are intentional.

Changed files:

  • extensions/memory-lancedb/npm-shrinkwrap.json
  • extensions/memory-lancedb/package.json
  • extensions/msteams/npm-shrinkwrap.json
  • extensions/slack/npm-shrinkwrap.json
  • pnpm-lock.yaml

Maintainer follow-up:

  • Review whether the dependency changes are intentional.
  • Inspect resolved package deltas when lockfile, shrinkwrap, or workspace dependency policy changes are present.
  • Treat package-lock.json and npm-shrinkwrap.json diffs as security-review surfaces.
  • Run pnpm deps:changes:report -- --base-ref origin/main --markdown /tmp/dependency-changes.md --json /tmp/dependency-changes.json locally for detailed release-style evidence.

@github-actions

github-actions Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Dependency graph change authorized

This PR includes dependency graph changes. A repository admin or member of @openclaw/openclaw-secops authorized this exact head SHA with /allow-dependencies-change.

  • Approved SHA: c6c170bc90f7472465ce74cdbc1f7ad22c9e31a2
  • Approved by: @steipete
  • Reason: Verified wrapper-sync false positive: the GraphQL verified sync commit keeps the old PR head as its parent while copying the rebased tree. All reported dependency files are byte-identical to current origin/main; the actual origin/main..c6c1

A later push changes the PR head SHA and requires a fresh security approval.

@mantis

mantis commented Jul 2, 2026

Copy link
Copy Markdown

Hi, Not a member of this project - receiving multiple spam emails from this ticket.

@steipete

steipete commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

/allow-dependencies-change Verified wrapper-sync false positive: the GraphQL verified sync commit keeps the old PR head as its parent while copying the rebased tree. All reported dependency files are byte-identical to current origin/main; the actual origin/main..c6c170b PR diff is unchanged from the reviewed/live-tested 15-file patch (SHA-256 131bbc4a36c98e3b27bfeb618df319c42757fcab9cf47abfe724f66c87674c36) and contains no dependency files.

@steipete

steipete commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Merged via squash.

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

Labels

agents Agent runtime and tooling app: android App: android app: ios App: ios channel: feishu Channel integration: feishu channel: msteams Channel integration: msteams channel: slack Channel integration: slack channel: telegram Channel integration: telegram commands Command implementations dependencies-changed PR changes dependency-related files docs Improvements or additions to documentation extensions: memory-lancedb Extension: memory-lancedb gateway Gateway runtime mantis: telegram-visible-proof Mantis should capture Telegram visible proof. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. merge-risk: 🚨 message-delivery 🚨 May drop, duplicate, misroute, suppress, or wrongly target messages. P2 Normal backlog priority with limited blast radius. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: XL status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Telegram: native approvals silently time out (no reason surfaced) when execApprovals/ownerAllowFrom unconfigured

3 participants