Skip to content

test(agents,browser,config): remove low-value tests (batch d277) - #177135

Merged
steipete merged 31 commits into
mainfrom
tcr/land-d277-1792397995
Oct 19, 2026
Merged

steipete merged 31 commits into
mainfrom
tcr/land-d277-1792397995

Conversation

@steipete

@steipete steipete commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Repeated fixtures and assertion scaffolding make these tests harder to maintain. This batch consolidates that scaffolding across agent tools, browser UI, memory UI, configuration, Gateway, sessions, projects, test utilities, Ollama, and Tlon.

User Impact

No production behavior, runtime configuration, dependencies, or public API changes. The retained changes affect only tests, test support, and three obsolete test-baseline rows. No production LOC changed; test/support LOC is +5,661 / -8,040, net -2,379 across 41 files, plus three deleted baseline rows, against base cf0ad5cad99bdb339d0cb2239fec9b256c79d82f.

Why This Change Was Made

Replay campaign batch d277 onto current main, retaining current-main behavior and new regression cases wherever the older cleanup overlaps them. Fixtures and table-compatible assertions are consolidated; this is not a runtime optimization claim.

29 of 30 supplied commits were retained (some partially). Skipped cdd30d07b6921a96b20e37af178a0f6d032b542a: current main substantially rewrote compaction fixtures and expanded cases. Kept main's entire file rather than reconstructing the old cleanup.

Conflict resolution also kept main unchanged for ui/src/pages/agents/memory/view.test.ts, src/config/group-policy.test.ts, src/config/group-scope-tree.test.ts, ui/src/pages/agents/model-config.test.ts, ui/src/pages/agents/panels-tools-skills.browser.test.ts, and extensions/ollama/src/tool-name-aliases.test.ts. The follow-up 7001025fd36 changes to extensions/ollama/src/stream.test.ts were dropped, and the initial stream consolidation was subsequently restored after CI. These exclusions preserve main's new UI state, group policy, model fallback, tool alias, and stream regression coverage. Other clean hunks were retained, subject to the additional review/CI restorations below. Baseline changes are limited to the three shrink-only rows listed by CI. No changed path matches CODEOWNERS.

Evidence

pnpm install --frozen-lockfile --prefer-offline passed. Direct node_modules/.bin/oxfmt --write <41 changed files> passed. Direct node_modules/.bin/oxlint -c .oxlintrc.json <41 changed files> exited 0. git diff --check cf0ad5cad99bdb339d0cb2239fec9b256c79d82f passed.

The first CI run found missing helper references, type-aware lint/type errors, a test-support filename misclassified by the i18n scanner, and two behavior-sensitive fixture regressions. Corrected the simple helper/type/mock issues and renamed the browser helper to browser-panel-stream.test-support.ts. Restored main's complete Ollama stream, SQLite owner, Gateway state-owner, and Tlon outbound loopback/media-authority files rather than rebuilding their fixtures. The next run cleared those failures and requested removal of the exact three obsolete mock-export baseline rows corresponding to the newly documented isolation boundaries; removed only those rows. Failed runs are not claimed as green or pre-existing; the repaired head requires fresh hosted CI.

Independent review identified lost cap-maintenance cases, lost replacement-publication boundary assertions, and a temp-home acquisition case that could hit the wrong failure. Restored those three complete files to main. Declined one proposed extra settlement cleanup: the project-registry cancellation callback already resolves its retained deferred before throwing in every table case. Independent review of the corrections found no actionable P0–P2 issues. The two additional Tlon file restorations only remove changes from the candidate.

Under the operator's CI-only compute budget, no local Vitest, check-changed, typecheck, coverage, or Testbox ran. Hosted openclaw/ci-gate is the execution/merge gate; independent review runs in parallel after publication. Local test wall time and coverage totals are unavailable, not claimed as passing. Every source shard report explicitly says tests and coverage were not run in CI-only mode; there is no in-shard coverage totals line to report. The original reports describe preserved expanded cases; the figures below are the actual replay's lexical test-declaration counts, not executed case counts.

