Skip to content

test: strengthen stateful assertions and remove redundant checks - #33020

Merged
OrcaWin merged 3 commits into
mainfrom
OrcaWin/comprehensive-test-audit-25
Oct 24, 2026
Merged

OrcaWin merged 3 commits into
mainfrom
OrcaWin/comprehensive-test-audit-25

Conversation

@OrcaWin

@OrcaWin OrcaWin commented Oct 24, 2026 •

Copy link
Copy Markdown
Collaborator
Files Added Deleted Net
Test 12 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​96 $\color{#cf222e}{\Huge{\mathbf{−}}}$​74 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​22
Prod 0 0 0 0

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.

@OrcaWin OrcaWin changed the title test: exercise relay conflicts and full transcript previews test: strengthen stateful assertions and remove redundant checks Oct 24, 2026
@OrcaWin
OrcaWin marked this pull request as ready for review October 24, 2026 03:44
@coderabbitai

coderabbitai Bot commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent 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: 5f681ca4-7307-41af-9147-4ecf9eba719c
Commits

Reviewing files that changed from the base of the PR and between fff450f and c571aac.

Files selected for processing: 2
  • mobile/src/mock-server-session-tabs-fixture.test.ts
  • mobile/src/mock-server-terminal-fixture-routing.test.ts
Files skipped from review as they are similar to previous changes: 2
  • mobile/src/mock-server-session-tabs-fixture.test.ts
  • mobile/src/mock-server-terminal-fixture-routing.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.

Walkthrough

The pull request updates tests across configuration scripts, mobile fixtures and navigation, and agent-hook behavior. The changes adjust mock-server setup, make navigation expectations explicit, and refine assertions for agent payloads, ownership, approvals, and session handling. One node-pty test description changes without changes to its assertions.

Priority: Low

Merge Risk: Minimal · up to c571a

The fixture import issue is fixed, and no remaining merge-blocking issue is identified.

Pre-merge checks: Passed 3 · Failed 2

Failed Failed checks: 2 warnings

Check name Status Explanation Resolution
Description check Warning The description contains the auto-generated LoC summary and a prose summary of the changes, the rationale, validation results, and the audit scope. However, it omits the required template sections: EL… Restructure the description to follow the repository template. Add an ELI5 section in plain language. Add a What Changed section that states the before and after behavior of the tests. Add a Why section that explains why these assertions ar…
Docstring Coverage Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 12 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 3 passed
Check name Status Explanation
Title check Passed The title "test: strengthen stateful assertions and remove redundant checks" matches the main change. The PR strengthens test assertions across 12 test files (Codex child, relay state, OMP approval, O…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title "test: strengthen stateful assertions and remove redundant checks" matches the main change. The PR strengthens test assertions across 12 test files (Codex child, relay state, OMP approval, OpenCode eviction, mobile routes) and removes a duplicate OMP yolo case and a workflow-string check. It contains no production changes. The title is concise, specific to the test-only scope, and uses the conventional test: prefix.

Full details: Description check

Explanation

The description contains the auto-generated LoC summary and a prose summary of the changes, the rationale, validation results, and the audit scope. However, it omits the required template sections: ELI5, What Changed (in the template's before/after sense), Why as a separate section, Linked Issue (Fixes #, required for outside contributors), Visual Proof (N/A with reason would be needed since this is test-only), Testing checkboxes, AI Disclosure, Review, Agent skill upstream boundary checkbox, Notes, and Checklist. The description does not follow the template structure, and the linked issue is missing.

Resolution

Restructure the description to follow the repository template. Add an ELI5 section in plain language. Add a What Changed section that states the before and after behavior of the tests. Add a Why section that explains why these assertions are stronger than the alternatives. Add a Linked Issue section with a real issue reference (Fixes #<number>), because outside contributors must link an actual issue. Add a Visual Proof section that reads N/A with a reason, since the change is test-only. Complete the Testing checkboxes and state the platforms tested (Linux was used; Windows-only registrations were skipped). Fill in or mark AI Disclosure. Complete the Review and Agent skill upstream boundary checkboxes. Add the Notes and Checklist items, and check them off if they apply.

Finishing Touches: 💡 1
📝 Generate docstrings: 💡
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai 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.

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
Commits

Reviewing files that changed from the base of the PR and between 4d22306 and fff450f.

Files selected for processing: 12
  • config/scripts/pr-code-change-scope-windows-process-probe.test.mjs
  • config/scripts/rebuild-native-deps-node-pty.test.mjs
  • mobile/src/mock-server-session-tabs-fixture.test.ts
  • mobile/src/mock-server-terminal-fixture-routing.test.ts
  • mobile/src/navigation/host-stack-navigation.test.ts
  • mobile/src/navigation/query-string-named-exports.test.ts
  • src/shared/agent-hook-listener-antigravity.test.ts
  • src/shared/agent-hook-listener-codex-approval-ownership.test.ts
  • src/shared/agent-hook-listener-codex-main-agent.test.ts
  • src/shared/agent-hook-listener-omp-approval-ownership.test.ts
  • src/shared/agent-hook-listener-opencode-reattribution.test.ts
  • src/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

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.

🎯 Functional Correctness | Major | ⚡ Quick win

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

@OrcaWin
OrcaWin merged commit 2fd28bd into main Oct 24, 2026
35 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant