Skip to content

test(gateway,talk,hooks): remove low-value tests (batch d141) - #163169

Merged
steipete merged 10 commits into
mainfrom
tcr/land-d141-1790906634
Oct 2, 2026
Merged

steipete merged 10 commits into
mainfrom
tcr/land-d141-1790906634

Conversation

@steipete

@steipete steipete commented Oct 2, 2026

Copy link
Copy Markdown
Contributor

What Problem This Solves

Gateway, Talk relay, and hook tests repeat equivalent scenarios and fixture setup, adding maintenance and CI work without distinct behavioral protection.

User Impact

No user-visible behavior changes. This batch changes tests only; production and shared test-support LOC are unchanged.

Why This Change Was Made

Replay ten test-reduction shards onto current main. Consolidate repeated fixtures and table rows while retaining real transport replies, current authority checks, cancellation and cleanup, catalog publication, and deadline-policy assertions.

All ten source commits applied in their listed order without conflicts or skipped hunks. No baseline files changed. None of the changed paths match the current CODEOWNERS rules.

Evidence

  • Frozen-lockfile install, formatting of all 31 changed files, plain oxlint, and git diff --check passed locally.
  • Changed-gate dry run selected the core-test lane, including typecheck, type-aware lint, formatting, and repository guards.
  • Fresh Testbox focused run: attempted CI=1 pnpm install --frozen-lockfile --prefer-offline followed by CI=1 pnpm test for every changed test file. Lease tbx_01m3x5ten7hjae1j68g7zba10g stayed queued without a host or run URL for ten minutes; no tests executed.
  • OPENCLAW_TESTBOX=1 node scripts/check-changed.mjs -- <all 31 changed paths>: delegated correctly, but lease tbx_01m3x68yn3syrf1p2apgcxp06g also remained queued without a host or run URL; no checks executed. Both task-owned leases were stopped. No heavy local fallback ran.
  • Publishing under the campaign's explicit Testbox infrastructure-gap rule; hosted openclaw/ci-gate remains the merge gate. Independent review runs during CI.
  • Additional source review of s848 found retained proof for connected FIFO release, admitted worker authority, forged generation readers, and unavailable/serialization sender outcomes; this is not a substitute for measured coverage.

Historical coverage below comes from the individual shard runs, not a fresh whole-batch coverage run. s848 has no after-coverage result: its original remote upload failed with ENOSPC. Its baseline was 1,537 covered statements, 937 branches, and 279 functions; no claim is made that its coverage comparison passed.

Per-shard changes and historical coverage

The LOC deltas and source declaration counts below are measured from the supplied commits. Source declarations count it/test declarations, with a parameterized declaration counted once; executed table rows are separate. Small differences from historical shard LOC totals reflect the commits supplied for replay.

Shard Test LOC (+/−; net) Source declarations before → after In-shard covered totals
s837 +73/−147; -74 23 → 23 (+0) statements 3,284 → 3,299 (+15); branches 1,899 → 1,899 (0); functions 590 → 598 (+8).
s832 +168/−324; -156 27 → 25 (-2) statements 21,263 → 21,260 (−3); branches 12,512 → 12,514 (+2); functions 3,997 → 4,000 (+3).
s833 +78/−244; -166 9 → 9 (+0) covered statements 20858 -> 20844 (-14); branches 12157 -> 12141 (-16); functions 3959 -> 3959 (0)
s846 +59/−119; -60 23 → 21 (-2) covered statements 196 -> 196 (0); branches 146 -> 145 (-1); functions 18 -> 18 (0)
s838 +170/−240; -70 12 → 10 (-2) covered statements 11037 -> 11021 (-16); branches 7651 -> 7634 (-17); functions 1905 -> 1898 (-7)
s853 +31/−383; -352 100 → 93 (-7) covered statements 1643 -> 1641 (-2); branches 1059 -> 1055 (-4); functions 306 -> 306 (0)
s848 +73/−94; -21 11 → 11 (+0) After coverage unavailable (ENOSPC); baseline 1,537 covered statements, 937 branches, 279 functions.
s865 +74/−139; -65 4 → 2 (-2) covered statements 154 -> 154 (0); branches 77 -> 77 (0); functions 32 -> 32 (0)
s830 +62/−244; -182 30 → 26 (-4) covered statements 4307 -> 4317 (10); branches 2758 -> 2758 (0); functions 787 -> 788 (1)
s827 +177/−616; -439 13 → 11 (-2) covered statements 18444 -> 18450 (+6); branches 10269 -> 10272 (+3); functions 3528 -> 3527 (-1)

