Skip to content

feat(skills)!: give each agent its own Skill Workshop - #135528

Merged
obviyus merged 78 commits into
mainfrom
feat/workshop-global-skill-ownership
Sep 5, 2026
Merged

obviyus merged 78 commits into
mainfrom
feat/workshop-global-skill-ownership

Conversation

@obviyus

@obviyus obviyus commented Sep 1, 2026 •

Copy link
Copy Markdown
Collaborator

What Problem This Solves

Workshop skills followed session workspaces, making ownership and recovery unreliable. Deep audit missed grouped skills, and moving interrupted writes could separate proposals from their rollback state.

Why This Change Was Made

Give each agent one Workshop root and one proposal/write/recovery flow. Doctor settles interrupted writes before safe relocation and preserves blocked or ambiguous sources. Audit uses shared discovery. The v15→v16 migration retains proposal owners, retires legacy workspace columns, and assigns collection history to agents.

User Impact

Workspace changes no longer change skill ownership. Doctor reports unresolved states and preserves recoverable data; migration does not promise recovery from every filesystem failure. The retired symlink-target write option is removed.

Evidence

Compiled CLI checks covered interrupted create/update, collision, relocation retry, and same-target proposals. Doctor passed with a competing database writer while preserving rows and drafts. Audit detected grouped and hidden skills; Gateway/container checks verified agent-specific instructions. Migration tests preserved proposals and history across cold opens. Later integration changed no Workshop source; earlier runtime proof retains that scope.

Related: #136110.

@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 review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation gateway Gateway runtime cli CLI command changes commands Command implementations agents Agent runtime and tooling size: XL maintainer Maintainer-authored PR labels Sep 1, 2026
@clawsweeper clawsweeper Bot added P1 High-priority user-facing bug, regression, or broken workflow. merge-risk: 🚨 availability 🚨 May cause crashes, hangs, restart loops, stalls, or process outages. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. 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: blocked before merge. Reviewed September 5, 2026, 8:58 AM ET / 12:58 UTC.

ClawSweeper review

What this changes

Give each agent its own generated-skill directory, migrate existing Workshop state, and anchor background learning to the completed conversation turn.

Warning

SQLite table change

This PR modifies persisted SQLite tables in src/skills/workshop/store-sqlite-schema.ts, src/state/openclaw-state-schema.sql. Prefer a design that avoids changing persisted SQLite tables. If the change is necessary, verify migration and upgrade compatibility against an existing database before merge.

Merge readiness

⛔ Blocked before merge - 4 items remain

Keep open: the agent-owned Workshop remains distinct from current main and the latest release. Prior actionable findings are addressed, and the recorded migration decisions should not be reopened as new blockers.

Priority: P2
Reviewed head: c19749909bf73109fe6f532705378101c8d8ff2e

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A coherent ownership refactor with substantial regression coverage and retained runtime evidence; compatibility tradeoffs are explicitly accepted.
Proof confidence 🦞 diamond lobster (5/6) ✨ media proof bonus Sufficient (linked_artifact): Retained real Doctor runs demonstrate recovery with a competing SQLite writer, and supplied CLI/Gateway observations cover grouped audit and agent isolation; matching recovery and audit sources remain unchanged. Historical learning proof is not relabeled as a current-head run, and remote artifacts could not be reopened.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (linked_artifact): Retained real Doctor runs demonstrate recovery with a competing SQLite writer, and supplied CLI/Gateway observations cover grouped audit and agent isolation; matching recovery and audit sources remain unchanged. Historical learning proof is not relabeled as a current-head run, and remote artifacts could not be reopened.
Evidence reviewed 13 items Pinned introduction and continuity: The complete local base-to-head comparison contains 202 introduced paths. Tree comparison confirms 193 are unchanged since the previous reviewed head, including recovery, audit, discovery, and Codex finalization. The supplied test merge is stale and was not used to infer removal of main-branch behavior.
Still necessary on current main: Current main still resolves proposal targets under the session workspace's skills directory and retains state schema 15.
Latest release behavior: The supplied v2026.9.1 release revision also resolves generated targets under workspace/skills; it does not provide this PR's per-agent directory ownership.
Findings None None.
Security None None.

