Skip to content

test(memory,gateway,infra,subagents): remove low-value tests (batch d152) - #174034

Merged
steipete merged 12 commits into
mainfrom
tcr/land-d152-1792138686
Oct 16, 2026
Merged

steipete merged 12 commits into
mainfrom
tcr/land-d152-1792138686

Conversation

@steipete

@steipete steipete commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Repeated setup and assertions make the memory, Gateway, infrastructure, and subagent tests harder to maintain. This batch consolidates those fixtures and table-driven checks while retaining their behavior contracts.

User Impact

No production behavior, public API, configuration, or migration changes. The changes cover 21 test/test-support files and one shrink-only mock-export baseline. The handoff listener fixture now supplies the port-returning handler its existing assertions expect; that mismatch was already present on the base.

Why This Change Was Made

Replayed all ten campaign commits in order, then rebased after GitHub reported conflicts onto main at 3aa642027ea1466c4694ad6950653c4de3740644. A final fixture correction preserves the current memory import binding and fixes the existing listener fixture mismatch without weakening assertions.

Conflict decisions:

  • Both memory commits: dropped edits to manager-embedding-ops.retry.test.ts, manager-embedding-policy.test.ts, and manager-keyword-retrieval.test.ts. Main has newer retry/parser and retrieval regressions; those three files remain byte-identical to the base.
  • Memory lifecycle: retained main's requireManager/trackManager bindings and probe-cache regression alongside the consolidated helpers; updated its calls to the new namespace import.
  • Second infra commit: retained the preceding replay version of git-read-cache.test.ts and heartbeat-runner.returns-default-unset.test.ts instead of applying overlapping cleanup across main's newer cancellation and Telegram cases.
  • Third infra commit: likewise dropped its git-read-cache.test.ts edits. Other hunks and both subagent commits applied. No whole commits were skipped.
  • Fresh-main rebase: kept the new requireNativeSqliteDatabase guard in the heartbeat outcome fixture. Kept the new requester-session setup and operator-recovery authority assertions in the parent-recovery restart test; dropped the second subagent commit's edits to that file rather than consolidate across those new contracts. Other newer main changes were retained by the three-way replay.
  • CI repair: dropped all edits to skill-library-read.test.ts and git-worker.lifecycle.test.ts, restoring their exact pinned-main versions. Their consolidation introduced timeout-helper ratchet violations; the skill-library client also rejected plaintext edge-auth headers. Narrowed the heartbeat helper's target type and preserved the concrete config shape in the completion-authority helper, resolving the remaining reported type errors. Removed the one obsolete hooks-request-handler.js mock-export baseline row identified by CI.

Evidence

CI-only validation: changed-file oxfmt --write and plain oxlint -c .oxlintrc.json passed (exit 0); git diff --check passed. Dependency installation with pnpm install --frozen-lockfile --prefer-offline passed. No local Vitest, typecheck, check-changed, coverage, or Testbox command was run. openclaw/ci-gate supplies execution proof.

First execution run exposed the timeout, stale-baseline, transport-fixture, and type issues above; this head repairs them for a fresh CI run. The legacy-listener suite passed all 12 cases. No failed check is waived or classified as inherited.

Independent preservation review completed two passes. Its sole P1 finding was rejected after source verification: it attributed the enqueueSystemEventWithReceipt path in createHookWakeDispatcher to this test, but the test invokes dispatchAgentHook, whose terminal path calls the mocked enqueueSystemEvent directly (src/gateway/server/hooks.ts). CI passed the exact next-heartbeat case the finding predicted would hang. No other actionable P0-P2 finding was reported. The later changes only restore two files, narrow two fixture types, and shrink the exact CI-reported baseline row.

Final diff: 3,359 additions / 5,110 deletions, net -1,751 lines. Production: 0 / 0. Test files: 3,183 / 4,753. Test-support files: 176 / 356. Baseline: 0 / 1. Scoped declaration counts below are lexical it/test call-site counts, including table declarations, not expanded case counts. Original shard reports describe preserved expanded cases but cover earlier revisions; they are not fresh coverage evidence for this replay.

Shard Changed-file test/support LOC Declarations Original report coverage statement
x7031 memory 2,003 → 1,658 (-345) 22 → 21 Tests, coverage, and check-changed were not run, per CI-only mode.
x7033 Gateway 3,345 → 2,816 (-529) 69 → 61 Tests, coverage, and typechecking were not run, per CI-only instructions.
x7028 infra 2,964 → 2,463 (-501) 64 → 63 Tests, coverage, and check-changed were not run, per CI-only mode.
x7036 subagents 4,072 → 3,697 (-375) 40 → 39 Tests, coverage, and builds were not run under CI-only mode; hosted CI remains pending.

