Skip to content

refactor(test): reuse CLI plugin fixture writer - #147186

Merged
vincentkoc merged 1 commit into
mainfrom
refactor/test-audit-plugin-cli-fixtures-20260913
Sep 13, 2026
Merged

vincentkoc merged 1 commit into
mainfrom
refactor/test-audit-plugin-cli-fixtures-20260913

Conversation

@vincentkoc

@vincentkoc vincentkoc commented Sep 13, 2026 •

Copy link
Copy Markdown
Member

Related: #139428

What Problem This Solves

The local and registry CLI plugin fixtures duplicate the same package and entrypoint writer.

User Impact

No user-visible change. Both fixture commands keep their arguments, validation, and generated content.

Why This Change Was Made

The registry fixture now delegates to the existing writer with its registry dependency. The local dependency remains the default, and only that path creates the local dependency files. This removes 24 net lines of test support without changing tests or production code.

Evidence

  • Normal two-file tooling cohort before and after: 54 passed, zero skipped.
  • Both commands produced byte-identical file trees before and after; all seven missing-argument positions per command preserved the exit, error, and no-output behavior.
  • Targeted formatting and diff checks passed.
  • All 15 selected checks passed.
  • Required CI passed on the PR head. Hosted evidence used a source-bound synthetic merge and normal frozen cache-hit dependency setup.
  • Scoped review and completed hosted review found no actionable issues.

No full-suite, live-service, or performance claim.

@vincentkoc vincentkoc self-assigned this Sep 13, 2026
@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.

@vincentkoc
vincentkoc marked this pull request as ready for review September 13, 2026 16:36
@openclaw-barnacle openclaw-barnacle Bot added scripts Repository scripts 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, 1:04 PM ET / 17:04 UTC (Revision 2).

ClawSweeper review

What this changes

The PR shares the writer for local and registry CLI plugin test fixtures while preserving their arguments, validation, and generated files.

Merge readiness

✅ Ready for maintainer review

Keep open: this is a useful, bounded cleanup for the active test-audit campaign. Current main still contains the duplication, and review found no introduced correctness or security defect.

Priority: P3
Reviewed head: c819a5d8b9796a9790ddfeeab78619939b241f2f

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused, maintainable consolidation with relevant reported validation and no actionable findings.
Proof confidence 🌊 off-meta tidepool Not applicable: This MEMBER-authored test-support refactor is exempt from the external-contributor runtime-proof gate; the supplied command-output parity and argument-failure checks address the changed fixture writer.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: This MEMBER-authored test-support refactor is exempt from the external-contributor runtime-proof gate; the supplied command-output parity and argument-failure checks address the changed fixture writer.
Evidence reviewed 7 items Introduced patch preserves both dependency modes: The complete pinned delta delegates the registry command with version 7.0.0, retains the local file dependency as the default, and creates local dependency files only for that default. Argument validation and generated entrypoint content remain equivalent.
Dispatcher and shell callers preserve the contract: The dispatcher passes exactly one argument array to each handler. Both shell commands retain their existing positional arguments, so the new internal optional parameter cannot consume a CLI argument accidentally.
Cleanup remains absent from main and latest release: Inspected main retains separate CLI writers. The fixture module is identical between fetched main and v2026.9.4, so neither already contains this consolidation.
Findings None None.
Security None None.

How this fits together

OpenClaw’s end-to-end test tooling generates small plugin packages for installation and update scenarios. These fixtures provide CLI commands and dependencies that downstream tests exercise.

flowchart TD
  A[E2E scenario arguments] --> B[Fixture command dispatcher]
  B --> C[Local dependency command]
  B --> D[Registry dependency command]
  C --> E[Shared plugin writer]
  D --> E
  E --> F[Plugin package and entrypoint]
  F --> G[Install and update checks]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Other -24. Total -24 across 1 file.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 0 0 0 0
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 1 10 34 -24
Total 1 10 34 -24

Review metrics

None.

Root-cause cluster

Relationship: partial_overlap
Canonical: #139428
Summary: This is one bounded cleanup within the broader test-audit campaign and does not complete its overall targets.

Members:

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

Technical review

Best possible solution:

Keep one fixture writer with explicit local and registry dependency selection while retaining both established command entrypoints.

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

Not applicable: this is a behavior-preserving fixture refactor, not a reported runtime defect; no tests were executed during this read-only review.

Is this the best way to solve the issue?

