Skip to content

test: remove low-value tests (batch d249) - #175975

Merged
steipete merged 31 commits into
mainfrom
tcr/land-d249-1792286374
Oct 18, 2026
Merged

steipete merged 31 commits into
mainfrom
tcr/land-d249-1792286374

Conversation

@steipete

@steipete steipete commented Oct 18, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Batch d249 consolidates repeated setup and redundant declarations in cron, subagent, auto-reply, session, gateway, outbound, and daemon tests. This is test/support-only cleanup: no production behavior, public contracts, timeouts, or assertions are weakened.

User Impact

No user-visible behavior changes. This is internal test maintenance; production code, public contracts, and runtime configuration are unchanged.

Why This Change Was Made

Rebased all 31 submitted commits onto pinned main 1446ecc39398c6e4f53cda9a260342cb914e8cb8. Main's newer tests and deletions win. The 26 files already dropped in the initial repair remain unchanged from main. Seven additional file-level cleanups were dropped:

  • src/agents/subagents/registry/subagent-registry-requester-wake-commit.test.ts (main deleted it).
  • src/agents/subagents/registry/subagent-registry-requester-yield.test.ts.
  • src/agents/subagents/registry/subagent-registry-restart-recovery.test.ts.
  • src/agents/subagents/registry/subagent-registry-requester-wake-pointer.worker.test.ts.
  • src/config/sessions/session-accessor.sqlite-deletion.test.ts.
  • src/config/sessions/session-accessor.sqlite-participants.test.ts.
  • src/gateway/server-methods/skills.publisher-identity.test.ts.

Conflicts in the already-dropped maintenance-kick and lifecycle-projection suites were also resolved to current main. No manual behavior merge was attempted.

Failed-head diagnosis and repair

Run 39087253070 failed on the submitted head:

Check Exact failure Classification and repair
checks-fast-baseline-ratchets mock-exports: shrink three stale publisher-identity mock entries (agent-scope, config, skills lifecycle install) Batch-caused; dropped that file's cleanup, preserving main's mocks and baseline.
check-test-types-core-4 agents-sessions graph: session-accessor.sqlite-participants.test.ts:128, TS2345, optional agentId passed to a required-agentId API Batch-caused; dropped that file's cleanup.
openclaw/ci-gate checks-baseline-ratchets and check-test-types-hosted-core-shard failed Aggregate of the above.

No inherited-failure exception is claimed for these failures. Main push CI is not proof.

Evidence

Exact-head CI run 39160763488 passed every selected job, including all three PostgreSQL conformance shards and openclaw/ci-gate. Merged as 53395d9.

  • Production LOC: +0 / -0.
  • Retained test/support LOC: +5,803 / -8,312, net -2,509 across 43 files.
  • Plain oxlint with repository configuration: exit 0 (used the existing installed tool and an ignored task-local link to its configured Solid plugin; no dependency reinstall).
  • oxfmt --check: passed on all 43 files.
  • git diff --check against pinned main: passed.
  • CI-only coordinator rule: no local tests, typechecks, coverage, Testbox, AWS, or leases. Fresh exact-head PR CI is the runtime/type proof.
  • Shards retained: x8002, x8004, x8005, x8006, x8009, x8010, x8012, x8015. Shards x7993, x8008, and x8013 have no remaining diff. No measured coverage totals were supplied under CI-only mode; no unchanged-coverage claim is made.
  • Isolated review completed in two passes. Both reported findings were rejected after source verification: timer.test.ts's two parameter rows both have wake="now" and neither is main-with-notify, so the simplified expectations are equivalent; TranscriptEvent is explicitly unknown (session-accessor.types.ts), so the userEvent helper's widened literals do not violate that contract. No accepted/actionable finding remains. Auto-merge is pinned to db21377; fresh CI run 39160763488 is the runtime/type gate.

Release-note context: internal test maintenance only; no user-facing behavior change.

@clawsweeper

clawsweeper Bot commented Oct 18, 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.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 18, 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-18T19:57:05.547666Z db21377 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.

@steipete
steipete enabled auto-merge (squash) October 18, 2026 01:26
@openclaw-barnacle openclaw-barnacle Bot added gateway Gateway runtime agents Agent runtime and tooling size: XL labels Oct 18, 2026
@steipete
steipete disabled auto-merge October 18, 2026 01:35
@steipete
steipete enabled auto-merge (squash) October 18, 2026 01:39
@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: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Oct 18, 2026
@clawsweeper

