Skip to content

fix(skills): rejected Gateway changes appear successful - #1855

Closed
karkarl wants to merge 4 commits into
openclaw:mainfrom
karkarl:karkarl-skills-rpc-parity
Closed

karkarl wants to merge 4 commits into
openclaw:mainfrom
karkarl:karkarl-skills-rpc-parity

Conversation

@karkarl

@karkarl karkarl commented Oct 23, 2026 •

Copy link
Copy Markdown
Collaborator

What Problem This Solves

Fixes: the Skills page shows a successful enabled-state change when the Gateway has only received, or has rejected, the request.

User Impact

Skill changes wait for a Gateway acknowledgement, retain server-confirmed state on refusal, and display localized recovery guidance. Successful changes reload the selected agent's report in ordinary and setup-bound Skills pages.

Draft, not merge-ready: current-head build and all three full-app Skills proofs pass. Required local suites retain five known host-related failures, and current CI has unrelated Chat readiness timeouts. Published/live Gateway compatibility is not established.

Why This Change Was Made

The existing client returned socket-send success as mutation success. Skills status and mutations now use the existing response-correlated request mechanism; status responses are fenced against newer agent requests and replaced/disconnected connections. The page refreshes rather than applying its submitted intention. Setup-bound refresh reuses SetupNativeSkills, retaining its verified-agent, identity, and cancellation checks. The Frame now supplies the typed setup request before initializing Skills, instead of starting an ordinary read before Page.OnNavigatedTo establishes the bound owner.

The unused installation wrapper is corrected from invalid {id} to the upstream dependency-recipe {name, installId, agentId?} contract. It has no production UI caller and is not a verified RPC.

This is one reviewable Skills owner slice of the requested RPC inventory, not a generic endpoint surface. Reconciliation against OpenClaw source 098e9915 preserves all 40 historical methods:

Disposition Count
Production owner plus unit and real-client mock-Gateway tests: skills.status, skills.update 2
Corrected unused installation contract, not verified 1
Advertised but explicitly retired curator/proposal handlers, not verified 17
Node-only skills.bins, not operator UI, not implemented 1
Active Dashboard library/workshop/discovery/upload flows still unimplemented 19

Current additions skills.files.get and skills.workshop.undo are tracked separately, not added to the historical denominator. Scanner and central support-policy files are unchanged.

Mac's traced native skills.status use is execution-approval skill-bin evaluation, not evidence of a native skill-library settings panel. The Mac ownership guidance assigns Gateway preferences to its hosted Dashboard. This PR preserves the existing Windows native Skills surface and does not claim wholesale Mac-native parity or implement retired workflows.

Evidence

Two real-socket regressions failed before the production change: a refused update returned true, and an update completed before its acknowledgement. Both now pass. The socket suite exercises the actual OpenClawGatewayClient, handshake, request serialization, acknowledgements, errors, disconnect, and out-of-order agent responses.

The authenticated fixture keeps browse mode read-only. An explicit two-entry, in-memory skills-editing scenario supports acceptance tests without executing installers or contacting a real provider. A native-owner integration test invokes SetupNativeSkills.LoadAsync through the real client before and after an acknowledged mutation; it is not a DispatchProxy transport substitute.

Independent rubber-duck review found a setup-bound refresh regression in the initial implementation. The fix reuses the existing bound loader and adds real-client native-owner and native acceptance UI coverage. The shared autoreview installation was unavailable; no helper-scoped-clean or frozen-input review is claimed.

The first visible run exposed the separate initialization-order bug before any native mutation. Its original run.json preserves the loading timeout; fixture-disposal pending.lock failure masked that primary error in the TRX. All owned processes exited and the exact retained synthetic profile was cleaned. The two passing cases' generic captures showed the larger Chat window, not Skills, so they are not claimed as visible Skills evidence. After fixing typed-request initialization and capture ownership, the single bounded current-head retry passed all three cases. All three owned apps exited and their exact synthetic profiles were removed.

Current-head proof comment with all four inspected screenshots. Each hosted PNG was retrieved with HTTP GET and its SHA-256 matched the inspected original.