Test LOC: +965/−2,550, net −1,585 across 31 files. Production LOC: +0/−0. Shared test-support LOC: +0/−0.

s837

  • src/gateway/server-methods/send.scheduled-reads.integration.test.ts
  • src/gateway/server-methods/session-catalog-phase-diagnostics.test.ts
  • src/gateway/server-methods/session-catalog-provider-diagnostics.test.ts
  • src/gateway/server-methods/session-catalog-resident-entries.test.ts

s832

  • src/gateway/server-methods/models-auth-login.catalog.integration.test.ts
  • src/gateway/server-methods/models-auth-login.test.ts
  • src/gateway/server-methods/models-auth-status-rollup.test.ts

s833

  • src/gateway/server-methods/models-dispatch.lifecycle.integration.test.ts
  • src/gateway/server-methods/models-list-result.runtime-choices.test.ts
  • src/gateway/server-methods/models-list.freshness.integration.test.ts
  • src/gateway/server-methods/models-list.native-lifecycle.integration.test.ts

s846

  • src/gateway/server-methods/web-search-status.test.ts
  • src/gateway/server-methods/web-search.authority.test.ts
  • src/gateway/server-methods/web-search.test.ts

s838

  • src/gateway/server-methods/sessions-create.child-custody.test.ts

s853

  • src/gateway/talk/relay/cancellation-recovery.test.ts
  • src/gateway/talk/relay/index.test.ts
  • src/gateway/talk/relay/relay-consult-adoption.regression.test.ts

s848

  • src/gateway/server/ws-connection/authenticated-request-dispatch.mutation-authority.test.ts
  • src/gateway/server/ws-connection/message-handler.worker-metrics.test.ts

s865

  • src/hooks/autoreset-regression.test.ts
  • src/hooks/install.work-deadline.test.ts

s830

  • src/gateway/server-methods/cron.history-publication.test.ts
  • src/gateway/server-methods/cron.history.test.ts
  • src/gateway/server-methods/cron.list-scoped.test.ts
  • src/gateway/server-methods/cron.webchat-delivery.test.ts
  • src/gateway/server-methods/diagnostics.cpu-profile.test.ts
  • src/gateway/server-methods/diagnostics.heap-profile.test.ts

s827

  • src/gateway/server-methods/chat-send-message-injection.isolated-gateway.test.ts
  • src/gateway/server-methods/chat-send-profile-binding.test.ts
  • src/gateway/server-methods/chat-send-steering-custody.test.ts

@clawsweeper

clawsweeper Bot commented Oct 2, 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 enabled auto-merge (squash) October 2, 2026 02:18
@openclaw-barnacle openclaw-barnacle Bot added gateway Gateway runtime size: XL labels Oct 2, 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 Oct 2, 2026
@clawsweeper

clawsweeper Bot commented Oct 2, 2026

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge. Reviewed October 1, 2026, 10:22 PM ET / October 2, 2026, 02:22 UTC.

ClawSweeper review

What this changes

The branch consolidates fixtures and removes repeated Gateway, Talk relay, and hook test scenarios without changing production code.

Merge readiness

⛔ Blocked before merge - 1 item remains

Keep open: this remains useful test cleanup, and source review found no concrete blocking defect. Fresh whole-batch execution and complete coverage preservation remain unverified; the PR accurately discloses those limitations.

Priority: P3
Reviewed head: 58d679905a77df29f88ec5e10498764a8b4c2ccc

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) Useful, focused test consolidation with no concrete blocking defect found; execution and complete coverage equivalence are not established by this review.
Proof confidence 🌊 off-meta tidepool Not applicable: The repository state identifies a MEMBER-authored test cleanup with no changed production behavior requiring a live demonstration. Retained transport assertions and historical shard results are supplemental validation; fresh replay execution did not occur. No stored-data contract changes.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The repository state identifies a MEMBER-authored test cleanup with no changed production behavior requiring a live demonstration. Retained transport assertions and historical shard results are supplemental validation; fresh replay execution did not occur. No stored-data contract changes.
Evidence reviewed 9 items Pinned introduced change: Inspected the introduced hunks across all listed paths. The delta changes tests only; newer base-branch application, provider, and Doctor changes are outside this PR's introduction.
Verified merge preserves base work: The raw test-merge commit records the pinned main commit first and exact PR head second. Its comparison against main contains only the intended test changes, so endpoint drift does not establish any production-code removal.
Shared diagnostic lifetime coverage: CPU, heap, and snapshot profiling use the same capture owner for cancellation, current authority, and unavailable responses. The CPU suite retains the cancellation and authority cases removed from the heap suite.
Findings None None.
Security None None.