clawsweeper Bot commented Oct 18, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This PR consolidates repeated fixtures and assertions across runtime test suites without changing production code.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) Useful test consolidation with no actionable finding and passing changed-test validation; evidence is confined to source review and test harnesses.
Proof confidence 🦐 gold shrimp (3/6) This maintainer-authored test-only cleanup changes no shipped behavior; exact-head changed-test CI supplies supporting harness validation.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Test only · Worth it: Yes · Fix scope: Complete
User problem: Repeated fixture setup and redundant declarations make regression suites harder to maintain.
Reason: The maintainer-directed cleanup reduces test code while retaining the inspected behavioral contracts and leaving production unchanged.

Merge readiness

✅ Ready for maintainer review

Keep open: this maintainer-directed test cleanup preserves the inspected regression boundaries, and no actionable code defect remains from the previous review.

Priority: P3
Reviewed head: db213779edc582b1a9097e30cec438ae56903a6b

Before merge

None.

Findings

None.

Agent review details

How this fits together

Vitest suites supply synthetic sessions, jobs, messages, and Windows service fixtures to existing runtime owners and assert their observable results.

flowchart LR
  A[Synthetic inputs] --> B[Shared test fixtures]
  B --> C[Runtime owners]
  C --> D[Storage and transport boundaries]
  D --> E[Regression assertions]
Loading

Technical review

Best possible solution:

Land the test consolidation once the existing merge gates clear.

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

This is test maintenance rather than a reported runtime bug; assessment used the introduced hunks, original fixtures, retained assertions, and exact-head CI without executing target code.

Is this the best way to solve the issue?

Consolidating repeated setup within existing suites is appropriate, and the inspected changes preserve distinct cancellation, authority, persistence, routing, and platform cases.

AGENTS.md: found and applied where relevant.

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

Provenance checked

  • Session actor fixtures keeps the original intent (d5173cc: Protect transaction hydration, native settlement, lifecycle ownership, and scoped receipts.)
  • Cron receipt and batch finalization keeps the original intent (d3308e2: Protect durable run ownership and atomic receipt/job settlement; later worker refactors retain these contracts.)
  • Windows Startup discovery fixtures keeps the original intent (733ceac: Identify exact Startup definitions while preserving task identity, control boundaries, and native cleanup.)
  • Subagent prepared reads keeps the original intent (7d409f7: Reduce registry projection work while retaining snapshot isolation, descendant topology, and current ownership.)
  • Canonical session reader fixtures keeps the original intent (bc28af4: Move canonical validation off admission hot paths while preserving freshness and malformed-row rejection.)
  • Media staging fixtures keeps the original intent (f199384: Protect positional media facts and resolved URL aliases across workspace staging.)
  • Title inference fixtures keeps the original intent (3d9aaf8: Prepare session names through utility inference; later account and operator-policy changes add authorization boundaries.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

  • Verified introduced scope: The pinned merge-base-to-head diff changes only tests and test support; production LOC is +0/-0. (db213779edc5)
  • Previous blockers resolved: The participant and publisher-identity files responsible for the prior typecheck and baseline failures now have no introduced diff; exact-head core-4 typechecking and baseline ratchets pass. (db213779edc5)
  • Removed receipt case retains coverage: The non-firing trigger receipt assertion moves into the existing quiet-outcome cases, retaining both no-agent-dispatch and persisted skipped-status checks. (src/cron/service/timer.test.ts:478, db213779edc5)
  • Exact-head validation: Changed-test shards, core test typechecks, lint, build artifacts, and baseline ratchets pass in https://github.com/openclaw/openclaw/actions/runs/39160763488; PostgreSQL conformance remains in progress and the aggregate CI gate is pending. (db213779edc5)
  • Body-format check classified: The failing context check requests an authored What Problem This Solves heading; its annotation identifies body formatting rather than a source, test, or behavioral failure. (db213779edc5)
  • Existing fixture owners reused: Status suites share their previous rendering defaults, and SSH attachment tests reuse the existing attachment-preparation fixture rather than introducing a production seam. (src/auto-reply/status.test-fixtures.ts:30, db213779edc5)

Likely related people:

  • Peter Steinberger: Raw commit d5173cc adds src/config/sessions/session-actor-worker.test.ts:182 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: d5173ccc77b9; files: src/config/sessions/session-actor-worker.test.ts)
  • scoootscooob: Raw commit e4e2305 adds src/gateway/server-methods/sessions-title.test.ts:5 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: medium; commits: e4e230510c15; files: src/gateway/server-methods/sessions-title.test.ts)

PR surface

Tests -2509. Total -2509 across 43 files. Added test files: 1.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 43 5708 8217 -2509
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 43 5708 8217 -2509