Shard Retained files (common directory prefixes omitted) Test/support LOC delta Declarations before → after Source coverage totals
x8333 none; compaction cleanup skipped 0 unchanged not run (CI-only)
x8330 src/agents/: openclaw-tools media-workspace, sessions-resume support, sessions-steering, sessions-spawn lifecycle and plan, tts-config, web-search; package-metadata -281 38 → 33 not run (CI-only)
x8336 ui/src/components/browser/: browser-panel paste, route, stream-startup, stream, new stream.test-support -227 49 → 47 not run (CI-only)
x8338 src/config/: env-substitution, includes -234 26 → 20 not run (CI-only)
x8339 ui/src/pages/agents/memory/dreaming.test.ts -162 26 → 25 not run (CI-only)
x8340 src/config/sessions/session-accessor.sqlite-: maintenance-admission, provenance, reclamation-admission-race, reclamation-preparation, worker-coordination -196 14 → 14 not run (CI-only)
x8341 src/gateway/: device-pair-setup.trusted-proxy, health, private-completion.metadata-overlap support, sessions.agent-inventory, sessions.create.clone-identity, sessions.face, sessions.store-paths.projection -254 11 → 11 not run (CI-only)
x8342 ui/src/pages/agents/: panels-overview, view.identity-avatar -154 13 → 12 not run (CI-only)
x8343 src/projects/: project-environment, project-registry.authority, project-registry, project-source-env -228 25 → 22 not run (CI-only)
x8344 extensions/tlon/src/: core, security, tlon-api -272 48 → 35 not run (CI-only)
x8345 src/test-utils/: npm-spec-install-test-helpers, openclaw-test-state, ports -292 25 → 21 not run (CI-only)
x8346 extensions/ollama/src/thinking-discovery.test.ts -79 8 → 7 not run (CI-only)

Consolidate cap cases around the live-protection race; retain inline and protected-only coverage in the maintenance cadence/read/kick suites. Keep postimage publication coverage in the entry-writes suite and preserve the distinct participant-detachment regression here. Static formatting, diff and plain oxlint gates only; runtime proof remains with hosted CI.
@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 08:23
@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-19T08:50:26.841301Z c4db40a 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: tlon Channel integration: tlon app: web-ui App: web-ui gateway Gateway runtime agents Agent runtime and tooling extensions: ollama size: XL labels Oct 19, 2026
@steipete
steipete disabled auto-merge October 19, 2026 08:31

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 911029b9da

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +98 to 102
const fullLookup = vi.spyOn(sessionAccessor, "listSessionEntriesCore");
const transcripts = [
vi.spyOn(sessionAccessor, "readSessionTranscriptWatermark"),
vi.spyOn(sessionAccessor, "readSessionTranscriptMessageEventPage"),
vi.spyOn(sessionAccessor, "loadTranscriptEvents"),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Preserve the warmed inventory's no-SQL assertion

If a warmed inventory request starts issuing SQLite through a new accessor or directly through StatementSync, this test will now remain green: the previous version observed every all/get/iterate/run operation and listSessionEntriesReadOnly, while the replacement watches only listSessionEntriesCore and three transcript helpers. Restore a generic SQL observer around the real tool-to-Gateway request so this large-inventory test continues protecting the clean resident-snapshot contract.

AGENTS.md reference: src/gateway/AGENTS.md:L43-L43

Useful? React with 👍 / 👎.

@steipete
steipete enabled auto-merge (squash) October 19, 2026 08:39
@steipete
steipete disabled auto-merge October 19, 2026 08:49
@steipete
steipete enabled auto-merge (squash) October 19, 2026 08:50
@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 19, 2026
@clawsweeper

clawsweeper Bot commented Oct 19, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs changes before merge.

What this changes

This PR consolidates repeated test fixtures and assertions across agent tools, configuration, Gateway, browser UI, projects, and plugins.

Example: Resolve ${MISSING:-60} and ${EMPTY:-} with EMPTY set to an empty string.

  • Before: Tests verify fallback resolution both with and without an onMissing callback.
  • After: Fallback tests supply onMissing, leaving the strict route without its dedicated assertion.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) Useful consolidation with passing targeted hosted checks, but one distinct regression contract is removed.
Proof confidence 🦐 gold shrimp (3/6) This maintainer-authored test-only cleanup requires no separate shipped-product demonstration; hosted checks exercise the retained suites.
Patch quality 🦐 gold shrimp (3/6) 1 actionable review finding remain.

Product

Kind: Test only · Worth it: Yes · Fix scope: Complete
Reason: The maintainer-approved consolidation reduces repeated scaffolding without requiring a product or configuration change.

Merge readiness

⛔ Needs changes before merge - 2 items remain

Keep this maintainer-authored PR open; the cleanup is useful, but it removes a distinct strict-mode config regression assertion.

Priority: P3
Reviewed head: 2eaefcc55bce5c1f500ec3084baf2b896d2c087c

Before merge

  • Restore fallback coverage without an onMissing callback (P2) - The deleted assertion exercised ${MISSING:-60} with an absent variable and ${EMPTY:-} with an empty variable without supplying onMissing. Every retained fallback case now supplies that callback, so a regression that handles defaults only in the warning route would pass this suite while strict consumers such as logging lose valid configuration. test(doctor,cli,config,sessions): remove low-value tests (batch d176) #164348 explicitly retained this assertion for that distinction. Restore the small strict-mode assertion alongside the consolidated loop.
  • Explain or restore the original intent of Strict-mode environment defaults - 878a03b: test(doctor,cli,config,sessions): remove low-value tests (batch d176) #164348 retained missing-variable and empty-variable defaults without onMissing because logging uses that route.

