Skip to content

fix(skills): carry the workspace-skills approval owner - #135406

Closed
gaoanze888 wants to merge 2 commits into
openclaw:mainfrom
gaoanze888:fix/workshop-approval-owner
Closed

gaoanze888 wants to merge 2 commits into
openclaw:mainfrom
gaoanze888:fix/workshop-approval-owner

Conversation

@gaoanze888

@gaoanze888 gaoanze888 commented Sep 1, 2026 •

Copy link
Copy Markdown

Closes #135291

What Problem This Solves

Fixes a 2026.8.1 regression where a Skill Workshop lifecycle approval (approvalPolicy: "pending") requested from a Telegram group produced a proposal but no approval/rejection buttons were delivered to the authorized owner DM, because the Gateway rejected the request with signed plugin approval owner is unavailable.

Why This Change Was Made

resolveSkillWorkshopToolApproval built a requireApproval object without a pluginId. The approval transport then called withGatewayToolApprovalOwner(undefined, ...), leaving approvalOwnerPluginId unset, and the Gateway's intentional fail-closed authority check rejected the ownerless request before Telegram delivery. This change carries the core workspace-skills owner on the approval so the signed request reaches the delivery path; the Gateway fail-closed validation is unchanged.

User Impact

Skill Workshop lifecycle approvals initiated in a Telegram group now reach the authorized owner's DM with approval/rejection buttons, so pending proposals can be approved or rejected instead of silently stalling.

Evidence

Exact head: 7c97cef9d5c1421a6a9fd92804839e7ef1ef9a8e.

  • src/skills/workshop/policy.test.ts — 9 passed, including a pluginId: "workspace-skills" assertion on the pending approval result.
  • src/agents/agent-tools.before-tool-call.embedded-mode.test.ts — new boundary regression "routes skill_workshop lifecycle approvals through the workspace-skills owner": with approvalPolicy: "pending", a real skill_workshop apply call reaches plugin.approval.request through the production approval path (not a mocked hook result). 26 passed across both files.
  • Production typecheck and check:changed pass; the only local lane failure is unchanged ui/vite.config.ts missing a pako declaration in the reused dependency tree.

AI Assistance

AI-assisted implementation. I manually verified the approval registration boundary, the owner propagation, the focused producer and boundary regressions, and the changed-file gates.

@clawsweeper

clawsweeper Bot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

@clawsweeper clawsweeper Bot added P1 High-priority user-facing bug, regression, or broken workflow. proof: telegram-e2e This PR needs Telegram Test Server proof with the repository E2E skill. 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. labels Sep 1, 2026
@clawsweeper

clawsweeper Bot commented Sep 1, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs real behavior proof before merge. Reviewed September 1, 2026, 7:39 PM ET / 23:39 UTC.

ClawSweeper review

What this changes

The PR adds the workspace-skills owner to pending Skill Workshop approvals and adds focused policy and agent-hook tests.

Regression provenance

Possible regression — probable (reviewed change; failure trace). No predecessor PR is attributed.

Merge readiness

⛔ Blocked until real behavior proof from a real setup is added - 5 items remain

The producer-side change matches the Gateway’s signed-owner contract, but the revised regression still does not observe that signed owner or a delivered Telegram approval.

Priority: P1
Reviewed head: fc886cdadb12f392238806b20af33ac70c2e04ee

Review scores

Measure Result What it means
Overall readiness 🦪 silver shellfish (2/6) The producer-side repair is focused and source-supported, but the new regression misses the signed boundary and no delivery proof is attached.
Proof confidence 🦪 silver shellfish (2/6) Needs real behavior proof before merge: Skill Workshop policy is the changed producer and the PR's test reaches approval transport, but callGatewayTool is mocked and the supplied evidence does not show a signed Gateway request, a Telegram owner-DM prompt, or a resolved approval after the fix. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
Patch quality 🦐 gold shrimp (3/6) 1 actionable review finding remain.

Verification

