Repository navigation
test(infra,agents,cli,memory,gateway,chat,auth,commands): remove low-value tests (batch d532) - #183583
Conversation
Consolidate credential operation fixtures, app cleanup and JSONL deadline setup without removing distinct lifecycle or authority assertions. Remove three redundant native-bootstrap rows: unrelated/application table rejection remains in the credential classification table, and WAL rejection plus source immutability remains in the PortGuardian companion row. Preserve schema, credential, ownership, framing and response-loss boundaries. CI-only proof: oxfmt, plain oxlint and diff check. No tests or coverage run. Reduction is 60 of 3937 lines (1.52%); the remaining independent boundary fixtures prevent the requested 25% cut without losing behavior. Existing undefined closeBeforeRead in http-body.test.ts is unchanged and needs coordinator follow-up.
Keep delayed commit-admission and revocation proof in update-run-admission-hold.test.ts. Keep Node/Bun source-loader behavior in runtime-worker-url.test.ts. Remove duplicate native-bootstrap classification rows and release-wrapper variants; retain the underlying credential, generation and ordering boundaries. Use native async server disposal for credential app fixtures, share usage database setup, and remove handoff fixture self-checks and duplicate diagnostic wiring assertions. No production changes or deleted files. CI-only: formatting, plain oxlint and git diff --check pass; no tests or coverage run. Cumulative shard lines: 3937 to 3703 (5.94%), below the 25% target. Remaining cases retain distinct authority, durability, accounting and lifecycle interleavings.
Remove the duplicate 18-case final-custody matrix. The same ordinary, embedded, preflight, postrun, repeated-compaction, rebind, source, route, and revocation paths remain covered by agent-command.compaction-custody.test.ts (retains exact original final custody across accepted compaction). Keep every harness-specific authority case. Compact node-failure table data, steering store setup, and a one-use cancelled-admission fixture. CI-only: plain oxlint, oxfmt, and diff-check passed; tests and coverage were not run.
Consolidate heartbeat admission observation, reuse the finalization fixture, and use scoped SQLite disposal without removing boundary cases. Preserve changed-source snapshot timing and close databases before subsequent owner reads. No production changes; CI-only static validation. The shard retains its distinct authority, migration, cancellation, and recovery contracts; this conservative cut falls short of the 25% target.
Keep update admission read-only proof; Doctor scratch retirement is already covered by doctor-heartbeat-scratch-migration.test.ts (preserves differing legacy scratch and its source during repair). Keep deferred-warning reconciliation; formatting and report rendering are covered by deferred-plugin-migrations.test.ts and update-run-report-system-service.test.ts. Keep transition outcomes and lifecycle events; command flags have process proof in update-command-service-command.process.test.ts. Replace the duplicate triage-input failure assertion with the same contract at onResult, and remove observer instrumentation self-proof. No cases or distinct authority/recovery paths removed. Static-only validation; cumulative line reduction remains below 25%.
Use one terminal ownership wrapper for migrated package and Windows cases, preserving prepared-failure propagation and publication ordering. Consolidate original-capture assertions without dropping admission, recovery, or authority variants. Static-only validation; no test runs. The remaining shard cases have distinct boundary coverage and the cumulative reduction remains below the requested 25%.
Keep the seven duplicated lease contracts in manager-provider-lifecycle-fallback.test.ts: FTS generation stability, provider-user drain, leased timeout runtime, admitted search drain, vector-probe drain, required null-fallback retry, and concurrent optional fallback failure. Retain the three unique initialization outcomes in a table. Share PostgreSQL source setup and cache input defaults; remove repeated diagnostics and redundant probe assertions. Preserve distinct rollback, recovery, authority and lifecycle cases. CI-only: plain oxlint, oxfmt and diff checks passed; no tests or coverage run.
Factor repeated public-chat LAN shell and private-entry assertions without dropping auth or privacy checks. Reuse the delivery handler fixture for the body timeout case. Preserve all cases; other shard tests cover distinct recovery, authority, logging, and shutdown order contracts.
Remove HTTP normalization replays covered by hooks.test.ts (normalizeAgentPayload binds delivery; hook target resolution keeps config fallback out of request payloads). Keep representative HTTP rejection and delivery plus every mapped delivery, auth, and timeout boundary. Keep rooted permission preservation in sessions-patch.test.ts (stores and clears the session permission mode), and rootless mutation proof in this shard. Consolidate cold cron operations, remove duplicate WS row-mode fallback, and trim bootstrap mock-only assertions while preserving retirement and drain order.
Keep widget minting and revocation-before-304 in control-ui-public-session.http.test.ts: mints a document-scoped widget link under the configured base path; reuses a completed representation and rechecks revocation before 304. Both routes consume servePublicSessionRepresentation. Keep token/password and direct/proxy handoff proof in control-ui-session-entry.real-auth.e2e.test.ts: reopens private token/password chat links through the real HTTP entry. Consolidate navigation inputs while retaining exact route, privacy, and preferred-face assertions. Remove identical mocked missing-session self-comparison and redundant rendering metadata/call-count assertions.
Remove duplicate route handoff and identity cases covered by route-resolution-handoff.test.ts and route-resolution-identity.test.ts. Retain the distinct no-roster-read assertion during navigation hint cleanup. The empty-assistant Code Mode fixture remains covered by chat-empty-assistant.e2e.test.ts. Reuse model and board rendering helpers and consolidate local fixtures without dropping lifecycle, privacy, permission, or accounting assertions.
Consolidate repeated InputEvent setup while preserving input data, input type, bubbling, and beforeinput cancellation semantics.
Consolidate credential fixtures, retry metadata, inherited-read setup and settlement assertions while retaining all expanded cases. Share the ordinary/reconnected peer account-conflict flow in a two-row table. Remove redundant catalog cleanup call counts; held-refresh scrub and absent-credential rollback tests retain the observable persistence assertions. No production or support-file changes. CI-only validation: oxfmt, plain oxlint and git diff --check pass. Static case count remains 194; declarations 81 to 80. Test LOC 3916 to 3712 (5.2 percent); below the 25 percent target because remaining cases protect distinct auth, persistence, revocation and ordering boundaries. Runtime tests and coverage deferred to hosted CI.
Remove same-branch input replays, internal call-shape and method inventories, and duplicate layer assertions. Retain concurrency, revocation, persistence and account-boundary checks. Reuse existing test-state and credential-authority fixtures. Keeper map: terminal queue failures share the concurrent-and-later-caller case; safe cohorts retain one full interleaving. Provider retry evidence remains in github-oauth-client and xai-oauth tests. Legacy material remains in doctor-auth-flat-profiles. Inherited wrappers retain runtime, ensure, async local-update and model-snapshot cases. Model-auth profiles and availability tests retain direct API-key route rejection. Shared-auth-store migration tests retain relocation and local-override behavior; settlement retains the post-migration canonical storage path. Catalog published-source checks remain in models-config.write-serialization. Identical-byte reconnect retains the stricter replacement-lifetime case. CI-only: no tests or coverage run. Formatting, plain oxlint and diff-check pass. This follow-up removes 326 lines, for 3916 to 3386 overall (13.5 percent), below the 25 percent target. No files deleted or production/support files changed. Remaining cases exercise distinct security, normalization, usage-reset and lifecycle behavior.
Use one composite public error to cover stored, attempted, overlapping and token-shaped secrets with nested causes. Retain each leak assertion, longest-match protection, exact redaction count and structured diagnostics. Factor protocol-fact construction while retaining every fact row. Reuse the existing same-directory SQLite fixture lifecycle for durable refresh ordering. Preserve claim, settlement, publication and reopen assertions. No production or support files changed; no tests run under CI-only instructions. Formatting, plain oxlint and diff-check pass. Additional 56 lines removed; shard 3916 to 3330 overall (15 percent). The 25 percent target remains unmet: further reviewed fixture and file-merger rewrites did not materially shrink output without changing distinct boundary proof.
Remove the duplicate session migration failure-report layer; doctor-session-sqlite.failure-reports.test.ts retains import rejection, recovery selection and privacy, clean recovery, consent races, historical receipts, private paths, and UTF-16 bounds. Keep remote JSON schema proof in status-json-runtime.test.ts (preserves the complete status JSON schema with optional sections). Consolidate local row, output capture, and channel plugin fixtures without changing distinct assertions. CI-only campaign: formatting, diff check, and plain oxlint passed. No tests or coverage run. Retain unique SQLite durability, authority, budget, and frozen released-reader contracts.
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review blockedAutomated review did not run, so no review verdict was produced. Reason: The input-safety check rejected material in this revision. No detected value, path, or scanner output is reproduced here. Automatic review is on hold, including after source changes. Request a fresh re-review after resolving the failure; maintainers can also release the hold through an intentional scanner-policy update. Next step: If this is a genuine credential, remove and rotate it. If it is an intentional test fixture, a maintainer must review and qualify it. |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
…value tests (batch d532) (openclaw#183583) * test(infra): deslop s0355 tests Consolidate credential operation fixtures, app cleanup and JSONL deadline setup without removing distinct lifecycle or authority assertions. Remove three redundant native-bootstrap rows: unrelated/application table rejection remains in the credential classification table, and WAL rejection plus source immutability remains in the PortGuardian companion row. Preserve schema, credential, ownership, framing and response-loss boundaries. CI-only proof: oxfmt, plain oxlint and diff check. No tests or coverage run. Reduction is 60 of 3937 lines (1.52%); the remaining independent boundary fixtures prevent the requested 25% cut without losing behavior. Existing undefined closeBeforeRead in http-body.test.ts is unchanged and needs coordinator follow-up. * test(infra): remove duplicate s0355 coverage layers Keep delayed commit-admission and revocation proof in update-run-admission-hold.test.ts. Keep Node/Bun source-loader behavior in runtime-worker-url.test.ts. Remove duplicate native-bootstrap classification rows and release-wrapper variants; retain the underlying credential, generation and ordering boundaries. Use native async server disposal for credential app fixtures, share usage database setup, and remove handoff fixture self-checks and duplicate diagnostic wiring assertions. No production changes or deleted files. CI-only: formatting, plain oxlint and git diff --check pass; no tests or coverage run. Cumulative shard lines: 3937 to 3703 (5.94%), below the 25% target. Remaining cases retain distinct authority, durability, accounting and lifecycle interleavings. * test(agents): deslop s0357 tests Remove the duplicate 18-case final-custody matrix. The same ordinary, embedded, preflight, postrun, repeated-compaction, rebind, source, route, and revocation paths remain covered by agent-command.compaction-custody.test.ts (retains exact original final custody across accepted compaction). Keep every harness-specific authority case. Compact node-failure table data, steering store setup, and a one-use cancelled-admission fixture. CI-only: plain oxlint, oxfmt, and diff-check passed; tests and coverage were not run. * test(cli): deslop s0358 tests Consolidate heartbeat admission observation, reuse the finalization fixture, and use scoped SQLite disposal without removing boundary cases. Preserve changed-source snapshot timing and close databases before subsequent owner reads. No production changes; CI-only static validation. The shard retains its distinct authority, migration, cancellation, and recovery contracts; this conservative cut falls short of the 25% target. * test(cli): remove duplicate s0358 assertion layers Keep update admission read-only proof; Doctor scratch retirement is already covered by doctor-heartbeat-scratch-migration.test.ts (preserves differing legacy scratch and its source during repair). Keep deferred-warning reconciliation; formatting and report rendering are covered by deferred-plugin-migrations.test.ts and update-run-report-system-service.test.ts. Keep transition outcomes and lifecycle events; command flags have process proof in update-command-service-command.process.test.ts. Replace the duplicate triage-input failure assertion with the same contract at onResult, and remove observer instrumentation self-proof. No cases or distinct authority/recovery paths removed. Static-only validation; cumulative line reduction remains below 25%. * test(cli): share s0358 migrated finalization harness Use one terminal ownership wrapper for migrated package and Windows cases, preserving prepared-failure propagation and publication ordering. Consolidate original-capture assertions without dropping admission, recovery, or authority variants. Static-only validation; no test runs. The remaining shard cases have distinct boundary coverage and the cumulative reduction remains below the requested 25%. * test(memory): deslop s0359 tests Keep the seven duplicated lease contracts in manager-provider-lifecycle-fallback.test.ts: FTS generation stability, provider-user drain, leased timeout runtime, admitted search drain, vector-probe drain, required null-fallback retry, and concurrent optional fallback failure. Retain the three unique initialization outcomes in a table. Share PostgreSQL source setup and cache input defaults; remove repeated diagnostics and redundant probe assertions. Preserve distinct rollback, recovery, authority and lifecycle cases. CI-only: plain oxlint, oxfmt and diff checks passed; no tests or coverage run. * test(gateway): deslop s0360 tests Factor repeated public-chat LAN shell and private-entry assertions without dropping auth or privacy checks. Reuse the delivery handler fixture for the body timeout case. Preserve all cases; other shard tests cover distinct recovery, authority, logging, and shutdown order contracts. * test(gateway): consolidate s0360 boundary proof Remove HTTP normalization replays covered by hooks.test.ts (normalizeAgentPayload binds delivery; hook target resolution keeps config fallback out of request payloads). Keep representative HTTP rejection and delivery plus every mapped delivery, auth, and timeout boundary. Keep rooted permission preservation in sessions-patch.test.ts (stores and clears the session permission mode), and rootless mutation proof in this shard. Consolidate cold cron operations, remove duplicate WS row-mode fallback, and trim bootstrap mock-only assertions while preserving retirement and drain order. * test(gateway): remove duplicate public chat proof Keep widget minting and revocation-before-304 in control-ui-public-session.http.test.ts: mints a document-scoped widget link under the configured base path; reuses a completed representation and rechecks revocation before 304. Both routes consume servePublicSessionRepresentation. Keep token/password and direct/proxy handoff proof in control-ui-session-entry.real-auth.e2e.test.ts: reopens private token/password chat links through the real HTTP entry. Consolidate navigation inputs while retaining exact route, privacy, and preferred-face assertions. Remove identical mocked missing-session self-comparison and redundant rendering metadata/call-count assertions. * test(chat): deslop s0362 tests Remove duplicate route handoff and identity cases covered by route-resolution-handoff.test.ts and route-resolution-identity.test.ts. Retain the distinct no-roster-read assertion during navigation hint cleanup. The empty-assistant Code Mode fixture remains covered by chat-empty-assistant.e2e.test.ts. Reuse model and board rendering helpers and consolidate local fixtures without dropping lifecycle, privacy, permission, or accounting assertions. * test(chat): share emoji native input fixtures Consolidate repeated InputEvent setup while preserving input data, input type, bubbling, and beforeinput cancellation semantics. * test(auth-profiles): deslop s0363 tests Consolidate credential fixtures, retry metadata, inherited-read setup and settlement assertions while retaining all expanded cases. Share the ordinary/reconnected peer account-conflict flow in a two-row table. Remove redundant catalog cleanup call counts; held-refresh scrub and absent-credential rollback tests retain the observable persistence assertions. No production or support-file changes. CI-only validation: oxfmt, plain oxlint and git diff --check pass. Static case count remains 194; declarations 81 to 80. Test LOC 3916 to 3712 (5.2 percent); below the 25 percent target because remaining cases protect distinct auth, persistence, revocation and ordering boundaries. Runtime tests and coverage deferred to hosted CI. * test(auth-profiles): consolidate s0363 branch coverage Remove same-branch input replays, internal call-shape and method inventories, and duplicate layer assertions. Retain concurrency, revocation, persistence and account-boundary checks. Reuse existing test-state and credential-authority fixtures. Keeper map: terminal queue failures share the concurrent-and-later-caller case; safe cohorts retain one full interleaving. Provider retry evidence remains in github-oauth-client and xai-oauth tests. Legacy material remains in doctor-auth-flat-profiles. Inherited wrappers retain runtime, ensure, async local-update and model-snapshot cases. Model-auth profiles and availability tests retain direct API-key route rejection. Shared-auth-store migration tests retain relocation and local-override behavior; settlement retains the post-migration canonical storage path. Catalog published-source checks remain in models-config.write-serialization. Identical-byte reconnect retains the stricter replacement-lifetime case. CI-only: no tests or coverage run. Formatting, plain oxlint and diff-check pass. This follow-up removes 326 lines, for 3916 to 3386 overall (13.5 percent), below the 25 percent target. No files deleted or production/support files changed. Remaining cases exercise distinct security, normalization, usage-reset and lifecycle behavior. * test(auth-profiles): compact redaction and settlement fixtures Use one composite public error to cover stored, attempted, overlapping and token-shaped secrets with nested causes. Retain each leak assertion, longest-match protection, exact redaction count and structured diagnostics. Factor protocol-fact construction while retaining every fact row. Reuse the existing same-directory SQLite fixture lifecycle for durable refresh ordering. Preserve claim, settlement, publication and reopen assertions. No production or support files changed; no tests run under CI-only instructions. Formatting, plain oxlint and diff-check pass. Additional 56 lines removed; shard 3916 to 3330 overall (15 percent). The 25 percent target remains unmet: further reviewed fixture and file-merger rewrites did not materially shrink output without changing distinct boundary proof. * test(commands): deslop s0365 tests Remove the duplicate session migration failure-report layer; doctor-session-sqlite.failure-reports.test.ts retains import rejection, recovery selection and privacy, clean recovery, consent races, historical receipts, private paths, and UTF-16 bounds. Keep remote JSON schema proof in status-json-runtime.test.ts (preserves the complete status JSON schema with optional sections). Consolidate local row, output capture, and channel plugin fixtures without changing distinct assertions. CI-only campaign: formatting, diff check, and plain oxlint passed. No tests or coverage run. Retain unique SQLite durability, authority, budget, and frozen released-reader contracts. * test(memory): preserve current provider lease coverage * test: retain hook and authentication boundary coverage * test: retain update and permission boundary regressions * test: repair consolidated fixture types for current main
What Problem This Solves
Removes redundant test layers and repeated fixtures from the d532 campaign batch while preserving current-main implementations and distinct boundary proof.
User Impact
No user-visible or production-code change. This is test/support cleanup only; no configuration, schema, dependency, or runtime change.
Why This Change Was Made
Initially replayed 16 of 30 campaign commits onto pinned main
d4f682101a349c7f4d6fd6538b38c0c2bca44b6c. Four retained commits are file-scoped partial replays; 14 incompatible or stale commits were omitted. Existing current-main fixtures and newer coverage win over older consolidation shapes. A follow-up restores the complete provider-lease suite: source review found that the campaign's claimed duplicate cases were absent from current main's fallback suite. Independent review also found three distinct guards missing from the proposed reduction: disabled-hook destination clearing, password/secure-proxy chat handoff, and direct API-key/OAuth routing. All three affected files were restored to main. A second pass accepted four further guards: recorded permission roots, heartbeat retirement preserving operator data, service-transition CLI arguments, and inherited schema/unexpected errors. Those four files were also restored. Three findings were rejected with retained owner proof: the OAuth blocked-read deadline table times out before resolving its read, native-bootstrap classification still rejects unrelated/exec-approval tables through the same whitelist, and the broker delegates loader selection to the directly tested runtime-worker owner. A final review includes those exact committed owner sources.Evidence
pnpm install --frozen-lockfile --prefer-offline: passed.node_modules/.bin/oxfmt --write <changed files>: exit 0.node_modules/.bin/oxlint -c .oxlintrc.json <changed files>: exit 0.git diff --check d4f682101a349c7f4d6fd6538b38c0c2bca44b6c: passed.openclaw/ci-gateis the runtime/typecheck proof and merge gate. Final whole-diff review passed with no actionable P0-P2 findings. A subsequent focused review of the three-file CI repair also passed.Per-shard final-tree accounting and campaign evidence
Counts below cover only files changed by the final replay against the pinned base. Declarations are lexical
it/testdeclarations (tables count once), not executed cases. Source reports explicitly deferred runtime coverage under CI-only mode; no measured coverage-retention claim is made.Omitted shards: s0348 (Zalouser), s0350 (sidebar), s0352 (UI fixture families), s0361 (UI lifecycle), s0366 (Discord). Final delta for each is zero; source reports likewise state tests/coverage were not run.
s0355 files:
src/infra/client-credential-async.test.ts(+90 / -133)src/infra/client-credential-native-bootstrap.test.ts(+30 / -41)src/infra/jsonl-socket.test.ts(+59 / -76)src/infra/session-cost-usage-worker-snapshot.test.ts(+12 / -14)src/infra/sqlite-worker-broker-lifecycle.test.ts(+0 / -24)src/infra/tailscale.test.ts(+19 / -43)src/infra/update-managed-service-handoff-reclamation.test.ts(+30 / -43)src/infra/update-managed-service-handoff-termination.test.ts(+0 / -13)s0357 files:
src/agents/bash-tools.exec-host-node-phases.test.ts(+7 / -19)src/agents/openclaw-tools.sessions-steering.test.ts(+5 / -11)src/agents/prepared-model-runtime.cancelled-admission.test.ts(+11 / -19)s0358 files:
src/cli/update-cli/update-command-candidate-authority.process.test.ts(+10 / -23)src/cli/update-cli/update-command-definition-recovery.test-support.ts(+3 / -14)src/cli/update-cli/update-command-fresh-preview.test-support.ts(+34 / -58)src/cli/update-cli/update-command-migrated-package.test-support.ts(+35 / -39)src/cli/update-cli/update-command-migrated-windows.test.ts(+2 / -12)src/cli/update-cli/update-command-resume-completion.test.ts(+8 / -21)src/cli/update-cli/update-command-service-maintenance-handoff.test.ts(+4 / -8)src/cli/update-cli/update-command-terminal-unreported.test.ts(+10 / -15)s0359 files:
extensions/memory-core/src/memory/manager-embedding-cache.postgres.test.ts(+27 / -41)extensions/memory-core/src/memory/manager-provider-lifecycle.test.ts(+14 / -23)extensions/memory-core/src/memory/manager-publication-settlement.test.ts(+5 / -11)extensions/memory-core/src/memory/manager-source-index-kernel.postgres.test.ts(+174 / -219)s0360 files:
src/gateway/server-cron-lazy.test.ts(+4 / -13)src/gateway/ws-log.test.ts(+10 / -19)s0362 files:
ui/src/pages/chat/chat-composer-emoji.test.ts(+30 / -41)ui/src/pages/chat/chat-composer-microphone.test.ts(+22 / -34)ui/src/pages/chat/chat-model-runtime.test.ts(+50 / -81)ui/src/pages/chat/chat-pane-board.loading.test.tsx(+205 / -258)ui/src/pages/chat/chat-pane-browser-annotation-lifecycle.test.ts(+30 / -37)ui/src/pages/chat/chat-view.async-questions.test.ts(+26 / -34)s0363 files:
src/agents/auth-profiles/oauth-manager.settlement-validation.test.ts(+109 / -185)src/agents/auth-profiles/oauth-refresh-failure.test.ts(+74 / -218)src/agents/auth-profiles/oauth-refresh-fence.async.test.ts(+11 / -29)src/agents/auth-profiles/oauth-refresh-queue.test.ts(+150 / -213)src/agents/auth-profiles/oauth.peer-settlement.test.ts(+66 / -104)src/agents/auth-profiles/personal-authorization.test.ts(+20 / -49)src/agents/auth-profiles/profiles.catalog.test.ts(+37 / -74)src/agents/auth-profiles/sqlite-read.test.ts(+2 / -13)src/agents/auth-profiles/usage-state.test.ts(+19 / -45)s0365 files:
src/commands/channels.resolve.test.ts(+55 / -76)src/commands/status-json.test.ts(+12 / -61)src/commands/status-overview-rows.test.ts(+34 / -74)Replay decisions
Omitted whole commits:
Partial commits:
All remaining supplied commits applied cleanly; no conflicting main code was replaced.
Review follow-ups restore eight complete files to pinned main. This fully reverses the final-tree effects of
4b8fddd5a6bdand221577c8ef2c; the other restorations narrow the surviving source commits. Seven independent-review findings were accepted and fixed, plus one root source-review finding (memory lease coverage). Three findings were rejected with the retained proof described above.