Skip to content

Fix array item types in list signatures#222

Merged
steipete merged 1 commit into
mainfrom
clawsweeper/issue-openclaw-mcporter-221
Jun 30, 2026
Merged

Fix array item types in list signatures#222
steipete merged 1 commit into
mainfrom
clawsweeper/issue-openclaw-mcporter-221

Conversation

@clawsweeper

@clawsweeper clawsweeper Bot commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Render array parameters in list signatures from GeneratedOption.arrayItemType instead of always string[].
  • Map string, number/integer, boolean, object, and unknown array item types to the matching TypeScript-style annotations.
  • Normalize integer to number for output-schema array return types and add focused regression tests.

Validation

  • pnpm exec vitest run tests/list-detail-helpers.test.ts
  • pnpm run check

Fixes #221

Reported by @VincXiong in #221.

@clawsweeper clawsweeper Bot added clawsweeper Tracked by ClawSweeper automation clawsweeper:autogenerated PR created automatically by ClawSweeper clawsweeper:autofix Maintainer opted this PR into bounded ClawSweeper-reviewed autofix without merge labels Jun 29, 2026
@clawsweeper

clawsweeper Bot commented Jun 29, 2026

Copy link
Copy Markdown
Contributor Author

Codex review: needs maintainer review before merge. Reviewed June 29, 2026, 8:06 PM ET / 00:06 UTC.

Summary
The PR updates list-signature formatting to use GeneratedOption.arrayItemType, normalizes integer output-schema arrays to number[], and adds focused formatter tests.

Reproducibility: yes. Source inspection shows current main hard-codes array option signatures as string[] while upstream extraction preserves arrayItemType; the linked issue provides a concrete mcporter list <server> reproduction shape.

Review metrics: 2 noteworthy metrics.

  • Patch size: 2 files changed, +48/-2. The diff is confined to the signature formatter and focused tests, which keeps review scope narrow.
  • CI matrix: 3/3 CI jobs successful. The PR head has successful Ubuntu, macOS, and Windows CI checks for the changed TypeScript package.

Root-cause cluster
Relationship: fixed_by_candidate
Canonical: #221
Summary: This PR is the implementation candidate for the canonical array-signature bug report, which remains open until the PR merges.

Members:

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

Merge readiness
Overall: 🐚 platinum hermit
Proof: 🌊 off-meta tidepool
Patch quality: 🐚 platinum hermit
Result: ready for maintainer review.

Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch.

Rank-up moves:

  • none.

Next step before merge

  • No automated repair lane is needed because this bot PR already contains the focused code and test fix; the remaining action is maintainer review or merge.

Security
Cleared: The diff only changes formatter logic and tests; it does not touch dependencies, workflows, secrets, package metadata, or other supply-chain surfaces.

Review details

Best possible solution:

Land this narrow formatter and test fix after maintainer review so #221 closes through the merge.

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

Yes. Source inspection shows current main hard-codes array option signatures as string[] while upstream extraction preserves arrayItemType; the linked issue provides a concrete mcporter list <server> reproduction shape.

Is this the best way to solve the issue?

Yes. Reusing the existing arrayItemType metadata in src/cli/list-signature.ts is the narrowest maintainable fix, and the PR adds regression coverage for parameter arrays and integer return arrays.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 18b42a04c20d.

Label changes

Label justifications:

  • P2: This fixes a concrete CLI and tool-catalog signature rendering bug with limited code surface but real downstream argument-shaping impact.
  • 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: Not applicable because this is a ClawSweeper bot-generated PR; the PR body reports validation and GitHub CI is green for the head.
Evidence reviewed

What I checked:

Likely related people:

  • steipete: GitHub commit metadata shows this user split out the list signature helper and later touched the same list-signature test surface; local blame attributes the current formatter block to the v0.12.2 release snapshot by Peter Steinberger. (role: feature-history owner; confidence: high; commits: ef71a3dfd415, 3296817748ec, 25daad40e901; files: src/cli/list-signature.ts, tests/list-detail-helpers.test.ts)
  • rawwerks: This user authored the merged generator change that introduced arrayItemType, which this PR now consumes in the formatter. (role: adjacent feature contributor; confidence: medium; commits: d2f0de130bbf; files: src/cli/generate/tools.ts, src/cli/generate/template.ts)
  • vincentkoc: This user recently touched CLI parsing and generated artifact behavior across the same schema and option inference area. (role: recent area contributor; confidence: medium; commits: 7491ed5a857e; files: src/cli/generate/tools.ts, src/cli/generate/template.ts)
What the crustacean ranks mean
  • 🦀 challenger crab: rare, exceptional readiness with strong proof, clean implementation, and convincing validation.
  • 🦞 diamond lobster: very strong readiness with only minor maintainer review expected.
  • 🐚 platinum hermit: good normal PR, likely mergeable with ordinary maintainer review.
  • 🦐 gold shrimp: useful signal, but proof or patch confidence is still limited.
  • 🦪 silver shellfish: thin signal; proof, validation, or implementation needs work.
  • 🧂 unranked krab: not merge-ready because proof is missing/unusable or there are serious correctness or safety concerns.
  • 🌊 off-meta tidepool: rating does not apply to this item.

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.

How this review workflow works
  • 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.

@clawsweeper clawsweeper Bot added 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. P2 Normal priority bug or improvement with limited blast radius. and removed clawsweeper:autofix Maintainer opted this PR into bounded ClawSweeper-reviewed autofix without merge labels Jun 29, 2026
@clawsweeper

clawsweeper Bot commented Jun 29, 2026

Copy link
Copy Markdown
Contributor Author

🦞✅
ClawSweeper autofix is complete for this exact head.

Source: clawsweeper[bot]
Feedback: structured ClawSweeper verdict: pass (sha=7244aa2f594ea4002a43a897246b0b479f193767)
Head: 7244aa2f594e

No actionable findings remain. I removed the repair-loop label and left the PR open for maintainer review and merge.

Automerge progress:

  • 2026-06-29 09:28:06 UTC review passed 7244aa2f594e (structured ClawSweeper verdict: pass (sha=7244aa2f594ea4002a43a897246b0b479f193...)

@steipete steipete merged commit 938594c into main Jun 30, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

clawsweeper:autogenerated PR created automatically by ClawSweeper clawsweeper Tracked by ClawSweeper automation P2 Normal priority bug or improvement with limited blast radius. 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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: list signature renders any array parameter as string[] regardless of items.type

1 participant