refactor(skills): centralize internal write paths#108482
Conversation
|
Codex review: needs maintainer review before merge. Reviewed July 20, 2026, 10:54 PM ET / July 21, 2026, 02:54 UTC. Summary PR surface: Source +111, Tests +328. Total +439 across 16 files. Reproducibility: not applicable. this is an internal refactor rather than a reported failing user workflow. The supplied live Gateway smoke exercises the affected canonical proposal, upload-install, and status-refresh paths after the change. Review metrics: none identified. Stored data model Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Risk before merge
Maintainer options:
Next step before merge
Security Review detailsBest possible solution: Rebase onto current Do we have a high-confidence way to reproduce the issue? Not applicable: this is an internal refactor rather than a reported failing user workflow. The supplied live Gateway smoke exercises the affected canonical proposal, upload-install, and status-refresh paths after the change. Is this the best way to solve the issue? Yes, provisionally: retaining existing public Gateway methods while consolidating internal write ownership is narrower and safer than the earlier parallel public RPC approach. A current-main rebase review remains necessary before merge. AGENTS.md: unclear because the file could not be read completely. Codex review notes: model internal, reasoning high; reviewed against b6865e9bce49. Label changesLabel changes:
Label justifications:
Evidence reviewedPR surface: Source +111, Tests +328. Total +439 across 16 files. View PR surface stats
What I checked:
Likely related people:
What the crustacean ranks mean
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
Review history (4 earlier review cycles)
|
1e1c844 to
b1e696e
Compare
|
Addressed the architectural findings in e5579ac by narrowing the PR to the internal consolidation path:
The effective branch diff against @clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
e5579ac to
bb12a10
Compare
|
CI-readiness update for bb12a10, rebased onto main at 83ca537:
Local proof on the pushed head:
The PR remains draft intentionally. Full GitHub CI, CodeQL, label/API guards, and the Docker-backed QA profile still need to run after it is marked ready for review; the prior local Docker limitation is not represented as proof of those lanes. |
What Problem This Solves
Core skill-content mutations currently enter through several low-level Workshop and lifecycle helpers. That makes ownership difficult to enforce, and successful lifecycle installs do not all explicitly invalidate the skills snapshot.
Why This Change Was Made
This introduces one internal
skillsWriteServiceowner for proposal creation/application, full-bundle installation, and explicit snapshot refresh. The Workshop tool, CLI, autocapture, existing Gateway proposal handlers, ClawHub, source installs, uploaded archives, and install-spec completion now converge on that boundary.The PR deliberately adds no new public Gateway or Plugin SDK contract. Existing
skills.proposals.*,skills.upload.*, andskills.installmethods remain canonical. The earlier parallelskills.write.*RPC family, direct-write capability, protocol/native-client changes, and public-API documentation were removed before shipping; direct/plugin exposure requires a separately approved policy and API design.An architecture test prevents production callers from bypassing the service through the low-level proposal, active-workspace writer, or archive-install entry points.
User Impact
There is no new public API and no migration requirement. Existing proposal and install workflows keep their current contracts, while successful ClawHub, source, upload, and dependency installs now explicitly refresh the skills snapshot.
AI-assisted: this change was implemented and reviewed with Codex.
Evidence
corepack pnpm build— passed locally, including package builds, CLI bootstrap guard, Plugin SDK export verification, and Control UI buildnode scripts/run-vitest.mjs src/skills/write-service.test.ts src/skills/write-service-boundary.test.ts src/gateway/skills-write-service.e2e.test.ts src/gateway/server-methods/skills.proposals.test.ts src/gateway/server-methods/skills-upload.test.ts src/skills/lifecycle/source-install.test.ts src/skills/lifecycle/install.test.ts src/skills/lifecycle/clawhub.test.ts— 114 tests passed across unit, Gateway, and E2E shardsnode scripts/run-vitest.mjs src/agents/tools/skill-workshop-tool.test.ts src/cli/skills-cli.workshop.test.ts src/skills/research/autocapture.test.ts— 56 tests passedoxfmt,oxlint, andgit diff --check— passed.agents/skills/autoreview/scripts/autoreview --mode branch --base origin/main --stream-engine-output— clean; no accepted/actionable findings, patch correct at 0.91 confidenceBuilt-product smoke used
dist/entry.js gateway runwith an isolated temporary state directory, config, home, and workspace. It connected through the built@openclaw/gateway-clientpackage over a real WebSocket. No user environment files, Blacksmith, or Testbox were used.