Skip to content

test(discord,qa-lab,core): remove low-value tests (batch d279) - #177175

Merged
steipete merged 35 commits into
mainfrom
tcr/land-d279-1792400153
Oct 19, 2026
Merged

steipete merged 35 commits into
mainfrom
tcr/land-d279-1792400153

Conversation

@steipete

@steipete steipete commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Test suites repeat fixture construction, mock setup, and assertion scaffolding, making the behavior they protect harder to follow. This maintainer-requested batch consolidates that scaffolding and removes redundant cases.

User Impact

No production behavior, public API, configuration, or migration changes. Production LOC: +0 / -0. Test and test-support LOC: +6,041 / -9,607, net -3,566 across 52 files, relative to base 041bcf8a3e9c99737d016001dd9d39fb7f2c3f1e.

The mock-exports baseline additionally shrinks by nine obsolete entries: +0 / -9. Total diff: 53 files, +6,041 / -9,616, net -3,575.

Why This Change Was Made

Replays all 30 supplied campaign commits in order onto the pinned base. Shared fixtures and table-driven cases keep security, cancellation, ordering, lifecycle, and protocol assertions visible without repeated setup. This is source simplification, not a measured runtime-speed improvement.

Replay decisions

No commit was skipped entirely. Conflicting file-level rewrites were dropped where current main has additional regression cases or changed fixture ownership:

  • ad57c70bf9a: keep the preceding frontmatter cleanup; drop this commit's frontmatter rewrite so main's JSON5, malformed YAML, delimiter, and field-recovery cases remain.
  • 6e4e9719392 and e45e4731666: drop the two systemd scope/identity rewrites; keep the first commit's cleanup and all newer account, start-policy, and custody tests. Apply the other daemon files.
  • 887c5a1cadf: preserve main's valid-request rate-limit sequence rather than reintroduce the old invalid-request sequence. Keep its separate schema-invalid request regression and expanded capability table.
  • 338472c3208: drop the HTTP file rewrite, retaining the preceding HTTP cleanup and main's expanded cases; apply the other A2A files.
  • fc82bbb1647 and b87bbd30ba1: drop log-tail rewrites entirely; preserve main's expanded truncation, rotation, directory, and empty-file coverage. Apply the other logging files.
  • 846f2b4986e, efcdac35df6, and 2ac424ddfd8: drop service-branches rewrites entirely; preserve main's shared-dirty checkout, rebase, bisect, and branch-inventory cases. Apply template-cache and template-registry cleanup.
  • First conflict-driven rebase: main's new runtime-argument formatting regression remains intact; dropped the final subsystem rewrite from b87bbd30ba1, retaining earlier clean logging cleanup.
  • First hosted run exposed stale web-search helper references, callback/fixture type mismatches, and a Bun read-only property failure. Completed the web-search caller rename, corrected the narrow expectation/config callback types, and made required CLI PID evidence explicit. Dropped all changes to host-scope-settlement.test.ts and scenario-runtime-e2ee-shared.test.ts, retaining their base fixtures and coverage rather than introducing compatibility machinery or fabricated full clients.
  • A second conflict-driven rebase retained main's removal of resource-delivery result objects (b8cf2f347f7, refactor(process): remove private options and unread results #177134). Dropped all resource-host.test.ts cleanup instead of reviving the retired API.
  • Later hosted static checks exposed newly checked mock-isolation documentation, request-body narrowing, and an async HTTP listener mismatch. Added specific isolation explanations for synthetic clients/config/providers, narrowed the serialized A2A request body before parsing, and restored the existing synchronous TTS request-listener fixture. Corrected the parameterized test cleanup to use Vitest's exported hook and parsed terminal CLI JSON separately from its prompt acknowledgement; expected behavior assertions remain intact.
  • Pruned exactly the nine grandfathered mock-exports entries reported obsolete by hosted CI after those isolation explanations were added. This is shrink-only maintenance; no new baseline exception is introduced.