Yes: reusing the existing writer removes duplicate generation logic while preserving the command dispatcher, validation order, dependency modes, and output content.

AGENTS.md: found and applied where relevant.

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

Labels

Label justifications:

  • P3: This removes duplicated test support without changing user-visible behavior or removing coverage.
  • 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: This MEMBER-authored test-support refactor is exempt from the external-contributor runtime-proof gate; the supplied command-output parity and argument-failure checks address the changed fixture writer.

Evidence

What I checked:

  • Introduced patch preserves both dependency modes: The complete pinned delta delegates the registry command with version 7.0.0, retains the local file dependency as the default, and creates local dependency files only for that default. Argument validation and generated entrypoint content remain equivalent. (scripts/e2e/lib/fixtures/plugins.mjs:98, c819a5d8b979)
  • Dispatcher and shell callers preserve the contract: The dispatcher passes exactly one argument array to each handler. Both shell commands retain their existing positional arguments, so the new internal optional parameter cannot consume a CLI argument accidentally. (scripts/e2e/lib/fixture.mjs:17, c819a5d8b979)
  • Cleanup remains absent from main and latest release: Inspected main retains separate CLI writers. The fixture module is identical between fetched main and v2026.9.4, so neither already contains this consolidation. (scripts/e2e/lib/fixtures/plugins.mjs:98, 8e854bc3c801)
  • Retained executable fixture coverage: The existing test invokes the actual fixture dispatcher and checks local dependency metadata, dependency package creation, and CLI entrypoint content. No tests or assertions are removed. (test/scripts/fixture-plugin-commands.test.ts:55, c819a5d8b979)
  • Campaign context and supplied validation: The captured PR body links the open campaign at Test audit: reduce redundant test code and full-suite runtime #139428 and reports 54 passing cases before and after, byte-identical output trees for both commands, and preserved failure behavior for all seven missing-argument positions per command. These are contributor-reported results; this read-only review did not rerun them. The previous review at the same head had no findings or published rank-up moves. (c819a5d8b979)
  • Feature-history routing: Current-main file history repeatedly identifies Peter Steinberger. GitHub commit metadata maps the earlier CLI fixture change to steipete and exposes its relevant patch. Deeper local blame/history traversal encountered unavailable objects, so no broader causal attribution is claimed. (scripts/e2e/lib/fixtures/plugins.mjs:108, 7ddf28c0d440)

Likely related people:

  • unknown: The claimed source-line change could not be verified from bounded local history. (role: source history unknown; 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.

History

Review history (1 earlier review cycle)
  • reviewed 2026-09-13T16:42:59.961Z sha c819a5d :: needs maintainer review before merge. :: none

@vincentkoc
vincentkoc merged commit 4f89acc into main Sep 13, 2026
143 checks passed
@vincentkoc
vincentkoc deleted the refactor/test-audit-plugin-cli-fixtures-20260913 branch September 13, 2026 17:11
@vincentkoc

Copy link
Copy Markdown
Member Author

Merged via squash.

vincentkoc added a commit that referenced this pull request Sep 13, 2026
* commit '201f11afefdb19a9c75e9d3542bf7425c80df7a7': (141 commits)
  fix: keep catalog discovery scoped and execution lazy (#147159)
  fix: serialize reclamation worker shutdown with foreground writes (#147178)
  test(sessions): cover abrupt committed transcript recovery (#143984)
  fix: stop transcript storms during context overflow recovery (#147202)
  fix: reduce CPU overhead for small history and usage reads (#147205)
  fix: resume tasks after tools finish and the model times out (#147203)
  refactor(scripts): share SQLite reliability message waits (#146900)
  feat(exec): configure approval reviewer thinking and fastMode (#147192)
  test: remove redundant Bonjour module headers (#146981)
  refactor: share streaming media tail boundary update (#146989)
  refactor(tui): classify resume candidates once (#146983)
  improve: skip unused toast dismissal work (#147196)
  fix(linux): recover saved remote connections without replacing active sessions (#146047)
  fix: doctor stays silent when Windows state dir is under OneDrive (#123720)
  feat: announce successful Daybreak retries (#147146)
  feat(code-mode): reuse results across code cells (#147154)
  refactor(test): reuse CLI plugin fixture writer (#147186)
  test: skip unused compiler setup in routing fixtures (#147194)
  test: reuse LINE webhook runtime fixture (#146710)
  fix(code-mode): check automation and process result types (#147143)
  ...
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

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. scripts Repository scripts 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