Check Result Evidence
Real behavior Needs proof Needs real behavior proof before merge: Skill Workshop policy is the changed producer and the PR's test reaches approval transport, but callGatewayTool is mocked and the supplied evidence does not show a signed Gateway request, a Telegram owner-DM prompt, or a resolved approval after the fix. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
Evidence reviewed 8 items Producer fix: The PR adds the fixed workspace-skills owner at the core policy that produces pending lifecycle approvals.
Current and shipped behavior: Both current main and v2026.8.2 construct the pending approval without pluginId, so neither contains this repair.
Gateway owner contract: A signed runtime request without an approval owner is rejected before registration, while a signed owner becomes the approval record's plugin identity.
Findings 1 actionable finding [P2] Assert the owner at the signed Gateway boundary
Security None None.

How this fits together

Skill Workshop creates pending lifecycle approvals; the agent layer signs them for the Gateway, which routes an interactive decision to the authorized channel owner.

flowchart LR
A[Skill Workshop action] --> B[Pending approval policy]
B --> C[Agent approval transport]
C --> D[Signed Gateway request]
D --> E[Telegram owner DM]
E --> F[Approval decision]
Loading

Before merge

  • Add real behavior proof - Needs real behavior proof before merge: Skill Workshop policy is the changed producer and the PR's test reaches approval transport, but callGatewayTool is mocked and the supplied evidence does not show a signed Gateway request, a Telegram owner-DM prompt, or a resolved approval after the fix. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
  • Assert the owner at the signed Gateway boundary (P2) - This new test only verifies that the mocked transport receives plugin.approval.request; because it supplies no gateway caller identity, it passes on the pre-fix policy that has no owner. Observe workspace-skills in the signed runtime identity, or an equivalent mock-Gateway registration verdict, from this skill_workshop path.
  • Resolve merge risk (P1) - The PR changes the signed owner that allows this approval request to reach the delivery path, but there is no direct evidence that a Telegram owner-DM approval is registered, delivered, and resolved.
  • Resolve merge risk (P1) - The bug fix has a small production increase (+3); source inspection supports retaining the owner at the policy producer, but the regression should prove that boundary.
  • Complete next step (P2) - The code-level proof gap is clear, but external real-behavior evidence must come from the contributor before this PR can merge.

Findings

  • [P2] Assert the owner at the signed Gateway boundary — src/agents/agent-tools.before-tool-call.embedded-mode.test.ts:198-200
Agent review details

Security

None.

PR surface

Source +3, Tests +18. Total +21 across 3 files.

View PR surface stats
Area Files Added Removed Net
Source 1 3 0 +3
Tests 2 18 0 +18
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 3 21 0 +21

Review metrics

Metric Value Why it matters
Production vs test LOC production +3, tests +18 The production addition is one static owner at the policy producer; the added tests do not observe the signed request or delivery outcome.

Root-cause cluster

Relationship: fixed_by_candidate
Canonical: #135291
Summary: This PR is the explicitly linked candidate repair for the canonical Skill Workshop approval-delivery regression.

Members:

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

Merge-risk options

Maintainer options:

  1. Prove the signed delivery path (recommended)
    Before merge, show a redacted Telegram Test Server run or supported mock-Gateway verdict that records registration, owner-DM delivery, and resolution with the signed workspace-skills owner.
  2. Pause pending endpoint evidence
    Keep the PR open until the owner-boundary and Telegram delivery evidence is available.

Technical review

Best possible solution:

Keep the producer-side owner field, add one regression that observes workspace-skills in the signed Gateway request from a real Skill Workshop apply path, and attach a redacted Telegram Test Server run or supported mock-Gateway delivery-and-resolution verdict.

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

Yes, source-reproducible: current main omits the owner, its transport signs that value, and the Gateway rejects signed requests with no owner; no real Telegram run was performed in this read-only review.

Is this the best way to solve the issue?

Yes for the producer location: the policy creates the approval object and the transport deliberately signs its pluginId, while moving ownership into transport code would detach it from the policy that owns it.

Full review comments:

  • [P2] Assert the owner at the signed Gateway boundary — src/agents/agent-tools.before-tool-call.embedded-mode.test.ts:198-200
    This new test only verifies that the mocked transport receives plugin.approval.request; because it supplies no gateway caller identity, it passes on the pre-fix policy that has no owner. Observe workspace-skills in the signed runtime identity, or an equivalent mock-Gateway registration verdict, from this skill_workshop path.
    Confidence: 0.98

