Skip to content

fix(skills): show byte-aware errors for long descriptions - #128594

Merged
steipete merged 3 commits into
openclaw:mainfrom
Alix-007:fix/skill-workshop-description-guidance
Aug 26, 2026
Merged

steipete merged 3 commits into
openclaw:mainfrom
Alix-007:fix/skill-workshop-description-guidance

Conversation

@Alix-007

@Alix-007 Alix-007 commented Aug 24, 2026 •

Copy link
Copy Markdown
Contributor

Closes #92425

What Problem This Solves

Fixes an issue where agents creating, updating, or revising Skill Workshop proposals would receive a generic schema-validation failure for overlong descriptions instead of the actual UTF-8 byte count and retry limit.

Why This Change Was Made

The intentional 160-byte discovery/listing budget remains unchanged. The competing 160-character schema gate is removed so the proposal service stays the single enforcement owner and returns its existing byte-aware error. This does not add configuration or raise the limit. Earlier #92427 and #92898 were closed unmerged and proposed raising the limit; this PR does not repeat that product change.

User Impact

Agents now learn the actual description size and the 160-byte maximum, so they can shorten the description and retry instead of receiving only a generic validation error.

Evidence

Real tool-call proof

A standalone Node 24.15 harness ran against exact product head cd14df37d3f00864e54c3fe64042535a6747d8bd. It obtained skill_workshop from the production createOpenClawTools registry, passed the 161-character call through validateToolArguments, invoked the actual tool, and observed Skill proposal description is too large (161 bytes, max 160). before proposal state was written. It used an ephemeral local workspace and no provider, channel, gateway, device, network, or private credential.

Focused regression

  • Parent red (17abdfc78c89): npx -y [email protected] scripts/run-vitest.mjs src/agents/tools/skill-workshop-tool.test.ts -t "lets the proposal service explain overlong descriptions" --reporter=verbose failed before execution with description: must not have more than 160 characters.
  • Exact head (cd14df37d3f00864e54c3fe64042535a6747d8bd): the same command passed (1 passed, 24 skipped) and observed the service error above.
  • node node_modules/oxfmt/bin/oxfmt --check src/agents/tools/skill-workshop-tool-schema.ts src/agents/tools/skill-workshop-tool.test.ts passed.
  • node node_modules/oxlint/bin/oxlint src/agents/tools/skill-workshop-tool-schema.ts src/agents/tools/skill-workshop-tool.test.ts --deny-warnings passed.
  • git diff --check passed.

Production delta: 0 additions, 1 deletion. Test delta: 23 additions.

AI Assistance

AI-assisted. I understand the change and validated the production validation-to-service boundary locally.

@clawsweeper

clawsweeper Bot commented Aug 24, 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: XS labels Aug 24, 2026
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. 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 Aug 24, 2026
@clawsweeper

clawsweeper Bot commented Aug 24, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 26, 2026, 3:14 AM ET / 07:14 UTC.

ClawSweeper review

What this changes

The PR removes duplicate character-count limits and adds tool-boundary coverage so Skill Workshop returns its existing byte-aware error for overlong proposal and collection descriptions.

Regression provenance

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

Merge readiness

⚠️ Ready for maintainer review - 2 items remain

Keep this PR open for normal merge review. Current main still rejects the input at the schema boundary, while the branch removes that competing gate and routes both paths to the existing UTF-8 byte validator; no actionable patch defect was found.

Priority: P2
Reviewed head: 05ba226b74417006813aafb2bcbbe69991835dc4

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) This is a narrowly scoped, owner-aligned repair with real tool-boundary proof and useful regression coverage.
Proof confidence 🦞 diamond lobster (5/6) Sufficient (logs): The PR body includes an exact-head production tool-registry harness that records the post-fix byte-aware error before proposal state is written.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (logs): The PR body includes an exact-head production tool-registry harness that records the post-fix byte-aware error before proposal state is written.
Evidence reviewed 7 items Current-main defect: Current main still applies a 160-character schema limit before execution, which prevents the service-owned byte-aware error from reaching the caller.
Canonical validation owner: The shared draft preparer checks UTF-8 byte length and emits the actionable 160-byte error retained by this patch.
Execution and dependency contract: The tool exposes the changed schema, while the directly inspected validation contract rejects schema-invalid calls before tool execution; this establishes why the duplicate schema gate masks the owner error.
Findings None None.
Security None None.

