Skip to content

refactor(test): share plugin fixture server shims - #147225

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

vincentkoc merged 1 commit into
mainfrom
refactor/test-audit-plugin-server-shims-20260913

Conversation

@vincentkoc

@vincentkoc vincentkoc commented Sep 13, 2026 •

Copy link
Copy Markdown
Member

What Problem This Solves

The plugin cleanup tests maintain two copies of the same fixture-server setup.

User Impact

No user-visible or production runtime change. All test cases and assertions remain.

Why This Change Was Made

Use one private helper with a defaulted TERM action, preserving both normal shutdown and stubborn-process cleanup. This removes 14 lines of duplicated test support.

Evidence

Related: #139428

@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 17:28
@openclaw-barnacle openclaw-barnacle Bot added 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:58 PM ET / 17:58 UTC (Revision 3).

ClawSweeper review

What this changes

Shares the plugin cleanup tests’ fixture-server setup while preserving normal shutdown and TERM-resistant process scenarios.

Merge readiness

✅ Ready for maintainer review

Keep open: this is a useful, behavior-preserving cleanup in the active test-audit campaign. No actionable correctness or security findings remain, and current main still contains the duplication.

Priority: P3
Reviewed head: 0a35e8769c919e8eb8fe1eb4a6d5cac462454aa3

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused, behavior-preserving cleanup with reported matched validation and no actionable findings.
Proof confidence 🌊 off-meta tidepool Not applicable: The MEMBER-authored PR changes only test support, so the external-contributor runtime-proof gate does not apply; reported before/after tests supplement source equivalence.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The MEMBER-authored PR changes only test support, so the external-contributor runtime-proof gate does not apply; reported before/after tests supplement source equivalence.
Evidence reviewed 8 items Introduced scope and preserved behavior: The verified introduced delta changes only the private fixture helper and its stubborn-process caller. Both literal TERM actions produce the original shell text; file permissions, write order, PID initialization, and all assertions remain unchanged. The three callers are at lines 511, 546, and 1429.
Cleanup owner: The unchanged fixture owner sends TERM, polls for exit, escalates to KILL, and waits for the child; its EXIT handler preserves caller cleanup. The retained tests exercise this owner through the npm and ClawHub fixture entrypoints.
Still useful on current main: Fetched main retains separate normal and stubborn fixture helpers. The supplied merged Workboard repair addresses unrelated cleanup and does not supersede this consolidation.
Findings None None.
Security None None.

How this fits together

OpenClaw’s plugin test tooling starts temporary registry servers and cleans them up after failed readiness checks. These test fixtures simulate cooperative and stubborn processes so the tests can verify shutdown and caller cleanup.

flowchart TD
  A[Plugin cleanup tests] --> B[Shared fixture setup]
  B --> C{TERM behavior}
  C --> D[Exit normally]
  C --> E[Ignore TERM]
  D --> F[Registry cleanup tooling]
  E --> F
  F --> G[Assert process exit and caller cleanup]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Tests -14. Total -14 across 1 file.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 1 7 21 -14
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 1 7 21 -14

Review metrics

None.

Technical review

Best possible solution:

Keep one private fixture writer with two explicit TERM actions and preserve the existing cleanup assertions.

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

Not applicable: this is test-support consolidation, not a reported runtime defect; source inspection confirms both fixture variants are preserved.

Is this the best way to solve the issue?

Yes: a defaulted literal parameter removes the duplication without adding an export, production seam, or competing cleanup owner.

AGENTS.md: found and applied where relevant.

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

Labels

Label justifications:

  • P3: This removes duplicated test setup without changing production behavior or retained scenarios.
  • 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 MEMBER-authored PR changes only test support, so the external-contributor runtime-proof gate does not apply; reported before/after tests supplement source equivalence.

Evidence

What I checked:

  • Introduced scope and preserved behavior: The verified introduced delta changes only the private fixture helper and its stubborn-process caller. Both literal TERM actions produce the original shell text; file permissions, write order, PID initialization, and all assertions remain unchanged. The three callers are at lines 511, 546, and 1429. (test/scripts/plugins-assertions.test.ts:72, 0a35e8769c91)
  • Cleanup owner: The unchanged fixture owner sends TERM, polls for exit, escalates to KILL, and waits for the child; its EXIT handler preserves caller cleanup. The retained tests exercise this owner through the npm and ClawHub fixture entrypoints. (scripts/e2e/lib/plugins/fixtures.sh:63, 0a35e8769c91)
  • Still useful on current main: Fetched main retains separate normal and stubborn fixture helpers. The supplied merged Workboard repair addresses unrelated cleanup and does not supersede this consolidation. (test/scripts/plugins-assertions.test.ts:72, 201f11afefdb)
  • Release comparison: The latest supplied release, v2026.9.4, also retains both separate fixture helpers. (test/scripts/plugins-assertions.test.ts:71, 3a9d69db306c)
  • Re-review continuity: GitHub reports blob c0c625b430622a0e5263bfcf44605bc121ff2329 for the earlier reviewed revision; the current file has the identical blob. The supplied previous review has no findings or published rank-up moves. Local access to the earlier commit failed, so GitHub blob identity supplied the comparison. (test/scripts/plugins-assertions.test.ts, 0a35e8769c91)
  • Campaign and validation context: The supplied discussion links the maintainer-requested campaign at Test audit: reduce redundant test code and full-suite runtime #139428. The PR body reports 54 cases passing before and after without skips, identical generated fixtures, and 16 selected checks passing. These are contributor-reported results; no tests were executed during this read-only review.

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 (2 earlier review cycles)
  • reviewed 2026-09-13T17:32:38.086Z sha fc8a7aa :: needs maintainer review before merge. :: none
  • reviewed 2026-09-13T17:45:58.882Z sha fc8a7aa :: needs maintainer review before merge. :: none

@vincentkoc
vincentkoc force-pushed the refactor/test-audit-plugin-server-shims-20260913 branch from fc8a7aa to 0a35e87 Compare September 13, 2026 17:51
@vincentkoc
vincentkoc merged commit 83b9a53 into main Sep 13, 2026
81 checks passed
@vincentkoc
vincentkoc deleted the refactor/test-audit-plugin-server-shims-20260913 branch September 13, 2026 18:13
@vincentkoc

Copy link
Copy Markdown
Member Author

Merged via squash.

vincentkoc added a commit that referenced this pull request Sep 13, 2026
* commit '2d87daf04b78992382299d552f15ac84a86a23ed': (1815 commits)
  fix(ui): distinguish tool activity with semantic icons (#147207)
  fix(linux): recover completed Quick Chat replies without resending (#146048)
  feat(desktop): unify Tauri title bar and window controls (#147097)
  refactor(test): share plugin fixture server shims (#147225)
  perf(gateway): defer worker workspace execution imports (#143496)
  fix(gateway): post-ack webhook work fails with "Async work scope is closed" (#144801)
  refactor(scripts): centralize upgrade survivor version floors (#146975)
  fix(ci): check publication registries before FRV fanout (#147184)
  fix(qa): align system-agent delegation with channel contracts (#145905)
  improve: reduce repeated chat message identity work (#147210)
  fix(channels): remove stale pre-tool previews from Slack and Telegram (#147106)
  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)
  ...
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. 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