Repository navigation
test(ai,ui,channels,gateway): remove low-value tests (batch d158) - #174423
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
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. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ae60172316
ℹ️ 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".
| config: { | ||
| constructor: "${CONSTRUCTOR_TOKEN}", | ||
| "0": "${OBJECT_TOKEN}", | ||
| list: ["${ARRAY_TOKEN}"], |
There was a problem hiding this comment.
Restore the SecretRefs exercised by the identity table
The table still includes the simple and prototype paths, but this consolidated fixture no longer authors either SecretRef. Because readPluginConfig attaches resolution facts, the resolver only consults authored facts rather than parsing the supplied value as a fallback, so those two rows return literal tokens instead of undefined and this touched suite fails deterministically. Restore both fixture entries.
AGENTS.md reference: AGENTS.md:L85-L86
Useful? React with 👍 / 👎.
|
Codex review: stale review; fresh review needed. Summary Next step Review history (1 earlier review cycle)
|
|
Latest head: All batch-caused failures found in the first two runs were repaired or their cleanup hunks were dropped. The current run has one failed job, The failure is in unchanged This is not claimed as a proven pre-existing failure. The campaign's CI-only restriction prohibits the local/Testbox baseline reproduction required for that exception, so an admin merge would not be justified. The batch is pushed and the reusable worktree is clean. It needs the separate E2E issue resolved, or separately authorized baseline evidence, before landing. Independent four-pass P0-P2 review completed. Both findings were rejected after checking the actual narrow worktree contract and the centralized sidebar teardown; details and all retained/dropped replay hunks are in the PR body. Net change: 6,219 fewer test/support lines and 22 removed stale mock-baseline entries, with no production changes. |
292624e to
1e9b13e
Compare
1e9b13e to
1b52943
Compare
1b52943 to
17b9ba4
Compare
17b9ba4 to
f8349c0
Compare
…enclaw#174423) * test(ai): deslop x7034 tests * test(sidebar): deslop x7054 tests * test(sidebar): deslop x7054 tests * test(sidebar): deslop x7054 tests * test(slack): deslop x7055 tests * test(msteams): deslop x7059 tests * test(msteams): deslop x7059 tests * test(gateway): deslop x7060 tests * test(gateway): deslop x7060 tests * test(cli): deslop x7058 tests * test(cli): deslop x7058 tests * test(cli): deslop x7058 tests * test(gateway): deslop x7061 tests * test(gateway): deslop x7061 tests * test(gateway): deslop x7061 tests * test(gateway): deslop x7062 tests * test(gateway): deslop x7062 tests * test(gateway): deslop x7062 tests * test(qa-lab): deslop x7065 tests * test(hooks): deslop x7057 tests * test(hooks): deslop x7057 tests * test(qa-lab): deslop x7065 tests * test(auto-reply): deslop x7063 tests * test(auto-reply): deslop x7063 tests * test(gateway): deslop x7066 tests * test(gateway): deslop x7066 tests * test(gateway): deslop x7066 tests * test(gateway): deslop x7064 tests * test(gateway): deslop x7064 tests * test(gateway): deslop x7064 tests * test: preserve current contracts in d158 replay * test: retain secret target identity coverage in d158 * test: prune stale mock baseline and retain doctor assertions * test(gateway): retain model-only reload coverage
What Problem This Solves
The affected test suites repeat fixture setup, request construction, and assertions that can be expressed once while retaining their behavior checks.
User Impact
No production or user-visible behavior change. This is test/support-only cleanup across AI providers, sidebar, Slack, Teams, Gateway, CLI, hooks, and QA-lab. No migrations or operator actions.
Why This Change Was Made
Replay batch d158's 30 supplied commits onto current main, retaining newer main coverage. Consolidate repeated fixtures and singleton scaffolding, and remove redundant test-only logic. All 30 commits applied; none skipped entirely.
Replay decisions
The source reports' initial per-file reduction targets were not universally met; this PR does not treat a deletion quota as a correctness goal.
Evidence
pnpm install --frozen-lockfile --prefer-offline: passed.node_modules/.bin/oxfmt --write <all 69 changed TS files>: passed.node_modules/.bin/oxlint -c .oxlintrc.json <all 69 changed TS files>: exited 0. One replay-created shadowed local was corrected.git diff --check origin/main: passed.openclaw/ci-gateis the proof and merge gate.First-head CI repair
The first-head CI run caught stale fixture references/types, an undefined SSE expected value, fixture callback typing, missing mock-isolation annotations, and changed assertions in the initial replay. Auto-merge was disabled while repairing them.
The repair passed plain oxlint, oxfmt, and diff checks. No local tests or typechecking were run; fresh hosted CI is required on the repaired head.
Final CI correction and independent review
The second-head CI run reduced the failures to the mock-baseline shrink and the package doctor environment assertion. Restored
src/cli/update-cli.package-lifecycle.test.tsentirely to main: its original contract permits an explicitly undefined environment key. Removed exactly the 22 stale tuples listed by that run fromconfig/test-mock-exports-baseline.txt; this is shrink-only metadata, with no new exceptions.Four-pass independent P0-P2 review completed. Both findings were rejected after verifying the current owners:
WorkerPlacementSessionRuntime, whosefindLiveByOwnerreturn is explicitlyPick<ManagedWorktreeRecord, "id" | "ownerId" | "path">.setupSidebarTestrestores timers and removes providers, the context lifecycle owner resets bootstrap/subscriptions, andcreateTestSessionCapabilityregisters disposal withonTestFinished. Adding competing per-case teardown is unnecessary.No accepted actionable review finding remains. The final delta after review only restores an entire test file to base and removes the exact CI-proven stale baseline entries. Final local checks: oxfmt on 69 changed TS files, plain oxlint exit 0, and
git diff --check origin/main; no local tests, typechecks, coverage, or Testbox.Shard accounting
Base: 0dc31f5
Static declaration counts are source-text counts, not expanded test cases or executed-test totals. File counts and LOC are against this PR base. Source reports contain no measured coverage totals; no ≤1% coverage claim is made.
x7034: files touched
packages/ai/src/providers/openai-chatgpt-responses-streaming.test.tspackages/ai/src/providers/openai-compatible-thinking.test.tspackages/ai/src/providers/openai-completions-structured-content-parity.test.tspackages/ai/src/providers/openai-completions-usage-parity.test.tspackages/ai/src/providers/openai-provider.test-support.tspackages/ai/src/providers/openai-responses-shared.test.tspackages/ai/src/providers/openai-responses.test.tsx7054: files touched
ui/src/components/app-sidebar-freshness.test-support.tsui/src/components/app-sidebar.background-scope.test.tsui/src/components/app-sidebar.child-history-freshness.test.tsui/src/components/app-sidebar.child-snapshot-freshness.test.tsui/src/components/app-sidebar.global-row-observation.test.tsui/src/components/app-sidebar.lineage-freshness.test.tsx7055: files touched
extensions/slack/src/monitor/events/agent.test.tsextensions/slack/src/monitor/events/assistant.test.tsextensions/slack/src/monitor/events/interactions.test.tsx7059: files touched
extensions/msteams/src/send.handoff.test.tsextensions/msteams/src/send.test.tsextensions/msteams/src/send.threaded-attachments.test.tsextensions/msteams/src/setup-policy.test.tsextensions/msteams/src/setup-surface.delegated-auth.test.tsextensions/msteams/src/thread-parent-context.test.tsx7060: files touched
src/gateway/openai-http.test.tssrc/gateway/openresponses-http.continuation.test-support.tssrc/gateway/operator-approval-mcp-grants.test.tsx7058: files touched
src/cli/update-cli.config-convergence.test.tssrc/cli/update-cli.git-service.test.tssrc/cli/update-cli.plugin-convergence.test.tssrc/cli/update-cli.post-core-handoff.test.tsx7061: files touched
src/gateway/project-github-search.test.tssrc/gateway/provider-auth-account-relogin.persistence.integration.test.tssrc/gateway/remote-control-ui-ingress.integration.test.tssrc/gateway/remote-control-ui-mcp-relay.test-support.tsx7062: files touched
src/gateway/worker-environments/worker-turn-early-final.test.tssrc/gateway/worker-environments/worker-turn-execution.test.tssrc/gateway/worker-environments/worker-turn-launcher-build-recovery.test.tssrc/gateway/worker-environments/worker-turn-launcher.claim-recovery.test.tssrc/gateway/worker-environments/worker-turn-launcher.lazy.test.tssrc/gateway/worker-environments/worker-turn-launcher.test-support.tsx7065: files touched
extensions/qa-lab/src/execution-identity-storage-inspection.test.tsextensions/qa-lab/src/gateway-child-auth-profiles.test.tsextensions/qa-lab/src/gateway-child-command.test-support.tsextensions/qa-lab/src/gateway-child-drain.test.tsx7057: files touched
src/hooks/gmail-ops.test.tssrc/hooks/gmail-setup-utils.test.tssrc/hooks/gmail-watcher.test.tssrc/hooks/gmail.test-support.tssrc/hooks/hook-fixture.test-support.tssrc/hooks/hooks-lifecycle.e2e.test.tssrc/hooks/install.test.tssrc/hooks/installs.test.tssrc/hooks/loader.test.tssrc/hooks/message-hook-mappers.test.tsx7063: files touched
src/auto-reply/reply/commands-compact.test.tssrc/auto-reply/reply/commands-config.owner.test.tssrc/auto-reply/reply/commands-context-report.test.tssrc/auto-reply/reply/commands-export-session.test.tssrc/auto-reply/reply/commands-export-trajectory.test-support.tssrc/auto-reply/reply/commands-gating.test.tssrc/auto-reply/reply/commands-handler-fixture.test-support.tsx7066: files touched
src/gateway/server-worker-environment-startup.lazy.test.tssrc/gateway/server-worker-placement-cancel.test.tssrc/gateway/server-worker-placement-dispatch-admission.test.tssrc/gateway/server-worker-placement-move-barrier.test.tssrc/gateway/server-worker-placement-provision-cancellation.test.tssrc/gateway/server-worker-placement-reclaim.preparation.test.tssrc/gateway/server-worker-placement-reclaim.test-support.tssrc/gateway/server-worker-placement-reclaim.test.tsx7064: files touched
src/gateway/config-reload.plugin-drain.test.tsProduction LOC: +0 / -0. Test/support LOC: +12906 / -19125; net -6219. 69 changed files.
Ratchet metadata: config/test-mock-exports-baseline.txt: +0 / -22 (exact CI-reported stale entries only).
Settlement on current main
Rebased all 33 branch commits onto
27af6ba36d11d10566950173ed7720f984aa920d. Dropped every cleanup hunk insrc/gateway/openai-http.test.tsandsrc/gateway/worker-environments/worker-turn-execution.test.ts, retaining current main byte-for-byte in both files to preserve newer streaming/tool-error and revocation-at-commit coverage. No other commit was skipped.The rebased delta is 68 files, +11,570/-16,768 lines, all test/support and shrink-only baseline metadata; zero production changes. This supersedes the prior-head net reduction above. Plain oxlint exited 0 on all 67 changed TypeScript files; oxfmt check and git diff --check passed. No local tests, typechecks, coverage, or Testbox runs were performed. Fresh independent review and exact-head PR CI are required for this head.
The superseded run 38937630865 failed skill-library-worker-wire E2E because its mock Responses stream ended without a terminal event, plus three Matrix account-root PostgreSQL portability cases (pending inbound-dedupe migration; resume/rollback observed zero writes instead of two). These old failures have not been waived or claimed proven pre-existing. The rebased head is judged by fresh CI.
Settlement review and final candidate
Fresh three-pass independent P0-P2 review identified one accepted coverage gap: restored the original model-only hot-reload test, including model aliases, per-agent model selection, provider settings, no plugin replacement, and no Gateway restart. The 28-line restoration passed a separate scoped P0-P2 review with no actionable findings.
Two findings were rejected after inspecting the owning code: the Responses helper API key is optional through ProviderStreamOptions -> Llm.StreamOptions; sidebar teardown is already owned by setupSidebarTest (real timers, DOM removal, context lifecycle reset) and createTestSessionCapability (onTestFinished disposal). No competing cleanup was added.
Rebased the repaired branch onto
5d2dc718db0dff275aefc422dfc19d2c43dbb4bc. Range-diff confirms the 33 previously reviewed commits are patch-identical; only the reviewed coverage-restoration commit was added. Candidate head:1b529438e82218a661a75cc7d65f0e0e0f0643b7. Current delta: 68 files, +11,570/-16,740 lines (net -5,170), zero production changes. Oxfmt and diff checks passed on the rebased head; plain lint and exact-head CI remain the publication gates. No local tests, typechecks, coverage, Testbox, or AWS runs.The intermediate head's UI shard failed collection in untouched
ui/src/components/link-reader-metadata.test.ts, which imports retired./link-reader-panel.ts. The exact same job/suite/import error is proven on scheduled main run 39013936147. This evidence applies only to that signature; all other failures require separate classification.Integrate identified main repairs
Run 39014859103 passed UI but reported new failures outside the batch: process mock-export annotation, plugin install-record fixture types, PostgreSQL memory retrieval, and a different worker-wire E2E turn error. Main already contains
e476f877615(constructor-key fixture types) and90e9222398a(PostgreSQL watcher fixtures), so the branch was rebased onto8fc3509a66ad89028e1bd15c027a5426373cd977to include those repairs. No batch code changed: range-diff confirms all 34 reviewed patches are identical. Candidate17b9ba437bcda8d0ebe3b1a5e57d1670bd63b9dc; oxfmt, plain oxlint and diff checks are rerun before push. No local tests/typechecks/remote leases.The process mock failure is outside the batch's 22 shrink-only baseline removals and has not been waived. The worker-wire turn failure remains unproven and eligible for the single operator-authorized failed-job rerun after CI completes. No rerun has yet been used. One PostgreSQL vector-publication failure matches scheduled-main run 39013936147, but the distinct result-cap failure is not claimed proven pre-existing. Fresh exact-head CI decides which remain.
Resolve newer-main conflict and process-mock repair
Run 39015657853 passed the previously failing worker-wire E2E, UI, type checks, and PostgreSQL integrations; its only failure observed before supersession was the unrelated process mock-export annotation (PostgreSQL infra was still running). Main then became conflicting and acquired
98375d4b624, the exact mock-isolation repair, so the branch was rebased onto3a7085249382e661c419770f7291860a05c19274.Dropped all cleanup from
ui/src/components/app-sidebar.background-scope.test.tsto preserve main's revised pending-list/frame regression. That file, plus the two earlier conflicted Gateway files, now matches main exactly. No test assertion was weakened and no timeout was changed. Remaining reviewed patches are retained; no commit skipped entirely.Candidate
f8349c0bc166f1fe406863f4e30d5b10caba7812: 67 files, +11,271/-16,311 lines (net -5,040), zero production changes. Plain oxlint exited 0 and oxfmt passed on all 66 remaining TS files; diff check passed. Independent review plus the scoped-clean coverage-restoration review remain applicable; this rebase only drops the conflicted cleanup. Fresh exact-head CI is required. No rerun or merge exception has been used; no local tests/typechecks/leases.