How this fits together

Skill Workshop turns chat requests and completed agent work into reviewed skill proposals. Its storage, approval, recovery, and discovery paths determine which generated instructions later agent runs receive.

flowchart TD
  A[Chat and CLI requests] --> B[Agent-scoped proposals]
  C[Completed agent turns] --> B
  B --> D[Approval and security scan]
  D --> E[Agent Workshop files]
  F[Legacy skills and state] --> G[Doctor migration]
  G --> B
  G --> E
  E --> H[Skill discovery for later turns]
Loading

Before merge

  • Resolve merge risk (P1) - The accepted upgrade retires workspace symlink-target writes and automatic restore pointers with ambiguous ownership; some operators will need the documented manual recovery path.
  • Resolve merge risk (P1) - Reviewer-side gaps remain in linked artifact access, fs-safe implementation inspection, and comparison of intervening changes since the historical live-learning run.
  • Review config compatibility - Confirm compatibility and upgrade impact for the changed config or default surface before merge.
  • Add data-model compatibility proof - Confirm migration or upgrade compatibility proof before merge.
Agent review details

Security

None.

PR surface

PR surface statistics unavailable: the file list is incomplete.

Review metrics

Metric Value Why it matters
Production versus test growth Production net +1,390 lines; tests/support net +5,262 lines Excluding documentation and generated baselines, growth supports agent ownership and migration recovery; moved code cancels in the net.
Upgrade contract Schema 15→16; 2 proposal columns removed; 1 history table rekeyed; 1 setting retired These accepted changes affect existing installations and their recovery behavior.

Stored data model

Persistent data-model change detected: database schema: src/skills/workshop/store-sqlite-schema.ts, database schema: src/state/openclaw-state-schema.sql, migration/backfill/repair: config/assertion-safety-baseline.txt, migration/backfill/repair: src/state/openclaw-state-db-schema-repair.ts, migration/backfill/repair: src/state/openclaw-state-db.ts, serialized state: src/skills/workshop/skills-root.ts, and 4 more. Confirm migration or upgrade compatibility proof before merge.

Merge-risk options

Maintainer options:

  1. Retain the accepted upgrade contract (recommended)
    Proceed under the recorded migration decision while preserving stale-proposal diagnostics, retained files, and documented manual backup recovery.

Technical review

Best possible solution:

Retain one agent-owned proposal, apply, and recovery pipeline with the accepted migration safeguards; keep the weekly review-turn redesign in its separate follow-up.

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

Not applicable to the overall feature proposal; its component repairs have recorded before/after CLI evidence, but this read-only review did not execute them.

Is this the best way to solve the issue?

Yes: agent-owned storage fixes ownership at its producer while reusing the existing proposal service and discovery machinery; workspace-only adjustments or profile-owned libraries would not provide the same boundary.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 177a1e3b054e.

Labels

Label justifications:

  • P2: This is a useful, actively maintained ownership improvement without an established urgent production outage.
  • merge-risk: 🚨 compatibility: Schema migration and setting retirement intentionally change existing Workshop workflows and automatic recovery eligibility.
  • 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 (linked_artifact): Retained real Doctor runs demonstrate recovery with a competing SQLite writer, and supplied CLI/Gateway observations cover grouped audit and agent isolation; matching recovery and audit sources remain unchanged. Historical learning proof is not relabeled as a current-head run, and remote artifacts could not be reopened.
  • proof: sufficient: Contributor real behavior proof is sufficient. Retained real Doctor runs demonstrate recovery with a competing SQLite writer, and supplied CLI/Gateway observations cover grouped audit and agent isolation; matching recovery and audit sources remain unchanged. Historical learning proof is not relabeled as a current-head run, and remote artifacts could not be reopened.

Evidence

What I checked:

  • Pinned introduction and continuity: The complete local base-to-head comparison contains 202 introduced paths. Tree comparison confirms 193 are unchanged since the previous reviewed head, including recovery, audit, discovery, and Codex finalization. The supplied test merge is stale and was not used to infer removal of main-branch behavior. (c19749909bf7)
  • Still necessary on current main: Current main still resolves proposal targets under the session workspace's skills directory and retains state schema 15. (src/skills/workshop/store.ts:146, 177a1e3b054e)
  • Latest release behavior: The supplied v2026.9.1 release revision also resolves generated targets under workspace/skills; it does not provide this PR's per-agent directory ownership. (src/skills/workshop/store.ts:146, ad6fe23aecb9)
  • Canonical ownership boundary: The shared service resolves the agent's Workshop root, checks proposal ownership before reconciliation, and confines live targets to that root. Gateway callers pass the resolved agent and configuration; discovery adds Workshop below managed and workspace sources. (src/skills/workshop/store.ts:159, c19749909bf7)
  • Migration decision already recorded: The discussion explicitly accepts schema 16, removal of ambiguously owned review-history pointers, and retirement of the symlink-write setting: feat(skills)!: give each agent its own Skill Workshop #135528 (comment) and feat(skills)!: give each agent its own Skill Workshop #135528 (comment). Source stales released claims before dropping their marker and rekeys attributable review history. (src/state/openclaw-state-db-maintenance.ts:399, c19749909bf7)
  • Interrupted-write and no-op repairs: Doctor checks legacy eligibility before opening rollback state, reconciles interrupted writes before moving files, reserves unresolved sources, and commits each move's proposal updates together. This addresses the retained rollback finding through recovery ordering rather than relocating inconsistent recovery records. (src/commands/doctor-skill-workshop-sqlite.ts:162, c19749909bf7)

Likely related people:

  • obviyus: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • Josh Lehman: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

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 (58 earlier review cycles; latest 8 shown)
  • reviewed 2026-09-04T20:04:45.103Z sha b205308 :: blocked before merge. :: none
  • reviewed 2026-09-04T20:43:39.349Z sha 136541e :: blocked before merge. :: none
  • reviewed 2026-09-04T21:16:00.146Z sha 136541e :: blocked before merge. :: none
  • reviewed 2026-09-05T02:57:46.869Z sha 2e059cb :: blocked before merge. :: none
  • reviewed 2026-09-05T03:15:44.893Z sha 2e059cb :: blocked before merge. :: [P2] Scan grouped Workshop directories during deep audit | [P3] Describe Workshop precedence separately from file preservation
  • reviewed 2026-09-05T06:44:30.264Z sha ea5ecc8 :: blocked before merge. :: [P1] Retarget rollback records with relocated pending updates
  • reviewed 2026-09-05T09:43:42.201Z sha 6ff5953 :: blocked before merge. :: none
  • reviewed 2026-09-05T10:43:00.492Z sha e55e2cb :: blocked before merge. :: none

@obviyus
obviyus force-pushed the feat/workshop-global-skill-ownership branch from 8ece8e5 to bde46e6 Compare September 2, 2026 02:44
@obviyus

obviyus commented Sep 2, 2026

Copy link
Copy Markdown
Collaborator Author

@clawsweeper re-review

Head bde46e6d54d addresses both findings and the proof gap from the previous review, and is rebased onto main past #134068:

  • P1 released-claim loss: the v16 migration now stales every released proposal before dropping claim_released_time, so Doctor never relocates a user-recreated directory. Upgrade-boundary test builds a shipped v15 store with a released + recreated legacy skill and an active one, runs migration + doctor --fix, and asserts only the active skill moves (fails pre-fix with Relocated 2).
  • P2 unbounded inventory: listWritableWorkshopSkillSummaries now goes through the canonical loadSkillRootRecords loader, so the per-source count, file-size, symlink, and hardlink limits bound every Workshop read; covered by src/skills/workshop/workspace-skill-read.test.ts.

Details and validation are in the updated PR body.

@clawsweeper