Per-shard inventory

LOC includes changed test-support files. Declaration counts are static it/test call sites (including tables), not expanded runtime cases. Counts are from the final replay versus its pinned main base, not the older shard report snapshots.

Shard Area Test/support LOC before → after Declarations before → after In-shard coverage totals
x8360 Discord 1,670 → 1,246 33 → 30 Not measured: report explicitly uses CI-only mode
x8361 QA Lab 1,425 → 1,075 26 → 24 Not measured: report explicitly uses CI-only mode
x8364 Markdown 1,652 → 1,386 82 → 77 Not measured: report explicitly uses CI-only mode
x8363 Daemon 1,690 → 1,388 50 → 46 Not measured: report explicitly uses CI-only mode
x8365 A2A 1,646 → 1,393 47 → 46 Not measured: report explicitly uses CI-only mode
x8370 Web search 1,605 → 1,337 38 → 38 Not measured: report explicitly uses CI-only mode
x8369 Logging 1,239 → 1,042 39 → 38 Not measured: report explicitly uses CI-only mode
x8366 Process 1,045 → 863 20 → 20 Not measured: report explicitly uses CI-only mode
x8368 Gateway 1,724 → 1,331 25 → 13 Not measured: report explicitly uses CI-only mode
x8374 Channels 1,590 → 1,253 37 → 37 Not measured: report explicitly uses CI-only mode
x8367 Worktrees 701 → 525 14 → 11 Not measured: report explicitly uses CI-only mode
x8372 Zalouser 1,619 → 1,287 27 → 24 Not measured: report explicitly uses CI-only mode
x8371 TTS 1,604 → 1,518 31 → 31 Not measured: report explicitly uses CI-only mode
Files by shard
  • x8360: extensions/discord/src/monitor/{thread-bindings.authority.test.ts,thread-bindings.compatibility.test-support.ts,thread-bindings.lifecycle.test-support.ts,thread-bindings.lifecycle.test.ts,threading.auto-thread.test.ts,threading.starter.test.ts}.
  • x8361: extensions/qa-lab/src/live-transports/matrix/scenarios/{scenario-runtime-cli.test.ts,scenario-runtime-e2ee-cli-account.test.ts,scenario-runtime-e2ee-destructive.test.ts,scenario-runtime-state-files.test.ts}.
  • x8364: packages/markdown-core/src/{frontmatter.test.ts,ir.test.ts,render-aware-chunking.test.ts,render.annotations.test.ts}.
  • x8363: src/daemon/{systemd-service-files.scope.test.ts,systemd-service-identity.test.ts,systemd-system.test.ts,systemd-unavailable.test.ts,systemd-user-transport.test.ts}.
  • x8365: extensions/a2a/src/{channel.test.ts,http.test.ts,inbound.test.ts,outbound.test.ts}.
  • x8370: src/web-search/{runtime-configuration.test.ts,runtime-snapshot.test.ts,runtime.test.ts}.
  • x8369: src/logging/{logger-redaction-behavior.test.ts,redact-large-text-security.test.ts,subsystem.test.ts}.
  • x8366: src/process/spawn-broker/{execa.test.ts,host.test.ts}.
  • x8368: src/gateway/{server.agent.subagent-delivery-context.test.ts,server.config-agent-mutations.test-support.ts,server.config-security-policy.test.ts,server.device-pair-approve-authz.test.ts,server.incognito-transcript-reconcile.test.ts,server.node-pairing-auto-approve.test.ts,server.sessions.reset-hooks.succession.test.ts,server.sessions.worker-placement-order.test.ts}.
  • x8374: src/channels/plugins/{setup-wizard-helpers.test.ts,setup-wizard.test.ts,status.test.ts}.
  • x8367: src/agents/worktrees/{template-cache.test.ts,template-registry.test.ts}.
  • x8372: extensions/zalouser/src/{tool.test.ts,zalo-js.credentials.test.ts,zalo-js.listener.test.ts,zalo-quote-metadata.test.ts}.
  • x8371: src/tts/{tts-runtime-routing.test.ts,tts-streaming.resources.test.ts,tts-summary.resources.test.ts,tts-summary.selection.test.ts}.