Overall correctness: patch is incorrect
Overall confidence: 0.98

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 80ae248de1c0.

Labels

Label justifications:

  • P1: This repairs a reported regression that blocks configured interactive Skill Workshop approvals through Telegram.
  • merge-risk: 🚨 message-delivery: The changed signed owner gates whether the Gateway accepts the approval request before owner-DM delivery.
  • rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦪 silver shellfish and patch quality is 🦐 gold shrimp.
  • status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask. Needs real behavior proof before merge: Skill Workshop policy is the changed producer and the PR's test reaches approval transport, but callGatewayTool is mocked and the supplied evidence does not show a signed Gateway request, a Telegram owner-DM prompt, or a resolved approval after the fix. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
  • proof: telegram-e2e: This PR needs Telegram Test Server proof with the repository E2E skill. The claimed repaired outcome is visible Telegram owner-DM approval buttons and their decision result.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • Harjoth Khara: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Add a regression that fails before the fix by observing workspace-skills in the signed Gateway request from a Skill Workshop apply.
  • Attach redacted Telegram Test Server evidence or a supported mock-Gateway verdict showing request delivery and approval resolution; update the PR body for automatic re-review.

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
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.

Workflow

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

History

Review history (2 earlier review cycles)
  • reviewed 2026-09-01T18:09:33.050Z sha 5390ef4 :: needs real behavior proof before merge. :: none
  • reviewed 2026-09-01T23:19:16.478Z sha 7c97cef9d5c1421a6a9fd92804839e7ef1ef9a8e :: needs real behavior proof before merge. :: [P2] Exercise the signed approval-owner boundary

@openclaw-barnacle openclaw-barnacle Bot added the agents Agent runtime and tooling label Sep 1, 2026
@gaoanze888

This comment was marked as spam.

@clawsweeper

clawsweeper Bot commented Sep 1, 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 exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@clawsweeper clawsweeper Bot added merge-risk: 🚨 message-delivery 🚨 May drop, duplicate, misroute, suppress, or wrongly target messages. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. and removed rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. labels Sep 1, 2026
@steipete steipete self-assigned this Sep 5, 2026
steipete added a commit that referenced this pull request Sep 5, 2026
Carry the core Workshop policy owner through the existing signed approval
transport, so pending lifecycle actions can reach authorized Telegram DMs.
Consolidate lifecycle action metadata and verify the signed owner boundary.

Fixes #135291. Based on #135406 by @gaoanze888; reported by @khaisis.
Production LOC: +27/-43 (-16); tests: +38/-0.

Co-authored-by: gaoanze <gaoanze@meituan.com>
@steipete

steipete commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

Landed in #139248 as 911d7d5b0c10. Thanks @gaoanze888; your contributor credit is preserved in the landed commit.

The takeover retains the producer-side owner repair, consolidates lifecycle metadata, and adds regressions that fail before the fix at the signed-request boundary. All 86 focused tests, changed checks, build, reviews, and exact-head CI passed. AWS Crabbox proof with a real Gateway and mock Telegram/model APIs verified both DM and group origins through the private owner card, callback, applied proposal, and terminal card update. Closing this PR as superseded by the landed repair.

@steipete steipete closed this Sep 5, 2026
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 6, 2026
)

Carry the core Workshop policy owner through the existing signed approval
transport, so pending lifecycle actions can reach authorized Telegram DMs.
Consolidate lifecycle action metadata and verify the signed owner boundary.

Fixes openclaw#135291. Based on openclaw#135406 by @gaoanze888; reported by @khaisis.
Production LOC: +27/-43 (-16); tests: +38/-0.

Co-authored-by: gaoanze <gaoanze@meituan.com>
@clawsweeper

clawsweeper Bot commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Command router queued. I will update this comment with the next step.

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

Labels

agents Agent runtime and tooling merge-risk: 🚨 message-delivery 🚨 May drop, duplicate, misroute, suppress, or wrongly target messages. P1 High-priority user-facing bug, regression, or broken workflow. proof: telegram-e2e This PR needs Telegram Test Server proof with the repository E2E skill. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. size: XS status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Skill Workshop approval buttons missing in Telegram DM on 2026.8.1

2 participants