Live Verification

Command: node scripts/run-vitest.mjs src/agents/tools/skill-workshop-tool.description-limit.test.ts --reporter=verbose

Result: FAIL (partial) — step 2 expect_output lets the proposal service explain overlong descriptions: expected terminal output was not visible within 30 seconds: "lets the proposal service explain overlong descriptions"

[test] starting test/vitest/vitest.agents-tools.config.ts

 RUN  v4.1.10 /tmp/clawsweeper-live-proof-128594-qEXNbs/target

 ✓  agents-tools  src/agents/tools/skill-workshop-tool.description-limit.test.ts › skill_workshop description validation › lets the proposal service explain ove
rlong descriptions 38ms
 ✓  agents-tools  src/agents/tools/skill-workshop-tool.description-limit.test.ts › skill_workshop description validation › lets the proposal service explain ove
rlong collection descriptions 604ms

 Test Files  1 passed (1)
      Tests  2 passed (2)
   Start at  07:15:36
   Duration  11.38s (transform 8.46s, setup 946ms, import 9.44s, tests 646ms, environment 0ms)

[test] passed 1 Vitest shard in 17.04s
[test] starting test/vitest/vitest.agents-tools.config.ts

 RUN  v4.1.10 /tmp/clawsweeper-live-proof-128594-qEXNbs/target

 ✓  agents-tools  src/agents/tools/skill-workshop-tool.description-limit.test.ts › skill_workshop description validation › lets the proposal service explain ove
rlong descriptions 41ms
 ✓  agents-tools  src/agents/tools/skill-workshop-tool.description-limit.test.ts › skill_workshop description validation › lets the proposal service explain ove
rlong collection descriptions 1267ms

 Test Files  1 passed (1)
      Tests  2 passed (2)
   Start at  07:15:54
   Duration  6.47s (transform 2.92s, setup 449ms, import 4.47s, tests 1.31s, environment 0ms)

[test] passed 1 Vitest shard in 12.18s

Assertions:

  • FAIL expect_output: lets the proposal service explain overlong descriptions

How this fits together

Skill Workshop receives agent tool calls, validates their arguments, then delegates proposal and collection work to services that own persistence and byte limits. The resulting error guides the agent before any proposal or collection write occurs.

flowchart LR
  A[Agent tool call] --> B[Tool argument schema]
  B --> C[Skill Workshop tool]
  C --> D[Proposal service]
  C --> E[Collection reconciliation]
  D --> F[Byte-aware error or proposal]
  E --> G[Byte-aware error or collection result]
Loading

Before merge

  • Resolve merge risk (P1) - The review checkout could not fetch the recorded PR base after DNS failure; use GitHub's clean merge result and exact-head CI before landing.
  • Complete next step (P2) - No repair lane is needed: no concrete patch defect was found, and the remaining step is routine exact-head CI/merge validation.
Agent review details

Security

None.

PR surface

Source -1, Tests +81. Total +80 across 3 files.

View PR surface stats
Area Files Added Removed Net
Source 2 1 2 -1
Tests 1 81 0 +81
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 3 82 2 +80

Review metrics

Metric Value Why it matters
Production vs. regression coverage production -1, tests +81 The patch removes a competing production validator and adds focused proposal and collection boundary coverage.

Stored data model

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

Root-cause cluster

Relationship: fixed_by_candidate
Canonical: #92425
Summary: This PR is the candidate repair for the canonical issue's generic pre-service validation error.

Members:

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

Merge-risk options

Maintainer options:

  1. Decide the mitigation before merge
    Keep the 160-byte policy in the shared draft-preparation owner and remove all competing schema character limits so agents receive one actionable error.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Technical review

