Skip to content

refactor: simplify skills CLI formatting - #147368

Merged
steipete merged 1 commit into
mainfrom
codex/simplify-skills-cli-hints
Sep 13, 2026
Merged

steipete merged 1 commit into
mainfrom
codex/simplify-skills-cli-hints

Conversation

@steipete

@steipete steipete commented Sep 13, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Skills CLI formatting retained an unreachable JSON guard and a redundant test-fixture wrapper.

User Impact

No user-visible behavior changes. Human output keeps its profile-aware ClawHub hints, and JSON output remains machine-readable.

Why This Change Was Made

The list, info, and check formatters already return JSON before appending terminal guidance. Remove the helper's unused JSON argument and guard. The formatting tests now call the shared canonical fixture factory directly, completing the earlier fixture migration. This removes four production lines and ten test-support lines without changing assertions.

Evidence

  • All 38 tests in the two skills formatting suites passed, including JSON output, profile/container hints, whitespace, and real skill discovery fixtures.
  • Independent P2 review of the complete owners and callers found no actionable issues.
  • Required changed-file checks passed, including core/test types, lint, formatting, import-cycle checks, and dead-export scans. Exact-head CI completed successfully and the required gate passed. Seven separate CodeQL jobs were canceled before executing any steps; they produced no analyzer findings.

@clawsweeper

clawsweeper Bot commented Sep 13, 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.

@steipete
steipete marked this pull request as ready for review September 13, 2026 20:08
@openclaw-barnacle openclaw-barnacle Bot added cli CLI command changes size: XS maintainer Maintainer-authored PR labels Sep 13, 2026
@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 Sep 13, 2026
@clawsweeper

clawsweeper Bot commented Sep 13, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 13, 2026, 4:22 PM ET / 20:22 UTC.

ClawSweeper review

What this changes

The PR removes an unreachable JSON guard from skills CLI formatting and replaces a redundant test-fixture wrapper with its existing shared factory.

Merge readiness

✅ Ready for maintainer review

This is a sound, behavior-preserving cleanup with no actionable findings. The simplification remains absent from fetched main, and the protected maintainer label excludes automatic closure.

Priority: P3
Reviewed head: 06b4f2e1a82c4178bad49661b53240490d781e11

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused, maintainable cleanup with preserved behavioral coverage and no identified correctness defect.
Proof confidence 🌊 off-meta tidepool Not applicable: The maintainer-authored internal cleanup is exempt from external-contributor runtime proof; formatter source and retained tests support unchanged JSON and human output, with no tests executed during this review.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The maintainer-authored internal cleanup is exempt from external-contributor runtime proof; formatter source and retained tests support unchanged JSON and human output, with no tests executed during this review.
Evidence reviewed 6 items Introduced change verified: The pinned merge-base-to-head diff removes only the private helper's redundant JSON argument and a forwarding fixture wrapper; assertions and public formatter options remain unchanged.
JSON paths bypass terminal hints: Read the complete formatter: list returns JSON before empty-list handling; info returns JSON for both missing and found skills; check returns JSON before human formatting. Every hint call is therefore on a non-JSON path.
Retained behavioral coverage: The existing tests cover profile/container hints, hint-free parseable JSON, populated and missing-skill responses, sanitization, and whitespace. The changed fixture still calls the same canonical factory with identical arguments. The PR reports 38 passing tests; this read-only review did not execute them.
Findings None None.
Security None None.

How this fits together

The skills CLI formats discovered skill status for list, info, and check commands. It sends either machine-readable JSON or human-readable status with profile-aware ClawHub guidance to stdout.

flowchart LR
 A[Skills commands] --> B[Skill status report]
 B --> C{JSON requested?}
 C -->|Yes| D[Sanitized JSON]
 C -->|No| E[Human-readable status]
 E --> F[Profile-aware ClawHub hint]
 D --> G[Standard output]
 F --> G
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Source -4, Tests -10. Total -14 across 2 files.

View PR surface stats
Area Files Added Removed Net
Source 1 5 9 -4
Tests 1 1 11 -10
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 2 6 20 -14

Review metrics

None.

Technical review

Best possible solution:

Keep JSON selection in the public formatters and use the existing canonical fixture factory directly.

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

Not applicable: this is a refactor, and source inspection confirms the removed guard is unreachable through the registered CLI callers.

Is this the best way to solve the issue?

