Repository navigation
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs maintainer review before merge. Reviewed August 30, 2026, 10:56 AM ET / 14:56 UTC. ClawSweeper reviewWhat this changesThe branch recovers colon-rich plain-text Regression provenancePossible regression — probable (reviewed change; known regression link). No predecessor PR is attributed. Merge readinessKeep this PR open for maintainer judgment: the patch is a focused, evidence-backed repair, but it deliberately expands accepted malformed YAML in a shared Markdown Core parser. Priority: P1 Review scores
Verification
How this fits togetherMarkdown Core parses frontmatter before the skills loader accepts workspace skills. Accepted skills then feed the CLI status and the model-visible available-skills prompt; hooks and bundled commands also consume the shared parser. flowchart LR
A[Skill Markdown file] --> B[Markdown Core frontmatter parser]
B --> C{YAML error on allowed text field?}
C -->|Yes| D[Rewrite only that field as a string]
C -->|No| E[Preserve YAML result or error]
D --> F[Skill loader]
E --> F
F --> G[CLI status and model skill prompt]
B --> H[Hooks and bundled commands]
Decision needed
Why: The implementation is bounded and preserves structured-field errors, but the parser is shared beyond workspace skills and this is an intentional input-language expansion. Before merge
Agent review detailsSecurityNone. PR surfaceSource +33, Tests +95. Total +128 across 2 files. View PR surface stats
Review metrics
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Accept the error-positioned, three-field recovery only if maintainers want compatibility for previously tolerated skill text; otherwise retain strict YAML and surface the failure through the canonical skill diagnostic path. Do we have a high-confidence way to reproduce the issue? Yes, by source and captured real-workspace evidence: a colon-rich Is this the best way to solve the issue? Unclear pending policy: this is the clean owner-boundary repair if compatibility with previously tolerated plain text is desired, but the shared-parser grammar expansion needs maintainer acceptance. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 961904eb06a8. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (8 earlier review cycles)
|
…nd description Pure-text scalar fields (read_when, summary) with an unquoted colon+space inline value were silently dropped after the stricter YAML parser landed; only description was recovered. Extend single-line freeform recovery to a whitelist of pure-text fields while keeping structured fields (metadata, install) strictly parsed. Related to openclaw#122496 Co-Authored-By: Claude <[email protected]>
…AML error The recovery loop rewrote every allowlisted field after any parse error, turning a valid commented scalar like `description: text # note` into the literal `text # note` when a sibling read_when needed recovery. Only recover values whose inline colon+space actually triggers BLOCK_AS_IMPLICIT_KEY; valid YAML scalars keep their comment and quote semantics. Co-Authored-By: Claude <[email protected]>
The previous guard still rewrote every allowlisted sibling whose value contained a colon+space, which reserialized valid quoted scalars through stripQuotes+JSON.stringify and broke YAML escape sequences (e.g. "line\n: detail" lost its decoded newline). Anchor recovery to the YAML error position: only the field whose value actually triggers BLOCK_AS_IMPLICIT_KEY is rewritten, iterated per error so multiple colon-rich fields are fixed without touching valid siblings. Co-Authored-By: Claude <[email protected]>
The error-line matcher only accepted unquoted keys, dropping the quoted-key
recovery that current main explicitly supported for description. A quoted
colon-rich description ("description": signals: user) reached
BLOCK_AS_IMPLICIT_KEY but could not be rewritten, so the loader skipped a
skill that current main retains. Extend the matcher to unquoted,
double-quoted, and single-quoted allowlisted keys.
Co-Authored-By: Claude <[email protected]>
oxlint typescript(prefer-includes) flagged `!/: /.test(rawValue)` as a
regex test on a plain substring. Replace with the equivalent
`!rawValue.includes(": ")` to satisfy the rule; semantics are identical.
Co-Authored-By: Claude <[email protected]>
1fb253a to
0ec7dfa
Compare
|
Maintainer decision: accept the bounded compatibility recovery.
This resolves the compatibility choice raised in the previous review. |
|
Thanks @xydt-tanshanshan! Proof: A real workspace contained a valid control skill, a skill with colon-rich
Example
|
Restore shipped skill discovery compatibility for colon-rich read_when and summary text. Keep structured YAML strict and preserve the existing description recovery contract. Co-authored-by: Ayaan Zaidi <[email protected]>
What Problem This Solves
Workspace skills were silently omitted when a plain-text
read_whenorsummaryvalue contained an unquoted colon followed by a space.For example,
read_when: signals: user announcing a conversion taskmakes YAML reportBLOCK_AS_IMPLICIT_KEY. The strict skill loader then rejects the complete skill.This regressed behavior that stable OpenClaw releases accepted before strict frontmatter diagnostics landed in
0d31fbf5f0ec.Related to #122496.
Why This Change Was Made
Markdown Core owns frontmatter parsing for every skill consumer. The repair keeps one canonical recovery loop there.
descriptionkeeps its shipped recovery for punctuation, reserved characters, alias-like text, and colon-rich text.read_whenandsummaryrecover only when YAML reportsBLOCK_AS_IMPLICIT_KEYon that exact top-level field and the value contains colon-space text.metadataremain strict.The allowlist is closed:
description,read_when, andsummary. The parser does not recover arbitrary fields or arbitrary YAML failures.User Impact
Valid workspace skills with colon-rich
read_whenorsummarytext now appear inopenclaw skills listand in the model's<available_skills>prompt.Malformed structured metadata still rejects the skill with a visible diagnostic.
Evidence
Real workspace skill
The same disposable workspace contained a valid control skill, a colon-rich skill, and a skill with malformed structured metadata.
Current main
0bd5c6a43b7d71e61834abf2f4b0b74cc92d6e46:Repaired head
0ec7dfae2ab172a53c16bc836a292bbf40491b5d:The proof ran a remote
pnpm build, the realopenclaw skills list --jsoncommand, the workspace loader, and the exact prompt snapshot builder. Testbox runs: main red, head green.Regression and focused tests
1fb253abde03f65ada9540d167ae63d5782e42ddfailed three existing description-recovery tests.git diff --check, and Autoreview passed.Dependency contract
packages/markdown-core/package.jsonpinsyaml2.9.0. ItsYAMLError.postype provides the required source range, andresolve-block-map.jsemitsBLOCK_AS_IMPLICIT_KEYat the compact nested mapping offset. Alias conversion instead fails duringtoJS, so the repair retains the existing description-alias path without extending it to other fields.Production size
Production: +33 lines. Tests: +95 lines.
The absorbing refactor keeps one parser owner and one bounded retry loop. No consumer workaround, fallback parser, or second recovery path was added.