Current-head Skills states in the owned Settings window

Before refusal, one skill is enabled:

Skills before refusal

Refusal displays recovery guidance and preserves that state:

Refused toggle preserves acknowledged state

An acknowledged ordinary toggle refreshes to zero enabled:

Ordinary acknowledged toggle

The verified setup-bound main agent also refreshes to zero enabled:

Setup-bound acknowledged toggle

Change Type

  • Bug fix
  • Feature
  • Refactor
  • Docs or instructions
  • Tests or validation
  • Security hardening
  • Chore or infrastructure

Scope

  • Tray or WinUI UX
  • Windows node capability
  • Local MCP or winnode
  • Gateway, connection, or pairing
  • Setup or onboarding
  • Permissions, privacy, or security
  • Tests, CI, or docs

Required proof pools

  • windows-winui-interactive: ordinary/setup-bound Skills acceptance and visible rejection recovery in an isolated synthetic-Gateway app.

Validation

  • .\build.ps1: passed at current head, Shared, CLI, WinNode CLI, SetupEngine, and WinUI.
  • dotnet test .\tests\OpenClaw.Shared.Tests\OpenClaw.Shared.Tests.csproj --no-restore: failed, 4,670 passed, 1 failed, 26 skipped. Existing symbolic-link privilege failure in MxcFolderAdmissionTests.OwnedJunctionAndSymbolicLinkAreRejectedWithoutFollowingTheirChildren(symbolic: True). No privileges changed or tests weakened.
  • dotnet test .\tests\OpenClaw.Tray.Tests\OpenClaw.Tray.Tests.csproj --no-restore: failed, 4,499 passed, 4 failed, 0 skipped. Existing ARM64 host failures in the four BuildPrerequisiteTests.CheckOnly_UsesTheAppLocalRuntimeResolver cases.
  • dotnet test .\tests\OpenClaw.Shared.Tests\OpenClaw.Shared.Tests.csproj --no-build --no-restore --filter 'FullyQualifiedName~Skills': prior focused run passed, 30 passed, 0 failed/skipped. The exact same 30 test names all pass in the current-head full TRX.
  • dotnet test .\tests\OpenClaw.Tray.Tests\OpenClaw.Tray.Tests.csproj --no-build --no-restore --filter 'FullyQualifiedName~SetupNativeSkillsTests|FullyQualifiedName~LocalizationValidationTests|FullyQualifiedName~NativeCompletionPresentationTests': prior focused run passed, 47 passed, 0 failed/skipped. The exact same 47 test names all pass in the current-head full TRX.
  • dotnet build .\tests\OpenClaw.Tray.UITests\OpenClaw.Tray.UITests.csproj -r win-arm64 -p:Platform=ARM64 --no-restore: passed at current head, 0 errors, 1 existing generated-XAML obsolete-Icon warning. The initial missing-assets failure was resolved by restore/build. The later 6a3c798e build failed on task-caused CS0051; initialization was narrowed to internal and the entire required sequence reran at 15fdc80d.
  • .\scripts\validate-docs.ps1: passed, 66 Markdown files.
  • git diff --check: passed.
  • dotnet test .\tests\OpenClaw.Tray.Tests\OpenClaw.Tray.Tests.csproj --no-restore --filter 'FullyQualifiedName~SetupNativeSkillsTests|FullyQualifiedName~NativeCompletionPresentationTests': passed, 23 passed, 0 failed/skipped after the initialization fix. Its new source guard first failed before the fix. Cancellation coverage also completes the cancelled response late and confirms it cannot resume presentation.
  • Initial visible UI command, with explicit isolated app/artifact paths and screenshot opt-in: dotnet test .\tests\OpenClaw.Tray.UITests\OpenClaw.Tray.UITests.csproj -r win-arm64 -p:Platform=ARM64 --no-build --no-restore --filter 'FullyQualifiedName~SkillsAcceptedToggle|FullyQualifiedName~SkillsRejection': failed, 2 passed, 1 failed, 0 skipped on dd3c8d7f. Do not substitute the passing socket/native-owner tests for this failed full-app case.
  • The same visible UI command passed at current head, 3 passed, 0 failed/skipped in 19.7 seconds. Explicit app/source/test binary hashes matched the frozen input before launch; tests assert ordinary acceptance, refused-state preservation, and verified setup handoff consumption plus bound acceptance. Captures assert the changed state lies inside the owned Settings HWND.
  • Prior-head CI run 40025938582: core/CLI, Tray/setup/integration, network/revocation E2E and fast validation passed. Setup/connect E2E failed during CLI fixture initialization; UI host was aborted by its five-minute hang guard. These are not clean CI or current-head proof.
  • Current-head CI run 40031106594: core/CLI, fast validation and proof-pool contracts pass. Tray tests report 4,505 passed, 2 failed: existing ChatReadinessClientTests.Redirect_is_ready_without_contacting_the_other_host cases 301 and 308 time out at three seconds. Other CI jobs were still running at this read; no clean CI claim.