Yes: removing the redundant private guard and forwarding wrapper preserves existing output and coverage without introducing another abstraction.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against cdc378c96f35.

Labels

Label changes:

  • add P3: This removes redundant internal code without changing user-visible behavior.
  • 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: The maintainer-authored internal cleanup is exempt from external-contributor runtime proof; formatter source and retained tests support unchanged JSON and human output, with no tests executed during this review.

Label justifications:

  • P3: This removes redundant internal code without changing user-visible behavior.
  • 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: The maintainer-authored internal cleanup is exempt from external-contributor runtime proof; formatter source and retained tests support unchanged JSON and human output, with no tests executed during this review.

Evidence

What I checked:

  • Introduced change verified: The pinned merge-base-to-head diff removes only the private helper's redundant JSON argument and a forwarding fixture wrapper; assertions and public formatter options remain unchanged. (src/cli/skills-cli.format.ts:37, 06b4f2e1a82c)
  • JSON paths bypass terminal hints: Read the complete formatter: list returns JSON before empty-list handling; info returns JSON for both missing and found skills; check returns JSON before human formatting. Every hint call is therefore on a non-JSON path. (src/cli/skills-cli.format.ts:116, 06b4f2e1a82c)
  • Retained behavioral coverage: The existing tests cover profile/container hints, hint-free parseable JSON, populated and missing-skill responses, sanitization, and whitespace. The changed fixture still calls the same canonical factory with identical arguments. The PR reports 38 passing tests; this read-only review did not execute them. (src/cli/skills-cli.test.ts:93, 06b4f2e1a82c)
  • Current-main necessity: The two affected files are unchanged between the pinned merge base and fetched main, so this cleanup remains distinct from main. Inspection of v2026.9.4 also found the old helper guard. (src/cli/skills-cli.format.ts:37, cdc378c96f35)
  • Area-history routing: Current-main history records Peter Steinberger across readiness formatting, JSON serialization, and whitespace maintenance; GitHub commit metadata maps the whitespace commit to steipete. Older symbol-history and blame traversal encountered unavailable objects with HTTP 403, so no introduction attribution is asserted. (src/cli/skills-cli.format.ts, bfcf10672a35)
  • Protected review context: Live GitHub metadata confirms the pinned head, open state, target repository, and maintainer label. Repository State identifies the author as MEMBER, although the REST endpoint reports CONTRIBUTOR; the protected maintainer signal is independently present. (06b4f2e1a82c)

Likely related people:

  • steipete: 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 ed135da into main Sep 13, 2026
163 of 171 checks passed
@steipete
steipete deleted the codex/simplify-skills-cli-hints branch September 13, 2026 21:17
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

vincentkoc added a commit to Alix-007/openclaw that referenced this pull request Sep 13, 2026
…1-prep

* commit '912ae8d96e5964dfdcdf419b79613fb941cdf0a8': (350 commits)
  fix: keep workspace preparation responsive during cleanup (openclaw#147358)
  docs: alphabetize donors and sponsors and add Red Hat logo (openclaw#147302)
  fix(plugins): retain update authority through doctor effects (openclaw#144316)
  refactor(qa): share Multipass mount retry lifecycle (openclaw#147084)
  fix(memory): emit one JSON result for command failures (openclaw#147366)
  improve(plugins): speed up cold metadata loading (openclaw#147411)
  fix(sessions): avoid duplicate work after waited child replies (openclaw#147394)
  fix(agents): retain outstanding child results in parent context (openclaw#112623)
  test: preserve native workflow loader selection (openclaw#147403)
  fix: reduce repeated work while polling session pull requests (openclaw#147373)
  test(qa): preserve task cancellation across process replacement (openclaw#147382)
  fix: prevent sidebar refresh storms during session activity (openclaw#147400)
  refactor: simplify skills CLI formatting (openclaw#147368)
  fix: prevent Git checkout certificate failures behind egress proxy (openclaw#147410)
  fix(qa): stop live threads after their process leader exits (openclaw#147386)
  refactor(release): share agent turn retry lifecycle (openclaw#147076)
  fix(ui): keep uploaded images aligned with their prompts (openclaw#147389)
  fix(fs): guard skill reads and bound worker bundle staging (openclaw#147336)
  fix(ci): restore Linux service ownership fixtures (openclaw#147398)
  fix(plugins): preserve manifest permissions when building plugins (openclaw#147393)
  ...
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cli CLI command changes 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: XS 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