Skip to content

refactor(test): simplify catalog guards and fix native report fixture - #139496

Merged
steipete merged 2 commits into
mainfrom
codex/test-gmi-novita-catalog-assertions
Sep 6, 2026
Merged

steipete merged 2 commits into
mainfrom
codex/test-gmi-novita-catalog-assertions

Conversation

@steipete

@steipete steipete commented Sep 5, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

GMI and Novita catalog tests duplicate one-use result guards around useful registration assertions. A native report-utility test also leaves its process mock active while verifying real subprocess cleanup, which can turn valid Linux process observations into a cleanup failure.

Why This Change Was Made

Project the catalog-result union inline while keeping the original positive assertions, complete model-array traversal, and credential-free catalog calls. The shared catalog helper would inject an auth resolver and change those inputs.

Restore actual spawnSync passthrough only in the native report case. Its suite-wide mock otherwise returns undefined after reset and intercepts the cleanup owner's Linux ps -L census. The real observer can distinguish exited threads awaiting reaping from surviving workers. The strict process-tree flag, timeout, fixture lifetime, empty child PATH, and every assertion remain unchanged; the mock-only cases still configure their own implementations.

User Impact

No production, configuration, model-data or public-contract change. Both catalog cases and all 14 assertions remain, as do all seven report-utility cases. Three test files are +10/-32 lines, net -22; no production code changes.

Evidence

  • Catalog baseline and candidate each passed all 32 cases across the same five complete files and four native projects. Case identities and multiplicities match. The initial Linux changed gate passed all 19 checks.
  • Hosted CI exposed the report-fixture cleanup failure. Its original remaining process state is unknown. In a separate controlled Linux proof, the baseline failed one of seven cases: real all-thread observations showed only an exited descendant awaiting reaping before cleanup sent SIGKILL. The repaired case passed all seven tests with instrumentation, then all seven without it. Eight selected unchanged lifecycle controls also passed, including rejection of live descendants; 75 other controls were deliberately filtered.
  • Both paired runs used the same resolved Node 24.19/pnpm 12.3.4 Linux defaults. A transparent external observer and subreaper were used only for the controlled diagnosis. The remote default heap configuration differed from the original CI job, so this is not presented as an identical-environment CI replay or a performance comparison.
  • The report-fixture changed gate passed all 15 checks, including test-root types and lint. Both proof leases completed, temporary sources were removed, and recorded children were absent. Independent Codex subagent review found no actionable P0–P2 findings in the final composition.
  • The final three test afterimages match the reviewed and proved candidates after the current-main restack. Relevant provider/report/process owners, package pins, and test harnesses were unchanged; the only observed harness delta was an unrelated UI E2E configuration change.

An earlier CI run also exposed a retired assistant retry assertion. Main fixed that independently in #139519; this PR drops its temporary repair and contains no assistant-failure test change. The separate Gateway suppression fix is also already on main in #139576; no Gateway helper change is included here. These are registration and subprocess fixtures, not live provider API tests.

@clawsweeper

clawsweeper Bot commented Sep 5, 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 5, 2026 23:11
@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 5, 2026
@clawsweeper

clawsweeper Bot commented Sep 5, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 5, 2026, 9:28 PM ET / September 6, 2026, 01:28 UTC.

ClawSweeper review

What this changes

Simplifies GMI and Novita catalog assertions and restores real subprocess inspection in the native report test without changing production behavior.

Merge readiness

✅ Ready for maintainer review

The final patch remains useful and has no actionable correctness findings. Current main lacks these changes, and the separately merged fixes address work already removed from this branch.

Priority: P3
Reviewed head: 59ff69a807b32eadb197f1d54fd81c2a734b31f9

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused test repair and simplification that preserves existing assertions and cleanup invariants, with no actionable findings.
Proof confidence 🌊 off-meta tidepool Not applicable: The contributor-proof gate is exempt under the supplied MEMBER context. The body reports native Linux report generation and cleanup before/after evidence, plus unchanged lifecycle controls; linked run contents were not independently retrievable.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The contributor-proof gate is exempt under the supplied MEMBER context. The body reports native Linux report generation and cleanup before/after evidence, plus unchanged lifecycle controls; linked run contents were not independently retrievable.
Evidence reviewed 8 items Pinned scope and merge result: The verified test merge has the pinned main and PR head as its two parents; its difference from main contains only the two catalog tests and report test. Unrelated base-branch changes are not PR regressions.
Catalog coverage preserved: Both complete catalog tests retain their registration assertions, credential-free inputs, positive URL expectations, and full model-array traversal. Missing catalog results still fail the positive expectations.
Fixture mock ownership: The suite resets spawnSync before each report case. The native case now delegates to the actual implementation; subsequent mock cases install their own implementations. The timeout, strict process-tree option, empty child PATH, lifetime tracking, and report assertions remain intact.
Findings None None.
Security None None.