No changed file matches the base's CODEOWNERS rules.

Evidence

  • Frozen-lockfile dependency install completed.
  • node_modules/.bin/oxfmt --write <changed files> passed, including the CI repair.
  • node_modules/.bin/oxlint -c .oxlintrc.json <changed files> exited 0, including the CI repair.
  • git diff --check 041bcf8a3e9c99737d016001dd9d39fb7f2c3f1e passed; working tree clean.
  • Per operator's CI-only instruction: no local Vitest, check-changed, typecheck, coverage, or Testbox runs. No runtime timing or coverage-retention percentage is claimed. Required openclaw/ci-gate selects and runs hosted proof from this diff.
  • Independent isolated review completed two full-diff passes. Accepted and fixed: preserve Windows-safe geteuid fixture setup, and retain the invalid idle-template corruption/rebuild assertion after readers settle. Rejected: the private-peer query finding does not apply to the exercised path; the private-route test already returns a version only for Version queries and null for unit queries. The connection() helper is used only for version admission or deliberately failing later connections. Follow-up reviews of the accepted repairs, parameterized-cleanup/CLI-output fixes, and final static-check repairs were scoped-clean.
  • Initial hosted run 39227416075 found batch-caused failures; the repair above addresses the observed errors. Fresh-head hosted CI remains the runtime/typecheck proof gate.

@clawsweeper

clawsweeper Bot commented Oct 19, 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 19, 2026 09:01
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-19T09:37:39.027138Z fa13481 New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@openclaw-barnacle openclaw-barnacle Bot added channel: discord Channel integration: discord channel: zalouser Channel integration: zalouser gateway Gateway runtime agents Agent runtime and tooling extensions: qa-lab channel: a2a size: XL labels Oct 19, 2026
@steipete
steipete force-pushed the tcr/land-d279-1792400153 branch from 14e95ce to ee8c381 Compare October 19, 2026 09:05
@steipete
steipete disabled auto-merge October 19, 2026 09:12
@steipete
steipete enabled auto-merge (squash) October 19, 2026 09:13
@steipete
steipete disabled auto-merge October 19, 2026 09:20
@steipete
steipete force-pushed the tcr/land-d279-1792400153 branch from 6466aac to 5448931 Compare October 19, 2026 09:22
@steipete
steipete enabled auto-merge (squash) October 19, 2026 09:22
@steipete
steipete disabled auto-merge October 19, 2026 09:28
@steipete
steipete enabled auto-merge (squash) October 19, 2026 09:34
@steipete
steipete disabled auto-merge October 19, 2026 09:44
@steipete
steipete enabled auto-merge (squash) October 19, 2026 09:45
@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Oct 19, 2026
@clawsweeper

clawsweeper Bot commented Oct 19, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This PR consolidates test fixtures and assertions, removes redundant cases, and deletes obsolete mock-baseline entries.

Example: A Matrix QA CLI ignores SIGTERM and exceeds its 500 ms timeout.

  • Before: Separate fixtures verify immediate and late waiters, timeout diagnostics, and process termination.
  • After: A shared fixture exercises both waiter cases while retaining timeout and process-exit assertions.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) Useful, focused test consolidation with no actionable defect found; evidence is hosted test and harness validation, and the required CI gate is unfinished.
Proof confidence 🦐 gold shrimp (3/6) This maintainer-authored PR changes tests and test support only; hosted changed-test and static-check results support validation without a new user-visible runtime scenario.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Test only · Worth it: Yes
Reason: The maintainer-approved direction reduces repeated test setup while retaining meaningful security, lifecycle, cancellation, and recovery checks.