How this fits together

Gateway tests exercise client requests, model catalogs, session custody, and diagnostics; Talk tests cover audio relay behavior, while hook tests cover deferred session-reset work. These suites protect runtime contracts before changes reach users.

flowchart LR
  A[Test fixtures] --> B[Gateway requests]
  A --> C[Talk audio relay]
  A --> D[Session reset hooks]
  B --> E[Responses and session state]
  C --> F[Audio and cancellation]
  D --> G[Deferred work and cleanup]
  E --> H[Behavior assertions]
  F --> H
  G --> H
Loading

Before merge

  • Resolve review confidence - ClawSweeper must reach high confidence before merge readiness is known.
Agent review details

Security

None.

PR surface

Tests -1585. Total -1585 across 31 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 31 963 2548 -1585
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 31 963 2548 -1585

Review metrics

Metric Value Why it matters
Historical coverage comparison 9 shard comparisons reported; 1 unavailable The supplied results do not establish a complete before/after coverage comparison for the replayed batch.

Technical review

Best possible solution:

Keep compact tests at the owning boundaries while preserving distinct authority, delivery, cancellation, and cleanup contracts.

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

Not applicable: this PR reduces test duplication rather than reporting a product defect; source inspection does not establish that the revised batch executes successfully.

Is this the best way to solve the issue?

Yes, consolidating fixtures and repeated scenarios in their existing suites is a maintainable approach; complete coverage equivalence remains unverified.

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

  • add P3: This is test maintenance with no introduced production behavior, configuration, or stored-data change.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The repository state identifies a MEMBER-authored test cleanup with no changed production behavior requiring a live demonstration. Retained transport assertions and historical shard results are supplemental validation; fresh replay execution did not occur. No stored-data contract changes.

Label justifications:

  • P3: This is test maintenance with no introduced production behavior, configuration, or stored-data 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 repository state identifies a MEMBER-authored test cleanup with no changed production behavior requiring a live demonstration. Retained transport assertions and historical shard results are supplemental validation; fresh replay execution did not occur. No stored-data contract changes.

Evidence

What I checked:

  • Pinned introduced change: Inspected the introduced hunks across all listed paths. The delta changes tests only; newer base-branch application, provider, and Doctor changes are outside this PR's introduction. (58d679905a77)
  • Verified merge preserves base work: The raw test-merge commit records the pinned main commit first and exact PR head second. Its comparison against main contains only the intended test changes, so endpoint drift does not establish any production-code removal. (852c40ff4686)
  • Shared diagnostic lifetime coverage: CPU, heap, and snapshot profiling use the same capture owner for cancellation, current authority, and unavailable responses. The CPU suite retains the cancellation and authority cases removed from the heap suite. (src/gateway/server-methods/diagnostics.ts:16, 58d679905a77)
  • Retained chat transport regression: Both active-source and unknown-source tombstone cases remain parameterized. They reset the dispatch mock, exercise production dispatch and delivery, and assert a single final reply on the real loopback WebSocket; these are retained source assertions, not reviewer-executed proof. (src/gateway/server-methods/chat-send-message-injection.isolated-gateway.test.ts:172, 58d679905a77)
  • Retained worker diagnostics: The remaining suite checks FIFO release while computer work is pending, connection-close cancellation, unavailable sending, serialization failure, and diagnostic privacy. (src/gateway/server/ws-connection/message-handler.worker-metrics.test.ts:122, 58d679905a77)
  • Validation limitations disclosed: The captured PR body says both fresh Testbox requests remained queued and executed nothing. Historical shard coverage is supplemental; s848 has no after-coverage result because its upload failed with ENOSPC. No tests or artifact-producing checks were run during this read-only review. (58d679905a77)

Likely related people:

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

@steipete
steipete merged commit a37c803 into main Oct 2, 2026
113 checks passed
@steipete
steipete deleted the tcr/land-d141-1790906634 branch October 2, 2026 02:28
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 2, 2026
…aw#163169)

* test(gateway): deslop s837 tests

* test(gateway): deslop s832 tests

* test(gateway): deslop s833 tests

* test(gateway): deslop s846 tests

* test(gateway): deslop s838 tests

* test(talk): deslop s853 tests

* test(gateway): deslop s848 tests

* test(hooks): deslop s865 tests

* test(gateway): deslop s830 tests

* test(gateway): deslop s827 tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gateway Gateway runtime P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: XL 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