Real Behavior Proof

  • Environment tested: local native Windows ARM64, isolated test identities and loopback synthetic Gateways.
  • PR head or commit tested: 15fdc80ded3fd95327b93d9254c8fff98488376e, full build, full Shared/Tray, UI compilation and all three native cases. Source, app/DLL and test DLL SHA-256 values were recorded and checked before launch; runtime fixture reports match the compiled app assembly and commit-bearing version. This is manual source/binary correspondence, not a native freeze receipt. Initial dd3c8d7f UI failure and 6a3c798e compile failure remain retained, not rewritten as passes.
  • Exact steps or command run: focused Shared and native-owner Tray commands above.
  • Evidence after fix: captured skills.update request {"skillKey":"calendar-key","enabled":false}; Gateway denial returns false. A deliberately withheld reply keeps the task incomplete until its correlated success acknowledgement. Research-agent status wins over an older main-agent response. Scoped fixture reports remain unchanged after a rejected toggle.
  • Observed result: current-head full reports contain all 30 focused Shared and 47 focused Tray/native/localization tests passing. All three full-app Skills cases pass; screenshots show accepted refresh in both ownership modes and visible refusal without a false toggle. Installation tests establish only the unused wrapper's wire contract.
  • Screenshot or artifact links verified? (Yes/No/N/A): Yes. The exact proof comment contains all four images; each hosted PNG returned HTTP GET 200 and matched the inspected original SHA-256. Original failed-run artifacts are preserved separately.
  • Not verified or blocked: live/published Gateway contract identity and install policy; shared autoreview helper unavailable; the five required-suite host failures and CI failures above. Package version 2026.10.6 does not bind the saved published schema to pinned source 098e9915.

Security Impact

  • New permissions or capabilities? (Yes/No): No
  • Secrets or tokens handling changed? (Yes/No): No
  • New or changed network calls? (Yes/No): Yes
  • Command or tool execution surface changed? (Yes/No): No
  • Data access scope changed? (Yes/No): No
  • If any answer is Yes, explain the risk and mitigation: existing authenticated Skills calls now await correlated replies. Handshake gating, connection identity, Gateway authorization/errors, and selected-agent status are preserved; no automatic mutation retry or unsafe-install override is added. The corrected installation wrapper remains unused in production.

Compatibility and Migration

  • Backward compatible? (Yes/No): No, the unused C# installation method now requires the Gateway-advertised name and recipe ID instead of an invalid single ID. All in-repository implementations are updated. Status/update wire shapes remain supported.
  • Config or environment changes? (Yes/No): No
  • Migration needed? (Yes/No): No
  • If yes, list the exact upgrade steps: N/A.

Review Conversations

  • I replied to or resolved every bot review conversation addressed by this PR.
  • I left unresolved only conversations that still need maintainer judgment.

Await correlated Skills acknowledgements, fence stale status responses, and refresh ordinary and setup-bound pages from Gateway reports. Correct the unused recipe-install wire contract without claiming production wiring.

Co-authored-by: Copilot App <[email protected]>
@clawsweeper

clawsweeper Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

🦞👀
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 P2 Normal priority bug or improvement with limited blast radius. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Oct 23, 2026
@clawsweeper