Merge readiness

✅ Ready for maintainer review

Keep open: this maintainer-authorized cleanup preserves the reviewed regression contracts, with no actionable findings; required CI remains pending.

Priority: P3
Reviewed head: b181fed041ec739e36fcbf5cc802dcc1a64f77aa

Before merge

None.

Findings

None.

Agent review details

How this fits together

Vitest suites feed synthetic requests, isolated state, and subprocess fixtures into existing production owners and assert their observable results.

flowchart LR
  A[Test cases] --> B[Shared fixtures]
  B --> C[Production owners]
  C --> D[Isolated state and transports]
  D --> E[Results and lifecycle events]
  E --> F[Regression assertions]
Loading

Technical review

Best possible solution:

Land the consolidation with distinct regression assertions intact once the existing required CI gate passes.

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

This is test maintenance rather than a reported product defect; source inspection confirms repeated scaffolding and retained regression scenarios.

Is this the best way to solve the issue?

The consolidation uses existing fixture owners and preserves the reviewed behavioral distinctions without introducing production machinery.

AGENTS.md: found and applied where relevant.

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

Provenance checked

  • Matrix CLI termination and waiter coverage keeps the original intent (b8fc2f6: Ensure timed-out Matrix CLI processes terminate and late waiters retain timeout diagnostics; history was followed across the QA Matrix to QA Lab rename.)
  • Worktree template custody keeps the original intent (c6168a9: Protect parallel worktree creation, persisted reservations, template readers, and cleanup; later sharing and materialization repairs retained these contracts.)
  • Zalo credential persistence keeps the original intent (952907b: Move ordinary credential persistence off the Gateway thread while retaining logout and replacement-session fences.)
  • Systemd transport selection keeps the original intent (ccd3fbb: Preserve working explicit buses and recover from stale session-bus settings through one transport-selection owner.)
  • Markdown test consolidation keeps the original intent (34b093e: Reduce repeated test scaffolding while preserving distinct parser, formatting, and protocol contracts.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

  • Pinned scope: The introduced diff contains tests, three test-support files, and shrink-only mock-baseline maintenance; production behavior and public contracts are unchanged. (b181fed041ec)
  • Security coverage retained: The pairing table retains scope escalation, mixed-role, trusted-proxy, cross-device approval, and cross-device rejection cases with persisted-state assertions. (src/gateway/server.device-pair-approve-authz.test.ts:126, b181fed041ec)
  • Custody coverage retained: Worktree consolidation retains independent cancellation, uncertain native outcomes, reader custody, and invalid idle-template rebuilding. (src/agents/worktrees/template-cache.test.ts:111, b181fed041ec)
  • Existing fixture ownership: The reused temporary-directory helper canonicalizes the system temporary root, and the worktree fixture closes database owners before removing files. (test/helpers/temp-dir.ts:20, b181fed041ec)
  • Linked refactor respected: The merged process refactor refactor(process): remove private options and unread results #177134 intentionally removed unread resource-delivery results; this PR excludes resource-host cleanup rather than restoring that API. (b8cf2f347f75)
  • Exact-head validation: Changed-test lanes, typechecks, lint, baseline ratchets, and QA smoke checks report success on the reviewed head; PostgreSQL conformance (2/3) remains in progress and openclaw/ci-gate remains pending. (b181fed041ec)

Likely related people:

  • Peter Steinberger: Raw commit c6168a9 adds src/agents/worktrees/template-cache.test.ts:11 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: c6168a9597e8; files: src/agents/worktrees/template-cache.test.ts)
  • Vincent Koc: Raw commit b8fc2f6 adds extensions/qa-matrix/src/runners/contract/scenario-runtime-cli.test.ts:3 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: medium; commits: b8fc2f658794; files: extensions/qa-matrix/src/runners/contract/scenario-runtime-cli.test.ts)
  • Gustavo Madeira Santana: Raw commit d516671 adds extensions/qa-matrix/src/runners/contract/scenario-runtime-cli.test.ts:10 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: medium; commits: d5166718bc80; files: extensions/qa-matrix/src/runners/contract/scenario-runtime-cli.test.ts)

