Skip to content

fix(plugins): keep marketplace JSON output machine-readable - #117307

Merged
steipete merged 1 commit into
mainfrom
codex/qa400-marketplace-json-owner
Aug 1, 2026
Merged

steipete merged 1 commit into
mainfrom
codex/qa400-marketplace-json-owner

Conversation

@steipete

@steipete steipete commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

What Problem This Solves

openclaw plugins marketplace list owner/repo --json successfully cloned the remote marketplace but printed Cloning marketplace source owner/repo... to stdout before its JSON object. Scripts and agents could not parse the documented machine-readable output.

Why This Change Was Made

The marketplace CLI always passed its human install logger to the marketplace loader. Select the already existing canonical quiet plugin JSON logger through the already existing lazy helper import when JSON output is requested, and keep the original logger unchanged for normal human commands.

User Impact

Remote and local JSON marketplace listing now write one clean complete JSON payload. Human listing still shows clone progress and plugin entries. Clone failures still emit their real diagnostic to stderr, exit nonzero, and never print a misleading success payload.

Evidence

  • Current-main RED used the actual Commander command, production marketplace owner, real defaultRuntime stdout/stderr, and a silent fake git: remote JSON parsing failed; local JSON and human output served as controls.
  • Frozen candidate GREEN repeats remote JSON, remote human output, local JSON, and remote clone failure with 7 passing real product assertions.
  • The one explicitly authorized cache-disabled owner suite passes 9 tests, including new regressions for clean JSON, human progress, and failure stderr/exit semantics.
  • Four fresh independent hostile P0-P3 reviews are clean; genuine full strict automated review passed with real TruffleHog v3.96.0 and 0.96 confidence.
  • Exactly two existing approved files; production +2/-2 (net zero). No eager dependency, config, SDK, trust, security policy, marketplace validation, or persistence changes.

@openclaw-barnacle openclaw-barnacle Bot added cli CLI command changes size: S maintainer Maintainer-authored PR labels Aug 1, 2026
@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. P2 Normal backlog priority with limited blast radius. labels Aug 1, 2026
@clawsweeper

clawsweeper Bot commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 1, 2026, 4:47 AM ET / 08:47 UTC.

ClawSweeper review

What this changes

The PR suppresses marketplace clone progress when openclaw plugins marketplace list --json is used, while retaining normal human progress output and adding focused regression tests.

Merge readiness

⚠️ Ready for maintainer review - 3 items remain

Keep this PR open for maintainer landing review. Current main still routes marketplace-list progress through the human logger, while the proposed quiet JSON logger matches existing CLI JSON behavior and preserves stderr failures; no patch defect was found. The branch is behind current main and carries the protected maintainer label, so its exact rebased head and the latest ClawSweeper rank-up moves need human confirmation. Likely related people: Peter Steinberger (high), Gio Della-Libera (medium), and cxbAsDev (medium).