No coverage totals are available in those reports; no coverage-threshold claim is made. No changed path matches the current CODEOWNERS entries.

Files by shard

x7031, under extensions/memory-core/src/memory/: manager-index.test-support.ts, manager-memory-source-race.test.ts, manager-provider-lifecycle-fallback.test.ts, manager-provider-lifecycle.test.ts.

x7033, under src/gateway/server/: hooks-request-handler.fanout.test.ts, hooks.terminal-target.test.ts, plugin-legacy-listeners.test.ts, plugins-http.ownership.test.ts, plugins-http.test.ts, readiness.test.ts. Its stale mock row is removed from config/test-mock-exports-baseline.txt.

x7028, under src/infra/: git-read-cache.test.ts, git-root.test.ts, github-issue.test.ts, heartbeat-agent-resolution.test.ts, heartbeat-outcome-store.test.ts, heartbeat-runner.returns-default-unset.test.ts.

x7036, under src/agents/subagents/registry/: subagent-orphan-recovery.raw-owner.test-support.ts, subagent-orphan-recovery.restart-integration.test.ts, subagent-parent-recovery.restart-integration.test.ts, subagent-registry.completion-authority.test.ts, subagent-registry.store.sqlite.test.ts.

@clawsweeper

clawsweeper Bot commented Oct 16, 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 16, 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-16T09:53:52.753382Z 749588a 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 16, 2026 08:42
@openclaw-barnacle openclaw-barnacle Bot added gateway Gateway runtime extensions: memory-core Extension: memory-core agents Agent runtime and tooling size: XL labels Oct 16, 2026
@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 16, 2026
@clawsweeper

clawsweeper Bot commented Oct 16, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs changes before merge.

What this changes

This PR consolidates repeated fixtures and assertions across memory, Gateway, infrastructure, and subagent tests.

Example: A plugin WebSocket upgrade arrives without Gateway authentication.

  • Before: A standalone test asserts HTTP 401, socket closure, and no handler invocation.
  • After: A table-driven case retains those assertions alongside the HTTP 503 suspension case.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) Useful consolidation with no discrete source finding; current-head test execution is not yet demonstrated.
Proof confidence 🌊 off-meta tidepool Not applicable: This maintainer-authored test-only change is outside the live-behavior proof gate and changes no production authority or persisted format.
Patch quality 🦐 gold shrimp (3/6) No actionable review findings were identified.

Product

Kind: Test only · Worth it: Yes · Fix scope: Complete
User problem: Repeated fixtures and assertions increase contributor maintenance work.
Reason: The maintainer-authored direction is approved, and the patch reduces duplication without adding production machinery.

Merge readiness

⛔ Needs changes before merge - 1 item remains

Keep this maintainer-authored PR open: the test consolidation has clear maintenance value, and source review found no concrete introduced defect.

Priority: P3
Reviewed head: 1fdc631d66fa3046048b62d7b7b8ba89634715a0

Before merge

  • Complete next step - Resolve the reported merge conflict while preserving main's newer requester-authority and selected-engine fixture changes.

Findings

None.

Agent review details

How this fits together

The changed test suites pass synthetic requests, lifecycle events, and isolated storage through production owners, then check responses, persisted results, and rejected effects.

flowchart TD
  A[Test scenarios] --> B[Shared fixtures]
  B --> C[Memory managers]
  B --> D[Gateway handlers]
  B --> E[Git and heartbeat owners]
  B --> F[Subagent registry]
  C --> G[Contract assertions]
  D --> G
  E --> G
  F --> G
Loading

Technical review

Best possible solution:

Land the smaller shared fixtures while preserving current-main recovery behavior and the distinct assertions retained by this consolidation.

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

This PR addresses repeated test setup rather than a reported runtime defect; the duplication and consolidation are directly visible in the pinned diff.

Is this the best way to solve the issue?

Shared fixtures and separately exercised table rows fit the repository's test-audit policy, and inspection found no concrete loss of a distinct contract.

AGENTS.md: found and applied where relevant.

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