How this fits together

Provider registration tests verify the metadata and model catalogs exposed by plugins. The report test exercises the real test runner and relies on managed subprocess cleanup before releasing its temporary files.

flowchart TD
  A[Provider plugin metadata] --> B[Registration and catalog assertions]
  C[Native report fixture] --> D[Test runner subprocess]
  D --> E[JSON report assertions]
  D --> F[Real process inspection]
  F --> G[Verified cleanup and file release]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Tests -22. Total -22 across 3 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 3 10 32 -22
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 3 10 32 -22

Review metrics

None.

Technical review

Best possible solution:

Keep native process observation real while preserving strict cleanup and the existing catalog behavior assertions.

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

Yes, at the source level: the reset process mock intercepts the Linux census used by native cleanup and returns undefined. No tests were executed during this read-only review.

Is this the best way to solve the issue?

Yes. Restoring the actual observer within the native case repairs the test boundary without weakening cleanup, while the catalog simplification preserves the same positive checks.

AGENTS.md: found and applied where relevant.

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

Labels

Label justifications:

  • P3: This is bounded test maintenance with no production behavior or public-contract change.
  • 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 contributor-proof gate is exempt under the supplied MEMBER context. The body reports native Linux report generation and cleanup before/after evidence, plus unchanged lifecycle controls; linked run contents were not independently retrievable.

Evidence

What I checked:

  • Pinned scope and merge result: The verified test merge has the pinned main and PR head as its two parents; its difference from main contains only the two catalog tests and report test. Unrelated base-branch changes are not PR regressions. (6b31d95d6a95)
  • Catalog coverage preserved: Both complete catalog tests retain their registration assertions, credential-free inputs, positive URL expectations, and full model-array traversal. Missing catalog results still fail the positive expectations. (extensions/gmi/index.test.ts:21, 59ff69a807b3)
  • Fixture mock ownership: The suite resets spawnSync before each report case. The native case now delegates to the actual implementation; subsequent mock cases install their own implementations. The timeout, strict process-tree option, empty child PATH, lifetime tracking, and report assertions remain intact. (test/scripts/test-report-utils.test.ts:106, 59ff69a807b3)
  • Cleanup boundary verified: runNodeScript delegates to runManagedCommand. Its Linux inspection uses spawnSync for an all-thread process census; an undefined mock result prevents reliable zombie-only classification. Restoring the real observer preserves strict rejection of surviving descendants. This production owner is unchanged from pinned main. (scripts/lib/managed-child-process.mts:254, 59ff69a807b3)
  • Existing helper is not equivalent: The shared static-catalog helper supplies a resolveProviderAuth callback, unlike the intentionally credential-free inputs retained by these tests. The static catalog itself is built from plugin manifest data; these assertions do not exercise a Codex dependency contract. (src/plugins/provider-discovery.ts:209, 59ff69a807b3)
  • Reported validation and review continuity: The captured PR body reports paired Linux baseline/candidate runs, seven passing uninstrumented report cases, eight lifecycle controls, and a passing changed gate. It explicitly distinguishes controlled diagnosis from the original CI environment. Linked Actions evidence could not be retrieved by this reviewer, so these remain contributor-reported results. The previous completed review contains no findings; the newly added observer passthrough was reviewed directly. (59ff69a807b3)

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • Vincent Koc: 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.

History

Review history (2 earlier review cycles)
  • reviewed 2026-09-05T23:17:16.777Z sha 2ddfcaca2d7d64b721aaebbb06aef615d503aee7 :: needs maintainer review before merge. :: none
  • reviewed 2026-09-05T23:47:42.731Z sha 0293868 :: needs maintainer review before merge. :: none

@steipete
steipete force-pushed the codex/test-gmi-novita-catalog-assertions branch from 2ddfcac to 0293868 Compare September 5, 2026 23:42
@steipete steipete changed the title refactor(test): simplify GMI and Novita catalog assertions refactor(test): simplify catalog guards and refresh retry assertion Sep 5, 2026
@steipete
steipete force-pushed the codex/test-gmi-novita-catalog-assertions branch from 0293868 to 59ff69a Compare September 6, 2026 01:24
@steipete steipete changed the title refactor(test): simplify catalog guards and refresh retry assertion refactor(test): simplify catalog guards and fix native report fixture Sep 6, 2026
@steipete

steipete commented Sep 6, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

The final scope now includes the native report fixture's real process-observer passthrough. Controlled Linux before/after, an uninstrumented candidate run, strict lifecycle controls, the changed gate, and independent source review passed. The existing strict cleanup policy and all assertions remain intact. The temporary assistant-failure repair was dropped because main fixed it in #139519. Details and limitations are in the updated PR body.

