Repository navigation
test: strengthen stateful assertions and remove redundant checks - #33020
Conversation
|
No actionable comments were generated in the recent review.
|
There was a problem hiding this comment.
Actionable comments posted: 1

Review info
-
Run configuration-
- Source mode: Auto
- Repository: Unavailable
- Branch: Unavailable
- File: No configuration file from this repository applied
- Commit: Unavailable
- Layers: Repository UI
- Review profile: CHILL
- Plan: Advanced
- Run ID:
988ce3b8-1392-4f1e-827b-001a88e0af15
Files selected for processing: 12-
config/scripts/pr-code-change-scope-windows-process-probe.test.mjsconfig/scripts/rebuild-native-deps-node-pty.test.mjsmobile/src/mock-server-session-tabs-fixture.test.tsmobile/src/mock-server-terminal-fixture-routing.test.tsmobile/src/navigation/host-stack-navigation.test.tsmobile/src/navigation/query-string-named-exports.test.tssrc/shared/agent-hook-listener-antigravity.test.tssrc/shared/agent-hook-listener-codex-approval-ownership.test.tssrc/shared/agent-hook-listener-codex-main-agent.test.tssrc/shared/agent-hook-listener-omp-approval-ownership.test.tssrc/shared/agent-hook-listener-opencode-reattribution.test.tssrc/shared/agent-hook-listener-opencode-session-registry.test.ts
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 7 remain after this review.
-
| } from '../scripts/mock-server-rpc-handlers' | ||
| import type { RpcRequest, RpcResponse } from '../scripts/mock-server-rpc-handlers' | ||
|
|
||
| let handleRequest: typeof import('../scripts/mock-server-rpc-handlers').handleRequest |
There was a problem hiding this comment.
🎯 Functional Correctness |
Replace the inline import type in both fixture tests.
React Doctor rejects typeof import(...) at Line 5. The supplied pipeline reports the same failure at Line 5 of mobile/src/mock-server-terminal-fixture-routing.test.ts, so static analysis fails for both files. Import the handler type by name instead.
Proposed change for each fixture test
-
-import type { RpcRequest, RpcResponse } from '../scripts/mock-server-rpc-handlers' +import type { + handleRequest as handlerType, + RpcRequest, + RpcResponse, +} from '../scripts/mock-server-rpc-handlers' -let handleRequest: typeof import('../scripts/mock-server-rpc-handlers').handleRequest +let handleRequest: typeof handlerType
🧰 Tools
-
🪛 GitHub Actions: PR 33020 | source 948933af78bb355f71185935b1ebf5359b167ba5 | workflow 948933af78bb355f71185935b1ebf5359b167ba5 | unit full / 15_static analysis and typecheck.txt
-
[error] 5-5: React Doctor reported typescript/consistent-type-imports:
import()type annotations are forbidden.
🪛 GitHub Actions: PR 33020 | source 948933af78bb355f71185935b1ebf5359b167ba5 | workflow 948933af78bb355f71185935b1ebf5359b167ba5 | unit full / static analysis and typecheck
-
[error] 5-5: React Doctor: typescript/consistent-type-imports —
import()type annotations are forbidden.
-
Source: Pipeline failures
Existing tests could pass after a missing Codex child, conflicting relay state, stale OMP approval preview, incorrect OpenCode eviction order, or broken mobile routes. Strengthen their setup and expected outputs, isolate mobile mock-server settings, and assert the full Antigravity request preview without a leaking global spy.
Remove the duplicate OMP yolo case and a workflow-string check that still passes when the actual Windows probe command is disabled. Retain the behavioral routing/native rebuild coverage and narrow titles to what their fixtures exercise. No production changes.
Validation: 202 focused cases pass, with seven Windows-only registrations skipped on Linux. Node typecheck, mobile test-typecheck ratchet, changed-code quality, formatting and commit hooks pass. Regression probes confirm the repaired gaps and retained coverage. The grouped audit covers 23 source/support files; local audit artifacts remain uncommitted.