Provenance checked

  • Memory manager fixture and provider lifecycle keeps the original intent (refactor(memory-core): consolidate manager test fixtures #122671: The shared fixture centralized embedding mocks, lifecycle cleanup, config creation, and transcript seeding while preserving distinct provider scheduling cases.)
  • Hook reload rejection keeps the original intent (fix(gateway): revoke in-flight hook admission on reload #147785: Requests admitted before a credential or routing-policy reload must be rejected before subsequent dispatch.)
  • Legacy listener handoff keeps the original intent (feat(gateway): preserve callback ports on plugin routes #158360: Gateway-owned compatibility listeners preserve callback ports, raw wire behavior, account handoff, and dispatch isolation.)
  • Git worker lifecycle keeps the original intent (f0fafba: Worker-owned Git reads keep foreground requests responsive while retaining cancellation, subprocess ownership, and cleanup guarantees.)
  • GitHub issue transport keeps the original intent (fix: make Doctor issue reporting private and recoverable #137527: Sanitized reporting must preserve private payload handling, canonical URL validation, and exact reconciliation of uncertain submissions.)
  • Absent incognito child recovery keeps the original intent (2dd328a: Recovery of an absent in-memory child must settle without creating storage or issuing main-thread SQL; those checks move into the existing missing-storage case.)
  • Subagent terminal reply persistence keeps the original intent (2d86aa9: Restart tests preserve visible and silent terminal replies in canonical completion and pending delivery state.)

Testing

Proof path: none.

Security

None.

Evidence

What I checked:

Likely related people:

  • joshavant: Raw commit 2d86aa9 adds src/agents/subagent-registry.store.sqlite.test.ts:143 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: medium; commits: 2d86aa9df16d; files: src/agents/subagent-registry.store.sqlite.test.ts)

PR surface

Tests -2102. Total -2102 across 23 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 23 4563 6665 -2102
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 23 4563 6665 -2102

Review metrics

Metric Value Why it matters
Production versus test LOC Production +0/-0; tests and test support +4,563/-6,665; net -2,102. The reduction comes from shared setup, assertions, and table-driven cases without production growth.

Labels

Label changes:

  • add P3: This is test maintenance with no shipped behavior change or urgent product defect.
  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🌊 off-meta tidepool and patch quality is 🦐 gold shrimp.
  • add status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action.

Label justifications:

  • P3: This is test maintenance with no shipped behavior change or urgent product defect.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🌊 off-meta tidepool and patch quality is 🦐 gold shrimp.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action.

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Obtain changed-suite execution and targeted test typecheck results for the integrated revision.

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 16, 2026, 4:59 AM ET / 08:59 UTC.

@steipete
steipete force-pushed the tcr/land-d152-1792138686 branch from 1fdc631 to 4bea4f4 Compare October 16, 2026 09:00
@steipete
steipete disabled auto-merge October 16, 2026 09:10
@steipete
steipete enabled auto-merge (squash) October 16, 2026 09:49
@steipete
steipete merged commit ffe098e into main Oct 16, 2026
115 checks passed
@steipete
steipete deleted the tcr/land-d152-1792138686 branch October 16, 2026 09:59
vincentkoc added a commit that referenced this pull request Oct 16, 2026
* commit 'ac03ca0b6d26a7dc55d0d262e40d2549631b1ea7': (25 commits)
  fix: apply shared plugin model policy to decisions (#156621)
  perf: shortlist transcript relevance scores before metadata reads (#174058)
  fix: strip standalone trailing NO_REPLY from replies (#171990)
  fix(ci): avoid repeated discovery during changed-test planning (#174069)
  fix(sqlite): preserve transaction outcomes when warnings throw (#157151)
  fix(ai): native video handoff to chat-completions providers + preflight video cost (#170920)
  fix(litellm): image generation fails when the backend returns image URLs (#173508)
  test(memory,gateway,infra,subagents): remove low-value tests (batch d152) (#174034)
  perf(memory): bound derived worker snapshot and pricing retention (#174067)
  fix(test): reduce eager imports during test startup (#174056)
  refactor(codex): share lifecycle preflight fixtures (#174062)
  test(gateway,matrix,agents,ui): remove low-value tests (batch d150) (#174025)
  perf(infra): batch usage refresh maintenance (#174050)
  fix(gateway): revert cold session list worker regression (#174052)
  refactor(config): consolidate browser meeting configuration (#173947)
  fix(cron): keep global-session deliveries on the selected agent (#173855)
  test(compaction): assert structured stale-writer failure (#174064)
  fix(cli): local terminal chat sends model requests without the configured proxy (#173530)
  test(ui): restore bootstrap preference locale after each case (#174065)
  fix: download session files through the development proxy (#173973)
  ...
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 17, 2026
…152) (openclaw#174034)

* test(memory): deslop x7031 tests

* test(memory): deslop x7031 tests

* test(gateway): deslop x7033 tests

* test(gateway): deslop x7033 tests

* test(gateway): deslop x7033 tests

* test(infra): deslop x7028 tests

* test(infra): further deslop x7028 tests

* test(infra): further deslop x7028 tests

* test(subagents): deslop x7036 tests

* test(subagents): deslop x7036 tests

* test: preserve current memory and listener fixture contracts

* test: repair batch fixture types and retain working transport paths
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling extensions: memory-core Extension: memory-core 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: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant