Skip to content

refactor(agents): reuse Workshop text result envelopes - #133453

Merged
steipete merged 1 commit into
mainfrom
codex/cleanup20k-workshop-results-20260830
Aug 30, 2026
Merged

steipete merged 1 commit into
mainfrom
codex/cleanup20k-workshop-results-20260830

Conversation

@steipete

@steipete steipete commented Aug 30, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Skill Workshop repeats the same single-text tool-result envelope in eight action paths, despite having a shared textResult helper for that contract.

Why This Change Was Made

Use the existing helper for read, list, evaluate, mutation results, review completion, collection reconciliation, restore, and history. Keep the distinct structured proposal projection unchanged. This centralizes only envelope construction, not Workshop policy, persistence, authorization, or lifecycle decisions.

User Impact

Model-facing text, typed details, truncation, revision checks, collection ownership, and side effects are unchanged. An existing workspace-alias restore case now also checks the returned text and receipt-linked details, while retaining its filesystem assertion.

Production LOC: +39 / -69 (30 removed). Tests: +12 / -2 (10 added). Whole change: 20 lines removed, across four files.

Evidence

  • The characterized baseline and candidate each passed all 60 cases in 11 files, using the same normal runner arguments. Case multiplicity and within-suite order are preserved; no retries or skipped cases.
  • Coverage includes isolated review ownership, revision-bound mutations, proposal evaluation/projection, bounded history, workspace-alias restoration, and the shared result-helper contract.
  • Formatting preserved the tested bytes, and the normal 29-stage changed-file gate passed, including core and core-test types, lint, all three dead-export scans, boundaries, schema/store guards, and import-cycle checks.
  • Precommit and separate exact-commit Codex reviews both completed with no P0 findings. Normal commit hooks preserved all four tested afterimages and the 32 reviewed source contexts. Reviewed commit: 6738095a1747438d1a86439fc05974ebb3f05a85.
  • Exact-head hosted CI completed successfully: 167 successful jobs and 18 skipped, including the required openclaw/ci-gate. No CI retry or cancellation was needed.
  • The completed ClawSweeper review has no actionable source findings. Its remaining normal-CI step is satisfied by the run above; the maintainer landing decision and native checks remain separate.

The review's stored-data heuristic does not correspond to a storage change: collection reconciliation, restoration and history still call the same owners with the same inputs and results. Only the returned text/details envelopes change construction. No schema, migration, embedding metadata, or persistence behavior changes, so migration proof is not applicable.

This is a behavior-neutral result-envelope refactor, not a change to the backing store or tool protocol. No performance, live-provider, or new built-CLI result is claimed.

Landed as d434b3dbe0b2. Normal hosted preparation and merge both completed successfully without a rebase or push. Independent and maintainer checks confirmed that all 35,555 landed tree entries equal the actual main parent plus exactly the four reviewed afterimages; main ancestry and the actual 30-production/20-total line reduction are verified.

@steipete steipete self-assigned this Aug 30, 2026
@clawsweeper

clawsweeper Bot commented Aug 30, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

@openclaw-barnacle openclaw-barnacle Bot added agents Agent runtime and tooling size: S maintainer Maintainer-authored PR labels Aug 30, 2026
@steipete
steipete marked this pull request as ready for review August 30, 2026 18:34
@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Aug 30, 2026
@clawsweeper

clawsweeper Bot commented Aug 30, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 30, 2026, 2:42 PM ET / 18:42 UTC.

ClawSweeper review

What this changes

The branch routes Skill Workshop read, list, evaluation, mutation, completion, and collection-result responses through the shared text-result helper and adds a restore-response assertion.

Merge readiness

⚠️ Ready for maintainer review - 1 item remains

Keep open. This is a focused, behavior-neutral maintenance refactor that correctly reuses the current shared result-envelope contract; current main still has the duplicated Workshop envelopes, and the maintainer label requires normal maintainer handling rather than automated closure.

Priority: P3
Reviewed head: 6738095a1747438d1a86439fc05974ebb3f05a85

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A clean, narrow consolidation with preserved payloads and relevant focused coverage.
Proof confidence 🌊 off-meta tidepool Not applicable: This maintainer-authored, behavior-neutral internal refactor is exempt from external contributor real-behavior proof; focused existing and added envelope assertions cover the changed owner boundary.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: This maintainer-authored, behavior-neutral internal refactor is exempt from external contributor real-behavior proof; focused existing and added envelope assertions cover the changed owner boundary.
Evidence reviewed 6 items Shared envelope contract: The reused helper constructs exactly one text content block and preserves the supplied typed details, matching the agent tool-result interface.
Runtime contract: Agent tool results require model content and arbitrary structured details; the helper returns those two required fields without altering policy or persistence.
Changed action boundary: The changed read, list, and evaluate branches retain their existing text generation and details payloads, changing only envelope construction after the underlying Workshop operations complete.
Findings None None.
Security None None.

How this fits together

Skill Workshop is the agent-facing tool for reviewing and changing workspace skills and collections. Its actions produce model-visible text plus structured details that the agent runtime and surrounding UI/logging paths consume.

flowchart LR
  A[Agent request] --> B[Skill Workshop tool]
  B --> C[Read, review, and collection actions]
  C --> D[Shared text result envelope]
  D --> E[Model-visible text]
  D --> F[Structured action details]
Loading

Before merge

  • Complete next step (P2) - Await the normal exact-head CI and maintainer merge decision; no concrete repair task is needed.
Agent review details

Security

None.

PR surface

Source -30, Tests +10. Total -20 across 4 files.

View PR surface stats
Area Files Added Removed Net
Source 3 39 69 -30
Tests 1 12 2 +10
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 4 51 71 -20

Review metrics

Metric Value Why it matters
Production versus test delta production −30 lines; tests +10 lines The refactor removes repeated production envelope construction while adding one integration assertion for the restore response.

Stored data model

Persistent data-model change detected: vector/embedding metadata: src/agents/tools/skill-workshop-tool-collection.ts. Confirm migration or upgrade compatibility proof before merge.

Technical review

Best possible solution:

Retain one canonical result-envelope helper for Workshop’s single-text responses, then land through the normal exact-head CI and maintainer review gates.

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

Not applicable: this PR does not report a defect; it consolidates an existing result-envelope implementation.

Is this the best way to solve the issue?

Yes. Reusing the already-established helper is the narrowest maintainable solution because it preserves each action’s existing text and details payloads while deleting duplicated construction.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 9050011d1e40.

Labels

Label changes:

  • add P3: A small behavior-neutral internal refactor improves maintainability without changing a user workflow, configuration, or security boundary.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: This maintainer-authored, behavior-neutral internal refactor is exempt from external contributor real-behavior proof; focused existing and added envelope assertions cover the changed owner boundary.

Label justifications:

  • P3: A small behavior-neutral internal refactor improves maintainability without changing a user workflow, configuration, or security boundary.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: This maintainer-authored, behavior-neutral internal refactor is exempt from external contributor real-behavior proof; focused existing and added envelope assertions cover the changed owner boundary.

Evidence

What I checked:

Likely related people:

  • Vincent Koc: 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.

@steipete
steipete merged commit d434b3d into main Aug 30, 2026
316 checks passed
@steipete
steipete deleted the codex/cleanup20k-workshop-results-20260830 branch August 30, 2026 19:04
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling maintainer Maintainer-authored PR P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: S 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