clawsweeper Bot commented Oct 23, 2026

Copy link
Copy Markdown

Codex review: needs maintainer review before merge.

What this changes

Skills changes await Gateway acknowledgement, retain confirmed state after rejection, and refresh the selected agent’s report.

Example: The Gateway rejects disabling calendar-key because the operator lacks permission.

  • Before: The page treats the successful socket send as success and displays the skill as disabled.
  • After: The mutation returns false, the skill remains enabled, and the page displays localized recovery guidance.

Review scores

Measure Result What it means
Overall readiness 🦪 silver shellfish (2/6) The source repair is coherent and has meaningful transport coverage, but required visible behavior evidence remains incomplete and full validation is unresolved.
Proof confidence 🦪 silver shellfish (2/6) Real behavior proof is not required for maintainer- or bot-authored pull requests.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: Users see a skill change succeed even when the Gateway rejects it.
Reason: Server-confirmed state is a useful correctness repair, and collaborator authorship establishes direction; the unused installation-contract correction is explicitly disclosed.

Merge readiness

✅ Ready for maintainer review

Keep open: this collaborator-authored PR repairs a false-success bug still present on current main and remains explicitly draft.

Priority: P2
Reviewed head: dd3c8d7f492f8c138549d6a2ae3748ed109155d8

Before merge

None.

Findings

None.

Tests

  • Missing end-to-end proof: Current-head visible ordinary/setup-bound acceptance and rejection recovery remain pending, as does compatibility evidence using an existing installation against a supported published Gateway.
Agent review details

How this fits together

The native Skills page sends authenticated requests through the shared operator client; correlated Gateway replies determine mutation outcomes and refreshed skill reports determine displayed state.

flowchart LR
  A[Skills page] --> B[Operator client]
  B --> C[Pending request registry]
  C --> D[Authenticated Gateway]
  D --> E[Correlated response]
  E --> F[Selected agent report]
  F --> A
Loading

Technical review

Best possible solution:

Retain the existing client and setup-loader owners, with Gateway acknowledgements controlling success and refreshed reports controlling displayed state.

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

Current-main source establishes the failure: a successful socket send returns true and the page immediately applies the requested state; the author also reports before-fix failures for rejection and withheld acknowledgements.

Is this the best way to solve the issue?

The central repair uses the existing correlated-request mechanism and existing setup-bound loader, avoiding a parallel transport or state owner; no definite introduced correctness defect was found.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against f6406247a0f7.