@clawsweeper

clawsweeper Bot commented Sep 6, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

@steipete steipete self-assigned this Sep 6, 2026
@steipete
steipete merged commit 5fdd290 into main Sep 6, 2026
141 of 143 checks passed
@steipete
steipete deleted the codex/test-gmi-novita-catalog-assertions branch September 6, 2026 01:39
@steipete

steipete commented Sep 6, 2026

Copy link
Copy Markdown
Contributor Author

Merged via squash.

vincentkoc added a commit that referenced this pull request Sep 6, 2026
* commit '047587a542ce205ee78354fbd88ba8ec05c07844': (45 commits)
  chore(ui): refresh control ui locales (#139481)
  fix(slack): keep prototype-named emoji shortcodes intact (#136374)
  fix(gateway): deliver upgrade rejection responses under Bun (#139516)
  refactor(test): simplify catalog guards and fix native report fixture (#139496)
  fix(macos): prevent dashboard fixture loopback timeouts (#139556)
  fix(matrix): preserve selected reply targets inside threads (#139479)
  test(gateway): preserve held-work close failures (#139593)
  refactor(exec): share package argument scanning (#139560)
  fix(audit): preserve sequence range validation before numeric decoding (#139587)
  fix(transcripts): retain capture ownership through failed cleanup (#139572)
  refactor(models): share selector reference traversal (#139571)
  perf(agents): classify allowlists without intermediate sets (#138392)
  chore(release): update appcast for 2026.9.2 (#139575)
  fix(ci): synchronize cloud retries and board widget input (#139506)
  fix(plugins): explain SDK incompatibilities after core updates (#139458)
  fix(voice-call): retain installed WebSocket behavior under Bun (#139567)
  test(text): consolidate literal sanitizer cases (#139579)
  test(gateway): observe native drain without a lint exception (#139576)
  test(memory): consolidate visibility fixtures without policy defaults (#139569)
  fix(ui): show shimmer skeletons while loading Control UI (#139525)
  ...
vincentkoc added a commit that referenced this pull request Sep 6, 2026
* origin/main:
  fix(cli): keep note text with Windows and Unicode line endings (#139512)
  fix(agents): keep isolated completion context on its admitted generation (#139607)
  fix: avoid declaration builds during source-server updates (#139392)
  fix(models): keep discovered models after catalog refresh failures (#139357)
  fix(gateway): record a transcript notice when a run fails before replying (#139439)
  refactor(ios): reuse shared integer conversion (#139581)
  fix(sessions): prevent database lock failures during reclamation (#139469)
  perf(test): reuse transforms within owned scheduler slots (#139553)
  test(agents): share sparse transcript input fixtures (#139589)
  chore(ui): refresh control ui locales (#139481)
  fix(slack): keep prototype-named emoji shortcodes intact (#136374)
  fix(gateway): deliver upgrade rejection responses under Bun (#139516)
  refactor(test): simplify catalog guards and fix native report fixture (#139496)
  fix(macos): prevent dashboard fixture loopback timeouts (#139556)
  fix(matrix): preserve selected reply targets inside threads (#139479)
vincentkoc added a commit that referenced this pull request Sep 6, 2026
* commit 'refs/openclaw/tasks/pr-135167-main': (2467 commits)
  refactor(ios): reuse shared integer conversion (#139581)
  fix(sessions): prevent database lock failures during reclamation (#139469)
  perf(test): reuse transforms within owned scheduler slots (#139553)
  test(agents): share sparse transcript input fixtures (#139589)
  chore(ui): refresh control ui locales (#139481)
  fix(slack): keep prototype-named emoji shortcodes intact (#136374)
  fix(gateway): deliver upgrade rejection responses under Bun (#139516)
  refactor(test): simplify catalog guards and fix native report fixture (#139496)
  fix(macos): prevent dashboard fixture loopback timeouts (#139556)
  fix(matrix): preserve selected reply targets inside threads (#139479)
  test(gateway): preserve held-work close failures (#139593)
  refactor(exec): share package argument scanning (#139560)
  fix(audit): preserve sequence range validation before numeric decoding (#139587)
  fix(transcripts): retain capture ownership through failed cleanup (#139572)
  refactor(models): share selector reference traversal (#139571)
  perf(agents): classify allowlists without intermediate sets (#138392)
  chore(release): update appcast for 2026.9.2 (#139575)
  fix(ci): synchronize cloud retries and board widget input (#139506)
  fix(plugins): explain SDK incompatibilities after core updates (#139458)
  fix(voice-call): retain installed WebSocket behavior under Bun (#139567)
  ...
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 6, 2026
…openclaw#139496)

* refactor(test): simplify GMI and Novita catalog assertions

* test: keep native report process inspection real
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

extensions: gmi extensions: novita 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