Best possible solution:

Keep the 160-byte policy in the shared draft-preparation owner and remove all competing schema character limits so agents receive one actionable error.

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

Yes—the source establishes the schema-before-execution failure path, and the PR supplies an exact-head tool-boundary harness plus focused regressions for a 161-byte description.

Is this the best way to solve the issue?

Yes—the service already owns the UTF-8 limit, so deleting only the competing schema character limits is the narrowest maintainable repair.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 95bbc0ac0586.

Labels

Label justifications:

  • P2: This repairs an agent-facing validation outcome with limited blast radius.
  • 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 (logs): The PR body includes an exact-head production tool-registry harness that records the post-fix byte-aware error before proposal state is written.
  • proof: sufficient: Contributor real behavior proof is sufficient. The PR body includes an exact-head production tool-registry harness that records the post-fix byte-aware error before proposal state is written.

Evidence

What I checked:

Likely related people:

  • steipete: Authored the current collection-validation follow-up and isolated regression coverage. (role: recent area contributor; confidence: high; commits: 04db7ecdd2c6, 05ba226b7441; files: src/agents/tools/skill-workshop-tool-collection.ts, src/agents/tools/skill-workshop-tool.description-limit.test.ts)
  • Ayaan Zaidi: Introduced the collection-reconciliation surface whose schema path is covered by this repair. (role: introduced collection reconciliation; confidence: medium; commits: bdf202ccc8c1; files: src/skills/workshop/collection-reconcile.ts, src/skills/workshop/collection-contracts.ts)
  • Vincent Koc: Introduced the unified draft-preparation path that owns the retained byte validation. (role: draft-validation refactor contributor; confidence: medium; commits: 530cb2607785, bfb3e530520e, 8ee8bde257de; files: src/skills/workshop/proposal-draft.ts)

Rank-up moves

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

  • Let the exact-head required checks complete before landing.

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 (4 earlier review cycles)
  • reviewed 2026-08-24T07:24:03.948Z sha cd14df3 :: needs real behavior proof before merge. :: none
  • reviewed 2026-08-24T07:53:52.525Z sha cd14df3 :: needs maintainer review before merge. :: none
  • reviewed August 25, 2026, 6:15 AM ET / 10:15 UTC sha unknown :: needs maintainer review before merge. :: none
  • reviewed 2026-08-25T17:44:32.710Z sha 05ba226 :: needs maintainer review before merge. :: none

@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. 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. and removed 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 Aug 24, 2026
@steipete steipete closed this Aug 25, 2026
@steipete steipete reopened this Aug 25, 2026
@steipete

Copy link
Copy Markdown
Contributor

Maintainer follow-up preserves @Alix-007's original fix and extends the same owner-boundary repair to collection reconciliation.

Signed head 04db7ecdd2c6ec2fb6467c8207a24f54690d02a2 routes both proposal and collection descriptions to the canonical 160-byte UTF-8 validator. The new real tool-boundary regression proves the actionable error, no skill write, and no completed reconciliation. Immutable three-way merge proof preserves current sparse [write, drop] collection behavior.

Production: +1/-2 (net -1). Tests: +55. Fresh exact-head CI and Workflow Sanity were retriggered against the current main base.

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Aug 25, 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:

@steipete steipete closed this Aug 26, 2026
@steipete steipete reopened this Aug 26, 2026
@steipete
steipete merged commit 378e45a into openclaw:main Aug 26, 2026
486 of 497 checks passed
@steipete

Copy link
Copy Markdown
Contributor

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 27, 2026
…28594)

* fix(skills): surface description byte limit errors

* fix(skills): preserve byte-aware collection validation

Co-authored-by: Alix-007 <[email protected]>

* test(skills): isolate description limit regression coverage

Co-authored-by: Alix-007 <[email protected]>

---------

Co-authored-by: Peter Steinberger <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling 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: 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.

skill_workshop: increase or make configurable the 160-byte description limit

2 participants