Findings

  • [P2] Restore fallback coverage without an onMissing callback — src/config/env-substitution.test.ts:73-74

Provenance

Agent review details

How this fits together

Vitest suites exercise production owners using synthetic configuration, storage, transport, and UI fixtures, then assert their observable contracts.

flowchart LR
  A[Synthetic inputs] --> B[Shared test fixtures]
  B --> C[Production owners]
  C --> D[Observed results]
  D --> E[Contract assertions]
  E --> F[Hosted CI]
Loading

Technical review

Best possible solution:

Keep the fixture consolidation and restore the small strict-mode fallback assertion in the existing config test.

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

Source comparison confirms removal of strict-mode fallback coverage; no target code or tests were executed during this read-only review.

Is this the best way to solve the issue?

Shared fixtures and equivalent tables fit the maintenance goal, but warning-callback coverage cannot replace the explicitly retained strict-mode contract.

Full review comments:

  • [P2] Restore fallback coverage without an onMissing callback — src/config/env-substitution.test.ts:73-74
    The deleted assertion exercised ${MISSING:-60} with an absent variable and ${EMPTY:-} with an empty variable without supplying onMissing. Every retained fallback case now supplies that callback, so a regression that handles defaults only in the warning route would pass this suite while strict consumers such as logging lose valid configuration. test(doctor,cli,config,sessions): remove low-value tests (batch d176) #164348 explicitly retained this assertion for that distinction. Restore the small strict-mode assertion alongside the consolidated loop.
    Confidence: 0.98

Overall correctness: patch is incorrect
Overall confidence: 0.94

AGENTS.md: found and applied where relevant.

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

Provenance checked

Testing

Proof path: in-process harness.

Security

None.

Evidence

Acceptance criteria:

  • pnpm test src/config/env-substitution.test.ts src/logging/config.test.ts --maxWorkers=1
  • pnpm exec oxfmt --check src/config/env-substitution.test.ts
  • pnpm exec oxlint -c .oxlintrc.json src/config/env-substitution.test.ts
  • git diff --check

What I checked:

PR surface

Tests -2379, Other -3. Total -2382 across 42 files. Added test files: 1.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 41 5579 7958 -2379
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 1 0 3 -3
Total 42 5579 7961 -2382

Review metrics

Metric Value Why it matters
Production versus test/support LOC Production +0/-0; tests/support +5,579/-7,958; baseline -3 The reduction comes from fixture and assertion consolidation, with one distinct config contract requiring restoration.

Labels

Label changes:

  • add P3: This is test-maintenance work with no immediate production behavior change.
  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp 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 work with no immediate production behavior change.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🦐 gold shrimp.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action.

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, 5:07 AM ET / 09:07 UTC.

@steipete
steipete merged commit 81e58e7 into main Oct 19, 2026
130 checks passed
@steipete
steipete deleted the tcr/land-d277-1792397995 branch October 19, 2026 09:16
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 20, 2026
…nclaw#177135)

* test(agents): deslop x8330 tests

* test(agents): deslop x8330 tests

* test(agents): deslop x8330 tests

* test(browser): deslop x8336 tests

* test(browser): deslop x8336 tests

* test(browser): deslop x8336 tests

* test(memory): deslop x8339 tests

* test(memory): deslop x8339 tests

* test(config): deslop x8338 tests

* test(config): deslop x8338 tests

* test(gateway): deslop x8341 tests

* test(gateway): compact x8341 fixtures and assertions

* test(gateway): simplify x8341 test fixtures

* test(sessions): deslop x8340 tests

* test(sessions): deslop x8340 tests

* test(sessions): deslop x8340 tests

Consolidate cap cases around the live-protection race; retain inline and protected-only coverage in the maintenance cadence/read/kick suites. Keep postimage publication coverage in the entry-writes suite and preserve the distinct participant-detachment regression here. Static formatting, diff and plain oxlint gates only; runtime proof remains with hosted CI.

* test(projects): deslop x8343 tests

* test(projects): deslop x8343 tests

* test(projects): deslop x8343 tests

* test(agents): deslop x8342 tests

* test(agents): deslop x8342 tests

* test(test-utils): deslop x8345 tests

* test(test-utils): deslop x8345 tests

* test(test-utils): deslop x8345 tests

* test(ollama): deslop x8346 tests

* test(ollama): deslop x8346 tests

* test(tlon): deslop x8344 tests

* test(tlon): deslop x8344 tests

* test(tlon): deslop x8344 tests

* test: preserve coverage and repair batch d277 CI

* test: prune documented mock isolation baselines
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling app: web-ui App: web-ui channel: tlon Channel integration: tlon extensions: ollama 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