Review metrics

Metric Value Why it matters
Production versus test LOC Production +0/-0; tests and support +5,708/-8,217, net -2,509 Fixture extraction and equivalent table-driven cases reduce maintenance code without introducing runtime machinery.

Labels

Label changes:

  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.
  • remove status: ⏳ waiting on author: Current PR status label is status: 👀 ready for maintainer look.

Label justifications:

  • P3: Internal test maintenance with no intended user-facing behavior 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.

History

Review history (1 earlier review cycle)
  • reviewed 2026-10-18T01:56:11.920Z sha d25e4bf :: needs changes before merge. :: none

Reviewed October 18, 2026, 4:03 PM ET / 20:03 UTC (Revision 2).

@steipete
steipete force-pushed the tcr/land-d249-1792286374 branch from d25e4bf to db21377 Compare October 18, 2026 19:52
@steipete

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Oct 18, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@steipete
steipete disabled auto-merge October 18, 2026 19:56
@steipete
steipete enabled auto-merge (squash) October 18, 2026 19:56
@clawsweeper clawsweeper Bot added status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Oct 18, 2026
@steipete
steipete merged commit 53395d9 into main Oct 18, 2026
127 of 129 checks passed
@steipete
steipete deleted the tcr/land-d249-1792286374 branch October 18, 2026 20:15
steipete added a commit that referenced this pull request Oct 18, 2026
Register the Docker MCP custody scenario/server and macOS source-build
verifier as exact Knip entries. Their shell invokers remain live, so retain
these proof and packaging boundaries without introducing ignores.

Remove the unused cron state fixture after #175975 moved its consumers to
the shared regression fixture. Scheduling assertions remain unchanged.

Refs: #175107, #176448, #175975.
Validation: 79 focused tests, owning cron tsgo, typed lint, formatting,
and P2 review pass. Dependency scan clears the requested script findings;
unrelated controller and daemon export findings remain.
obviyus added a commit that referenced this pull request Oct 18, 2026
## What Problem This Solves

Fixes: Knip `deadcode:exports` on main reports four exports that recent refactors left without a consumer. #176447 does not cover them.

## User Impact

No user-visible change.

## Why This Change Was Made

- `src/cron/service.test-harness.ts: createCronServiceStateWithJobs`: #175975 removed its last callers, so it is deleted.
- `extensions/copilot/src/attempt.test-support.ts: createStubToolBridge`: #176003 added an exported copy that nothing imports, so it is deleted. The file is back to its state before #176003.
- `src/daemon/inspect-markers.ts: classifyGatewayCommand`: #176469 removed the only outside import, so it is now module-private.
- `src/gateway/server-cron.events.test-support.ts: CRON_WAIT_TIMEOUT_MS`: #176399 removed the last outside caller, so it is now module-private.

No ignores were added.

## Evidence

- `pnpm run deadcode:exports` on this branch, diffed against main `48439195832`: only these four entries disappear.
- `extensions/copilot/src/attempt.test.ts` and `src/daemon/inspect.test.ts` pass in full. `oxfmt` and `oxlint` are clean.

Co-authored-by: Ayaan Zaidi <[email protected]>
obviyus added a commit that referenced this pull request Oct 18, 2026
## What Problem This Solves

Fixes: `check-dependencies` fails on main after #175837. The reply-admission refactor left 2 files with no importer (`reply-admission-ticket.ts`, `reply-turn-admission-owner.ts`) and about 60 exports with no production consumer: facade re-exports, helpers that only tests call, and new helpers that nothing calls.

## User Impact

No user-visible change. The deadcode scans pass for these findings.

## Why This Change Was Made

- Deletes the orphaned files and the dead re-exports and helpers.
- Tests that imported through the removed re-exports now import from the module that defines each function.
- Eight helpers that only tests use are marked `/** @internal */`, the existing pattern for test hooks. No Knip ignores are added.

## Evidence

- Before: hourly CI run 39154686674, `check-dependencies`. All of these findings first appear after #175837.
- After: `deadcode:unused-files`, `deadcode:exports` and `deadcode:dependencies` report 0 entries for these findings. One newer unrelated entry from #175975 (`createCronServiceStateWithJobs`) remains.
- Affected unit tests: 40 files, 829/830 pass. The one failure, `dispatch-from-config.reply-dispatch.test.ts > retains a frozen finalizing dispatch until its actual producer settles`, also fails on main without this change. `oxfmt`, `oxlint` and the line-cap check pass.

Co-authored-by: Ayaan Zaidi <[email protected]>
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 19, 2026
* test(cron): deslop x8002 tests

* test(cron): deslop x8002 tests

* test(cron): deslop x8002 tests

* test(sessions): deslop x7993 tests

* test(sessions): restore metadata user fixture access

* test(sessions): preserve worker authority callback contract

* test(sessions): deslop x7993 tests

* test(auto-reply): deslop x8005 tests

* test(auto-reply): deslop x8005 tests

* test(subagents): deslop x8004 tests

* test(subagents): deslop x8004 tests

* test(subagents): deslop x8004 tests

* test(sessions): deslop x8008 tests

* test(sessions): deslop x8008 tests

* test(sessions): deslop x8008 tests

* test(sessions): deslop x8009 tests

* test(sessions): deslop x8009 tests

* test(sessions): deslop x8009 tests

* test(gateway): deslop x8006 tests

* test(gateway): deslop x8006 tests

* test(gateway): deslop x8006 tests

* test(outbound): deslop x8010 tests

* test(outbound): deslop x8010 tests

* test(daemon): deslop x8012 tests

* test(daemon): deslop x8012 tests

* test(daemon): deslop x8012 tests

* test(sessions): deslop x8013 tests

* test(sessions): deslop x8013 tests

* test(sessions): deslop x8013 tests

* test(gateway): deslop x8015 tests

* test: drop failing cleanup hunks and preserve fixture contracts
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 19, 2026
Register the Docker MCP custody scenario/server and macOS source-build
verifier as exact Knip entries. Their shell invokers remain live, so retain
these proof and packaging boundaries without introducing ignores.

Remove the unused cron state fixture after openclaw#175975 moved its consumers to
the shared regression fixture. Scheduling assertions remain unchanged.

Refs: openclaw#175107, openclaw#176448, openclaw#175975.
Validation: 79 focused tests, owning cron tsgo, typed lint, formatting,
and P2 review pass. Dependency scan clears the requested script findings;
unrelated controller and daemon export findings remain.
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 19, 2026
…6562)

## What Problem This Solves

Fixes: Knip `deadcode:exports` on main reports four exports that recent refactors left without a consumer. openclaw#176447 does not cover them.

## User Impact

No user-visible change.

## Why This Change Was Made

- `src/cron/service.test-harness.ts: createCronServiceStateWithJobs`: openclaw#175975 removed its last callers, so it is deleted.
- `extensions/copilot/src/attempt.test-support.ts: createStubToolBridge`: openclaw#176003 added an exported copy that nothing imports, so it is deleted. The file is back to its state before openclaw#176003.
- `src/daemon/inspect-markers.ts: classifyGatewayCommand`: openclaw#176469 removed the only outside import, so it is now module-private.
- `src/gateway/server-cron.events.test-support.ts: CRON_WAIT_TIMEOUT_MS`: openclaw#176399 removed the last outside caller, so it is now module-private.

No ignores were added.

## Evidence

- `pnpm run deadcode:exports` on this branch, diffed against main `7451c5780e5`: only these four entries disappear.
- `extensions/copilot/src/attempt.test.ts` and `src/daemon/inspect.test.ts` pass in full. `oxfmt` and `oxlint` are clean.

Co-authored-by: Ayaan Zaidi <[email protected]>
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 19, 2026
…w#176447)

## What Problem This Solves

Fixes: `check-dependencies` fails on main after openclaw#175837. The reply-admission refactor left 2 files with no importer (`reply-admission-ticket.ts`, `reply-turn-admission-owner.ts`) and about 60 exports with no production consumer: facade re-exports, helpers that only tests call, and new helpers that nothing calls.

## User Impact

No user-visible change. The deadcode scans pass for these findings.

## Why This Change Was Made

- Deletes the orphaned files and the dead re-exports and helpers.
- Tests that imported through the removed re-exports now import from the module that defines each function.
- Eight helpers that only tests use are marked `/** @internal */`, the existing pattern for test hooks. No Knip ignores are added.

## Evidence

- Before: hourly CI run 39154686674, `check-dependencies`. All of these findings first appear after openclaw#175837.
- After: `deadcode:unused-files`, `deadcode:exports` and `deadcode:dependencies` report 0 entries for these findings. One newer unrelated entry from openclaw#175975 (`createCronServiceStateWithJobs`) remains.
- Affected unit tests: 40 files, 829/830 pass. The one failure, `dispatch-from-config.reply-dispatch.test.ts > retains a frozen finalizing dispatch until its actual producer settles`, also fails on main without this change. `oxfmt`, `oxlint` and the line-cap check pass.

Co-authored-by: Ayaan Zaidi <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling 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