Provenance checked

  • Optimistic toggles and automatic refresh changes intended behavior with a stated reason (UI fixes: skills redesign, workspace caching, sidebar/voice width #335: Provide responsive enable/disable controls and automatically refresh Skills after mutation replies.)
  • Selected-agent refresh scope keeps the original intent (9724eea: Prevent filtered Skills views from jumping back to all agents.)
  • Verified setup-bound Skills loading keeps the original intent (feat: guide Windows onboarding from setup to native AI tasks #1531: Preserve the verified Gateway, identity, agent, and cancellation boundary during native setup handoff.)
  • Unused installation request shape changes intended behavior with a stated reason (unknown: Scoped history reaches the broad Companion refactor without finding a rationale for the old id payload; older blob inspection encounters unavailable objects.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

  • Current main retains the reported defect: SetSkillEnabledAsync returns TrySendTrackedRequestAsync, and the page applies the submitted enabled state when that send succeeds, before a correlated acknowledgement establishes acceptance. (src/OpenClaw.Shared/OpenClawGatewayClient.cs:1638, f6406247a0f7)
  • Introduced repair uses existing response ownership: The pinned introduction changes Skills calls to the existing response-correlated request mechanism, fences status publication by revision and connection generation, and replaces optimistic page updates with refreshes. (src/OpenClaw.Shared/OpenClawGatewayClient.cs:1623, dd3c8d7f492f)
  • Setup refresh preserves the established loader: Setup-bound refresh calls LoadNativeAsync, which retains SetupNativeSkills response validation, cancellation, and verified-client checks. (src/OpenClaw.Tray.WinUI/Pages/SkillsPage.xaml.cs:181, dd3c8d7f492f)
  • Original design and scope preservation: UI fixes: skills redesign, workspace caching, sidebar/voice width #335 documents optimistic toggles and automatic scoped refresh. Commit 9724eea explains preserving the active agent filter; this PR preserves that invariant while explaining why optimistic success is removed. (src/OpenClaw.Shared/OpenClawGatewayClient.cs, 9724eea243b1)
  • Affirmative dependency contract: The PR implements this Gateway protocol and explicitly relies on pinned upstream source as its contract. The dependency-recipe install branch consumes name and installId, while skills.update accepts skillKey and enabled; the corrected installation wrapper has no production caller in this checkout. (src/gateway/server-methods/skills-install.ts, 098e991549b7)
  • Supplied validation and explicit draft pause: The complete PR body reports a passing build, 30 focused Shared tests and 47 focused Tray tests, five full-suite failures described as host-related, and pending visible UI and published-Gateway compatibility evidence. Discussion contains only bot acknowledgements, with no additional proof or human review. (dd3c8d7f492f)

Likely related people:

  • Christine Yan: Raw commit 94ff2f4 adds src/OpenClaw.Tray.WinUI/Pages/SkillsPage.xaml.cs:84 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 94ff2f449433; files: src/OpenClaw.Tray.WinUI/Pages/SkillsPage.xaml.cs)

Labels

Label changes:

  • add P2: Rejected skill changes can be displayed as successful, affecting a bounded settings workflow.
  • add rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦪 silver shellfish and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Label justifications:

  • P2: Rejected skill changes can be displayed as successful, affecting a bounded settings workflow.
  • rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦪 silver shellfish and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Rank-up moves

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

  • Complete the pending current-head visible Skills acceptance and rejection evidence.
  • Establish supported published-Gateway compatibility using an existing installation.

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

Reviewed October 23, 2026, 5:33 PM ET / 21:33 UTC.

@karkarl

karkarl commented Oct 23, 2026

Copy link
Copy Markdown
Collaborator Author

Current-head native proof at 15fdc80: all three bounded full-app Skills cases passed. These inspected captures show the owned Settings window, with in-frame UIA assertions. Ordinary and setup-bound accepted toggles refresh Gateway-confirmed state; refusal preserves the enabled skill and shows recovery guidance. Isolated synthetic Gateway only, not live Gateway or installation proof. Original failed run and compile failure are retained separately; full local suites still have the five documented host failures.

Skills before refusal: one enabled skill

Refused toggle displays recovery guidance and preserves the enabled skill

Acknowledged ordinary toggle refreshes to zero enabled and two disabled skills

Verified setup-bound main agent refreshes to zero enabled skills after acknowledgement

@clawsweeper clawsweeper Bot mentioned this pull request Oct 30, 2026
6 of 16 tasks
@github-actions

github-actions Bot commented Nov 7, 2026

Copy link
Copy Markdown
Contributor

This pull request has been automatically marked as stale due to inactivity.
Please update it or it will be closed.

@github-actions github-actions Bot added the stale label Nov 7, 2026
@roboclaw-bot

Copy link
Copy Markdown
Contributor

Thank you for the response-aware Skills and setup-refresh work. I reviewed all 23 changed files at 15fdc80ded3fd95327b93d9254c8fff98488376e against main e59374c064f43d68f5c72d070d4c89ef2d20ec3b.

Main deliberately retired the native Skills page and its mutation/install client APIs in #1932 (29ef4f80e8d0ccfdd68c35383671b0adf0d76a8d), including SetupNativeSkills, its setup destination, page resources and consumers. This PR’s client, page, localization, handoff and regression-test changes support those removed paths. The newer shared search uses a separate read-only skills catalog and a Dashboard destination; it does not use the removed mutation APIs.

Closing as obsolete because the affected surface was retired, not because this patch was merged. This preserves the current ownership direction rather than reintroducing a second native Skills path. No branch deletion or underlying issue closure.

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

Labels

P2 Normal priority bug or improvement with limited blast radius. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. stale 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.

2 participants