PR surface

Tests -3460, Other -9. Total -3469 across 53 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 52 5802 9262 -3460
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 1 0 9 -9
Total 53 5802 9271 -3469

Review metrics

Metric Value Why it matters
Production versus test LOC Production +0/-0; tests and test support +5,948/-9,514, net -3,566. Shared fixtures replace repeated scaffolding without production growth; no runtime-speed improvement is claimed.

Labels

Label changes:

  • add P3: Test maintenance with no user-facing runtime, configuration, API, or storage change.
  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Label justifications:

  • P3: Test maintenance with no user-facing runtime, configuration, API, or storage change.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

Reviewed October 19, 2026, 6:03 AM ET / 10:03 UTC.

@steipete
steipete merged commit acdc645 into main Oct 19, 2026
127 checks passed
@steipete
steipete deleted the tcr/land-d279-1792400153 branch October 19, 2026 10:11
steipete added a commit that referenced this pull request Oct 19, 2026
Model the documented standalone benchmark from #177195 as a production Knip entry. Remove the unused TTS test-support alias left by #177175; production Talk continues to use the canonical speech-text fallback directly.

Validated 58 focused tests, CLI help, targeted typecheck and lint, formatting, and P2 review. All three deadcode scans ran: unused files are clean; full-tree dependencies and exports retain only the unrelated BroadcastFrame type introduced by #177219.
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 20, 2026
…law#177175)

* test(discord): deslop x8360 tests

* test(discord): deslop x8360 tests

* test(qa-lab): deslop x8361 tests

* test(qa-lab): deslop x8361 tests

* test(qa-lab): deslop x8361 tests

* test(markdown-core): deslop x8364 tests

* test(markdown-core): deslop x8364 tests

* test(markdown-core): deslop x8364 tests

* test(daemon): deslop x8363 tests

* test(daemon): deslop x8363 tests

* test(daemon): deslop x8363 tests

* test(a2a): deslop x8365 tests

* test(a2a): deslop x8365 tests

* test(web-search): deslop x8370 tests

* test(logging): deslop x8369 tests

* test(logging): deslop x8369 tests

* test(process): deslop x8366 tests

* test(process): deslop x8366 tests

* test(process): deslop x8366 tests

* test(gateway): deslop x8368 tests

* test(gateway): deslop x8368 tests

* test(gateway): deslop x8368 tests

* test(channels): deslop x8374 tests

* test(worktrees): deslop x8367 tests

* test(worktrees): deslop x8367 tests

* test(worktrees): deslop x8367 tests

* test(zalouser): deslop x8372 tests

* test(zalouser): deslop x8372 tests

* test(zalouser): deslop x8372 tests

* test(tts): deslop x8371 tests

* test: repair batch d279 fixture contracts

* test: preserve cross-platform and corruption coverage

* test: fix parameterized cleanup and CLI output assertions

* test: preserve isolated mocks and callback contracts

* test: prune documented mock isolation baseline entries
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 20, 2026
Model the documented standalone benchmark from openclaw#177195 as a production Knip entry. Remove the unused TTS test-support alias left by openclaw#177175; production Talk continues to use the canonical speech-text fallback directly.

Validated 58 focused tests, CLI help, targeted typecheck and lint, formatting, and P2 review. All three deadcode scans ran: unused files are clean; full-tree dependencies and exports retain only the unrelated BroadcastFrame type introduced by openclaw#177219.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling channel: a2a channel: discord Channel integration: discord channel: zalouser Channel integration: zalouser extensions: qa-lab gateway Gateway runtime P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. 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