Priority: P2
Reviewed head: bf7628078f7a049a21792eb0cff60f6bb09d221a

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused, low-risk repair with strong source alignment, regression coverage, and documented behavior proof; only exact-head refresh and protected-label review remain.
Proof confidence 🐚 platinum hermit (4/6) Sufficient (live_output): The PR body describes after-fix execution through the real Commander command and runtime with success and failure controls, and the supplied check data reports the dedicated Real behavior proof check successful.
Patch quality 🦞 diamond lobster (5/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (live_output): The PR body describes after-fix execution through the real Commander command and runtime with success and failure controls, and the supplied check data reports the dedicated Real behavior proof check successful.
Evidence reviewed 5 items Current-main defect path: Current main always creates the human install logger for marketplace listing; that logger sends info messages to the runtime log, while remote cloning calls logger.info before returning the manifest. Thus remote --json output can receive a progress line before the JSON payload.
Candidate uses the existing JSON-output convention: The candidate selects the existing quietPluginJsonLogger only for JSON mode. That logger implements no-op info, warn, error, and debug methods; existing plugin list and inspect commands use the same logger to avoid contaminating structured output.
Focused regression coverage: The candidate tests JSON-mode silence, unchanged human clone progress and list rendering, and JSON-mode clone failure routing to stderr with exit code 1 and no JSON payload.
Findings None None.
Security None None.

How this fits together

The plugin marketplace CLI accepts a local path or remote repository and asks the marketplace loader for a manifest. The loader may clone a remote source and report progress; the CLI then emits either human-readable lines or one JSON payload for scripts and agents.

flowchart LR
  A[Marketplace source argument] --> B[Marketplace list CLI]
  B --> C{JSON output requested?}
  C -->|Yes| D[Quiet plugin logger]
  C -->|No| E[Human progress logger]
  D --> F[Marketplace loader and clone]
  E --> F
  F --> G[Manifest result or error]
  G --> H[JSON stdout or text and stderr]
Loading

Before merge

  • Resolve merge risk (P1) - The branch is reported mergeable but behind current main, so rebase or exact-head review/check refresh is needed before landing.
  • Resolve merge risk (P1) - The supplied context records a ClawSweeper comment but omits its body; repository policy requires confirming and addressing its latest rank-up moves before merge.
  • Complete next step (P2) - No code repair is indicated; the protected maintainer label, branch freshness, and required latest ClawSweeper review-move check make this a human landing review item.
Agent review details

Security

None.

PR surface

Source 0, Tests +77. Total +77 across 2 files.

View PR surface stats
Area Files Added Removed Net
Source 1 2 2 0
Tests 1 77 0 +77
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 2 79 2 +77

Review metrics

None.

Merge-risk options

Maintainer options:

  1. Decide the mitigation before merge
    Rebase the focused logger change onto current main, confirm the latest ClawSweeper rank-up moves, and land it if exact-head checks preserve the demonstrated clean JSON, human-progress, and stderr-failure behavior.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Technical review

Best possible solution:

Rebase the focused logger change onto current main, confirm the latest ClawSweeper rank-up moves, and land it if exact-head checks preserve the demonstrated clean JSON, human-progress, and stderr-failure behavior.

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

Yes—source inspection gives a high-confidence current-main path: a remote marketplace clone invokes logger.info, and the current CLI supplies a logger that writes that progress to stdout before its JSON payload. The PR body also reports a focused real command-harness reproduction with that path.

Is this the best way to solve the issue?

Yes—the proposed change is the narrowest maintainable repair because it reuses the canonical quiet plugin JSON logger at the CLI output boundary, leaves human logging unchanged, and retains existing result-based error handling.

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

  • add P2: This fixes machine-readable output for marketplace-list automation without evidence of data loss, a security boundary failure, or core runtime unavailability.
  • add proof: sufficient: Contributor real behavior proof is sufficient. The PR body describes after-fix execution through the real Commander command and runtime with success and failure controls, and the supplied check data reports the dedicated Real behavior proof check successful.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🦞 diamond lobster.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (live_output): The PR body describes after-fix execution through the real Commander command and runtime with success and failure controls, and the supplied check data reports the dedicated Real behavior proof check successful.

Label justifications:

  • P2: This fixes machine-readable output for marketplace-list automation without evidence of data loss, a security boundary failure, or core runtime unavailability.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🦞 diamond lobster.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (live_output): The PR body describes after-fix execution through the real Commander command and runtime with success and failure controls, and the supplied check data reports the dedicated Real behavior proof check successful.
  • proof: sufficient: Contributor real behavior proof is sufficient. The PR body describes after-fix execution through the real Commander command and runtime with success and failure controls, and the supplied check data reports the dedicated Real behavior proof check successful.

Evidence

What I checked:

  • Current-main defect path: Current main always creates the human install logger for marketplace listing; that logger sends info messages to the runtime log, while remote cloning calls logger.info before returning the manifest. Thus remote --json output can receive a progress line before the JSON payload. (src/cli/plugins-cli.runtime.ts:895, e1101d15b87d)
  • Candidate uses the existing JSON-output convention: The candidate selects the existing quietPluginJsonLogger only for JSON mode. That logger implements no-op info, warn, error, and debug methods; existing plugin list and inspect commands use the same logger to avoid contaminating structured output. (src/cli/plugins-cli.runtime.ts:895, bf7628078f7a)
  • Focused regression coverage: The candidate tests JSON-mode silence, unchanged human clone progress and list rendering, and JSON-mode clone failure routing to stderr with exit code 1 and no JSON payload. (src/cli/plugins-cli.marketplace-entries.test.ts:347, bf7628078f7a)
  • Head proof and checks: The PR body describes an actual Commander-command/default-runtime before-and-after harness with remote JSON, local JSON, human output, and clone-failure controls; supplied GitHub status data reports the dedicated Real behavior proof check and all listed required quality checks successful. (bf7628078f7a)
  • Feature-history routing: Recent history for the shared quiet logger and affected test surface is dominated by Peter Steinberger; marketplace validation history includes cxbAsDev’s bounded-manifest-read repair, and Gio Della-Libera introduced marketplace feed trust-state coverage in the focused test file. (src/cli/plugins-json-logger.ts:3, 1f9ee89f2539)

Likely related people:

  • Peter Steinberger: Recent commits on both the quiet JSON logger/helper path and the focused marketplace CLI test surface identify him as the strongest current code-history routing candidate. (role: recent CLI and shared logger contributor; confidence: high; commits: 1f9ee89f2539, a0e591c86344, 401f278f111f; files: src/cli/plugins-json-logger.ts, src/cli/plugins-command-helpers.ts, src/cli/plugins-cli.marketplace-entries.test.ts)
  • Gio Della-Libera: The available focused-test history shows the marketplace feed trust-state work that established adjacent test coverage in this file. (role: marketplace test-surface contributor; confidence: medium; commits: 188d109edaff; files: src/cli/plugins-cli.marketplace-entries.test.ts)
  • cxbAsDev: Commit 35754a63cc repaired bounded marketplace manifest reads in the marketplace owner module, making this a relevant adjacent implementation history contact. (role: marketplace implementation contributor; confidence: medium; commits: 35754a63ccaf; files: src/plugins/marketplace.ts)

Rank-up moves

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

  • Rebase or refresh against current main, then confirm the exact head retains green checks and the latest ClawSweeper rank-up moves are satisfied.

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 b5f1bdb into main Aug 1, 2026
130 of 140 checks passed
@steipete
steipete deleted the codex/qa400-marketplace-json-owner branch August 1, 2026 08:56
@steipete

steipete commented Aug 1, 2026

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 2, 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 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.

1 participant