clawsweeper Bot commented Sep 2, 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 rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. and removed rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. merge-risk: 🚨 availability 🚨 May cause crashes, hangs, restart loops, stalls, or process outages. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. labels Sep 2, 2026
@obviyus
obviyus force-pushed the feat/workshop-global-skill-ownership branch from bde46e6 to 6058030 Compare September 2, 2026 03:40
@openclaw-barnacle openclaw-barnacle Bot added channel: voice-call Channel integration: voice-call app: macos App: macos labels Sep 2, 2026
@clawsweeper clawsweeper Bot removed the rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. label Sep 2, 2026
Check legacy ownership and target eligibility before opening rollback state. A current proposal must not start schema writes during no-op migration.
@obviyus

obviyus commented Sep 5, 2026

Copy link
Copy Markdown
Collaborator Author

landpr-approve-unrelated-red
pr: 135528
head: e55e2cb
run: 33960959815 attempt: 1
failed: checks-node-compact-large-6 job=101292731710 conclusion=failure
failed: ios-build (tests) job=101292730599 conclusion=failure
check: openclaw/ci-gate

@obviyus

obviyus commented Sep 5, 2026 •

Copy link
Copy Markdown
Collaborator Author

landpr-approve-unrelated-red
pr: 135528
head: c197499
run: 33967056690 attempt: 1
failed: android-test-play job=101309008344 conclusion=failure
failed: checks-ui-e2e (6/7) job=101309008116 conclusion=failure
check: openclaw/ci-gate

@obviyus

obviyus commented Sep 5, 2026

Copy link
Copy Markdown
Collaborator Author

Thanks @obviyus!

Landed as a4514a0.

Proof: The retained rebuilt CLI preserves current proposals while another connection holds the SQLite write lock. All 156 integration tests passed on tree 459b8fc3d0a51ec0461a6e8079f564786755bd4e. Earlier source-bound proof covers interrupted-write recovery, agent isolation, grouped-skill audit, and live-provider learning. These observations retain their original build identities; the owning Workshop code is unchanged. The fresh exact-head local ClawSweeper review passed at Platinum with no findings.

  • Bug: Workspace-derived ownership and competing write/recovery paths made background learning unreliable.
  • Fix: Each agent has one writable Workshop collection. Review uses the completed turn, and Doctor recovers interrupted writes before relocating legacy skills.
Before After
Changing workspaces could change skill ownership One stable Workshop home per agent
Current proposals could make no-op Doctor contend for a write lock Doctor skips ineligible legacy recovery and preserves the proposal
Interrupted writes could become unreadable during relocation Recovery and relocation share one owner; blocked drafts remain inspectable

Reviewed source. Retained integrated CLI proof.

CI exception: Merged through the guarded, explicitly owner-approved exception for run 33967056690, attempt 1. All 134 successful jobs and five intentional skips are retained; the only failed child jobs were:

  • Android tests: reconnect acknowledgement times out in a scripted-Gateway fixture; progress-card markup fails because the expand control is absent before its markup assertions. These use Android's separate schema-1 Room store and local screenshot responses, not the changed Workshop/Gateway implementation. Android source and build inputs are unchanged against the actual CI merge base.
  • UI end-to-end test: the unchanged sidebar menu test times out after expand because the session link intercepts the button click (session-management.sidebar.e2e.test.ts:236,298). The complete UI, styles, test configuration and dependency lockfile are unchanged; the scenario uses a mocked Gateway and does not execute Workshop.

No unrelated CI code was changed. No introducing commit or matching-main failure is claimed for these test failures; this uses the explicit owner-approval route, not the automated matching-main exception.

Production net: +1,390 lines. Tests/support net: +5,262 lines. The growth provides the agent ownership boundary and migration/recovery proof; obsolete ownership and duplicate write paths were removed. Both PRs were unstacked; #136110 remains open and was not included in this landing.

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: macos App: macos channel: voice-call Channel integration: voice-call cli CLI command changes commands Command implementations docs Improvements or additions to documentation extensions: codex gateway Gateway runtime maintainer Maintainer-authored PR merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. P2 Normal backlog priority with limited blast radius. 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.

1 participant