Repository navigation
fix(sandbox): resolve bundled channel in sandbox explain (companion to #189343) - #189880
jerome-queck wants to merge 9 commits into
Conversation
|
🦞👀 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. |
|
Thanks for the context here. I swept through the related work, and this is now duplicate or superseded. The original PR now contains the same diagnostic fix, both regression cases, and CLI proof, and is cleanly mergeable with a passing CI gate; this companion adds no distinct runtime repair. Root-cause cluster Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Canonical path: Land the diagnostic fix through the original PR and preserve this companion's optional Telegram permission tests by link. So I’m closing this here because the remaining work is already tracked in the canonical issue. Review detailsBest possible solution: Land the diagnostic fix through the original PR and preserve this companion's optional Telegram permission tests by link. Do we have a high-confidence way to reproduce the issue? Current source establishes the empty-registry failure, and the contributor supplies built-CLI before/after output; no target code was executed during this review. Is this the best way to solve the issue? The narrow diagnostic fallback uses existing channel owners and preserves runtime registry precedence; the original PR now implements the same solution. Security review: Security review cleared: The fallback changes diagnostic output while leaving sender authorization and execution boundaries unchanged. AGENTS.md: found and applied where relevant. What I checked:
Likely related people:
Codex review notes: model internal, reasoning medium; reviewed against 7f3a651fec39. |
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
…gate Covers the live half of openclaw#51245: a Telegram native slash context with no channel plugin registered is authorized by tools.elevated.allowFrom.telegram and a different sender is still denied.
5533450 to
9f9c057
Compare
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
…undled-channel-companion
…undled-channel-companion
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
Closing this in favour of #189343. @nikolas-sapa folded the channel-less session key test and the Linux built-CLI proof into the original, so it now carries the same fix and tests, and that's where the credit belongs. The extra |
Related: #51245 (partial: this fixes the
sandbox explaindiagnostic only; the live Telegram elevated-execution denial steipete kept open in that issue is not addressed here, so the issue should stay open).Builds on #189343 by @nikolas-sapa. Their commit is cherry-picked unchanged with authorship kept; this PR adds the test change and Linux proof that ClawSweeper asked for on #189343. Credit for the fix goes to @nikolas-sapa. If #189343 lands instead, this can be closed.
What Problem This Solves
openclaw sandbox explain --session telegram:slash:<id>reportschannel: (unknown)andallowedByConfig: falsewhen the CLI's plugin registry has no channel plugins (the sandbox-backends scope is empty for stock docker/podman configs), even withtools.elevated.allowFrom.telegramconfigured.User Impact
User impact:
openclaw sandbox explainshows the right channel andallowedByConfig: truefor telegram sessions on stock docker/podman setups, so elevated-tool allow lists can be checked without confusing(unknown)output.Why
agent:builder:main), so only the stored delivery context supplies telegram. It now fails if the stored-delivery fallback is removed (it previously passed because the key also resolved telegram).Evidence
Setup: Linux, built CLI, isolated HOME.
Config:
{"tools":{"elevated":{"enabled":true,"allowFrom":{"telegram":["123456"]}}}}Before (main 88217c9;
sandbox-explain.tsandchannels/registry.tsare unchanged from there to base 43a3abe):After (this branch 46de5b0c90f):
--jsonbefore/after: before"allowedByConfig": false(nochannelfield); after"channel": "telegram", "allowedByConfig": trueTests
Tests 2 failed | 18 skipped (20) (exit 1), both tests failTests 1 failed | 1 passed | 18 skipped (20) (exit 1), the stored-delivery test failsTests 2 passed | 18 skipped (20) (exit 0); whole file:Tests 20 passed (20) (exit 0)AI-assisted; all output above is from real runs.
Live elevated gate (second half of #51245)
Commit 553345060b6 adds regression tests for the runtime gate (
resolveElevatedPermissions, used byget-reply-directivesfor live Telegram turns). I checked the live path on current main: Telegram native slash turns reach the gate withProvider: "telegram", andtools.elevated.allowFrom.telegramis looked up by that provider. With no channel plugin registered, a Telegram slash context (SessionKey: telegram:slash:123456,SenderId: 123456) is authorized for["123456"],[123456]and["telegram:123456"], and a different sender is still denied. So no runtime code change is needed on main. The tests keep it that way. Thesandbox explainfix above was the remaining part of the issue.Test-lines baseline
No scalar baseline raise on this PR. After merging current
origin/main(50555bb134e), the local ratchet reportsTest lines OK: 6499381; ceiling: 6499390; slack: 9.Our allocationconfig/test-lines-allocations/sandbox-explain-bundled-channel-elevated.txtremains101and covers this PR's added test lines exactly. Earlier heads were blocked by inherited main debt (same class of failure #193183 reconciled); newer main landings cleared that debt, so a manual +7 baseline bump is unnecessary and was not applied.