Skip to content

test: strengthen hook, navigation, and release coverage - #33028

Merged
OrcaWin merged 2 commits into
mainfrom
OrcaWin/comprehensive-test-audit-27
Oct 24, 2026
Merged

OrcaWin merged 2 commits into
mainfrom
OrcaWin/comprehensive-test-audit-27

Conversation

@OrcaWin

@OrcaWin OrcaWin commented Oct 24, 2026 •

Copy link
Copy Markdown
Collaborator
Files Added Deleted Net
Test 15 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​245 $\color{#cf222e}{\Huge{\mathbf{−}}}$​101 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​144
Prod 0 0 0 0

Existing tests could pass while hooks lost prompt text or assigned stale ownership, navigation dropped destinations/options, or release workflows skipped refusal checks or requested excess permissions. Strengthen existing cases with distinct inputs and independent output assertions; unmount test renderers and close bridge clients after each case.

Replace copied Git flag checks with a real nested-checkout diff and remove one RPC-constant declaration. Narrow two titles to the behavior exercised. No production changes.

Validation: 220 focused cases pass without skips across 16 reviewed sources (188 declarations become 186); 15 test files change. Node typecheck, mobile test-typecheck ratchet, changed-code quality, React Doctor, formatting and commit hooks pass. Regression and cleanup probes confirm repaired gaps and retained coverage. Exact committed source hashes match the tested inputs; local audit artifacts remain uncommitted.

@OrcaWin OrcaWin changed the title test: strengthen hook identity and transport assertions test: strengthen hook, navigation, and release coverage Oct 24, 2026
@OrcaWin
OrcaWin marked this pull request as ready for review October 24, 2026 04:13
@coderabbitai

coderabbitai Bot commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Walkthrough

The pull request updates tests in configuration scripts, mobile navigation, and shared agent-hook modules. The changes add checks for checkout diff paths, workflow permissions, navigation handoff frames, workspace routing options, listener correlation, relay roster restoration, transport headers, and notification IDs. Several mobile tests also add cleanup for mounted renderers and bridge clients.

Priority: Low

Merge Risk: Low · up to b8308

Route-loss regression coverage is weaker, but no current route failure is shown. Restore the inventory baseline before merging or accept the bounded test gap.

Pre-merge checks: Passed 3 · Failed 2

Failed Failed checks: 2 warnings

Check name Status Explanation Resolution
Description check Warning The description explains the main changes and validation results, but it omits most required template sections, including ELI5, Why, Linked Issue, Visual Proof, Testing checkboxes, AI Disclosure, Revi… Complete the required template sections. Add the linked issue, visual proof or an explicit N/A with a reason, testing details and checkboxes, AI disclosure when applicable, review notes, cross-platform and compatibility considerations, and …
Docstring Coverage Warning Docstring coverage is 14.29% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 14 functions across 15 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 clearly summarizes the main change: stronger test coverage for hooks, navigation, and release behavior.
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: Description check

Explanation

The description explains the main changes and validation results, but it omits most required template sections, including ELI5, Why, Linked Issue, Visual Proof, Testing checkboxes, AI Disclosure, Review, Notes, and Checklist.

Resolution

Complete the required template sections. Add the linked issue, visual proof or an explicit N/A with a reason, testing details and checkboxes, AI disclosure when applicable, review notes, cross-platform and compatibility considerations, and the checklist confirmations.

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: 85380ef5-1c96-4473-968c-e482a0b646eb
Commits

Reviewing files that changed from the base of the PR and between 2fd28bd and b830868.

Files selected for processing: 15
  • config/scripts/regenerate-xterm-patches.test.mjs
  • config/scripts/relay-era-ref-refusal-workflow.test.mjs
  • config/scripts/release-cut-token-permissions.test.mjs
  • mobile/src/navigation/route-handoff-host-area.web.test.tsx
  • mobile/src/navigation/route-handoff.web.test.tsx
  • mobile/src/navigation/use-back-claim.web.test.tsx
  • mobile/src/navigation/workspace-route-handoff.test.tsx
  • mobile/src/navigation/workspace-route.test.tsx
  • src/shared/agent-hook-listener-grok-completion.test.ts
  • src/shared/agent-hook-listener-grok.test.ts
  • src/shared/agent-hook-listener-opencode-session-correlation.test.ts
  • src/shared/agent-hook-listener-opencode-tui-identity.test.ts
  • src/shared/agent-hook-relay.test.ts
  • src/shared/agent-hook-transport-interference.test.ts
  • src/shared/agent-notification-id.test.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review.

describe('every workspace route', () => {
it('is found on disk', () => {
expect(WORKSPACE_ROUTE_FILES.length).toBeGreaterThanOrEqual(14)
expect(WORKSPACE_ROUTE_FILES.length).toBeGreaterThan(0)

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 | Minor | ⚡ Quick win

Keep a meaningful workspace-route inventory check.

If all but one workspace route disappears, this assertion passes and the remaining tests inspect only that route. The previous minimum of 14 caught that regression. Retain the supported minimum or assert the expected route paths explicitly.

@OrcaWin
OrcaWin merged commit cc929aa into main Oct 24, 2026
63 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