Skip to content

test: consolidate duplicate assertions and strengthen runtime checks - #33173

Merged
OrcaWin merged 1 commit into
mainfrom
OrcaWin/comprehensive-test-audit-132
Oct 24, 2026
Merged

OrcaWin merged 1 commit into
mainfrom
OrcaWin/comprehensive-test-audit-132

Conversation

@OrcaWin

@OrcaWin OrcaWin commented Oct 24, 2026 •

Copy link
Copy Markdown
Collaborator
Files Added Deleted Net
Test 13 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​59 $\color{#cf222e}{\Huge{\mathbf{−}}}$​38 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​21
Prod 0 0 0 0

Consolidates three duplicate endpoint and signed-out assertions into retained tests with the same inputs. Strengthens navigation targets, credential cleanup, relay callback counts and failure streaks, browser ownership and link delivery, and Windows probe digests and preparation ordering.

Reviewed 24 test sources; 203 declarations become 200 across 13 changed test files. Existing system-only link coverage is retained.

Validation: 276 baseline cases and 273 final cases pass with no skips; Node, CLI and renderer typechecks, the mobile test typecheck ratchet, changed-code quality, formatting and commit hooks pass. Isolated fault controls confirm repaired and retained assertions. Full CI will validate the committed head before merge.

@coderabbitai

coderabbitai Bot commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Walkthrough

The changes update tests across Windows scripts, mobile transport, and renderer libraries. The tests check an exact fixture digest, benchmark phase names, credential cleanup and storage results, host routing and endpoint expectations, relay verdicts, worktree activation, link actions, and local-path ownership. Some endpoint assertions and one signed-out test were removed.

Priority: Low

Merge Risk: Low · up to 2fa9f

The benchmark test should enforce preparation ordering before merge to prevent sequencing regressions from going unnoticed.

Pre-merge checks: Passed 3 · Failed 2

Failed Failed checks: 2 warnings

Check name Status Explanation Resolution
Description check Warning The description provides a useful change summary and detailed validation results, but it omits most required template sections, including ELI5, Why, Linked Issue, Visual Proof or N/A, Review, Notes, a… Add the missing required sections. Include an actual linked issue under Linked Issue, explain why this approach was selected, state N/A with a reason for Visual Proof because this is a test-only change, and complete the Review, Notes, and C…
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 1 functions across 11 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 changes: consolidating duplicate test assertions and strengthening runtime checks.
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 provides a useful change summary and detailed validation results, but it omits most required template sections, including ELI5, Why, Linked Issue, Visual Proof or N/A, Review, Notes, and the Checklist. The required issue link is also missing.

Resolution

Add the missing required sections. Include an actual linked issue under Linked Issue, explain why this approach was selected, state N/A with a reason for Visual Proof because this is a test-only change, and complete the Review, Notes, and Checklist sections.

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: 10412481-0cf3-496b-b50a-f8b6d46facc3
Commits

Reviewing files that changed from the base of the PR and between e30184f and 2fa9fde.

Files selected for processing: 13
  • config/scripts/windows-pty-table-stress-observer.test.mjs
  • config/scripts/windows-security-reuse-benchmark.test.mjs
  • mobile/src/transport/host-credential-cleanup.test.ts
  • mobile/src/transport/host-edit-navigation.test.ts
  • mobile/src/transport/host-endpoint-edit.test.ts
  • mobile/src/transport/host-endpoint.test.ts
  • mobile/src/transport/host-store-endpoint.test.ts
  • mobile/src/transport/relay-host-reachability-latch.test.ts
  • mobile/src/transport/relay-host-signed-out-supervisor.test.ts
  • mobile/src/transport/relay-host-signed-out-verdict.test.ts
  • src/renderer/src/lib/browser-workspace-tab-activation.test.ts
  • src/renderer/src/lib/http-link-destinations.test.ts
  • src/renderer/src/lib/local-path-open-guard.test.ts
Files with no reviewable changes: 2
  • mobile/src/transport/host-endpoint.test.ts
  • mobile/src/transport/host-endpoint-edit.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.

Comment on lines +364 to +365
expect(phases).toContain('verify-prepared-node')
expect(phases).toContain('warm-compiler-before-measurement')

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.

Minor · Functional Correctness · Quick win

🔎 Supported by static analysis

Script executed:

set -eu
file='config/scripts/windows-security-reuse-benchmark.test.mjs'
printf '%s\n' '--- matching phase references ---'
rg -n -F -e 'phases' -e 'verify-prepared-node' -e 'warm-compiler-before-measurement' "$file" || test "$?" -eq 1
printf '%s\n' '--- surrounding test block ---'
sed -n '300,390p' "$file"
printf '%s\n' '--- changed-file diff against supplied merge base ---'
git diff --unified=40 e30184fa8d383e9ae011e0fa0d3ea89df29f7cb2 2fa9fde5216bda93618a847c882e31e7aa3c3b4e -- "$file"

Repository: stablyai/orca

Length of output: 7856


Assert the relative phase order.

The existing index checks only require both phases to occur before control-full-build-and-probe. They do not require verify-prepared-node to occur before warm-compiler-before-measurement.

Suggested fix
--- "a/config/scripts/windows-security-reuse-benchmark.test.mjs"
+++ "b/config/scripts/windows-security-reuse-benchmark.test.mjs"
@@ -361,8 +361,10 @@
       report.samples.every((sample) => sample.fullCommandMs >= sample.buildIncludingReuseProbesMs)
     ).toBe(true)
     const phases = report.phases.map((phase) => phase.label)
-    expect(phases).toContain('verify-prepared-node')
-    expect(phases).toContain('warm-compiler-before-measurement')
+    const verifyPreparedNode = phases.indexOf('verify-prepared-node')
+    const warmCompiler = phases.indexOf('warm-compiler-before-measurement')
+    expect(verifyPreparedNode).toBeGreaterThanOrEqual(0)
+    expect(warmCompiler).toBeGreaterThan(verifyPreparedNode)
     expect(phases.indexOf('verify-prepared-node')).toBeLessThan(
       phases.indexOf('control-full-build-and-probe')
     )
Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
expect(phases).toContain('verify-prepared-node')
expect(phases).toContain('warm-compiler-before-measurement')
const verifyPreparedNode = phases.indexOf('verify-prepared-node')
const warmCompiler = phases.indexOf('warm-compiler-before-measurement')
expect(verifyPreparedNode).toBeGreaterThanOrEqual(0)
expect(warmCompiler).toBeGreaterThan(verifyPreparedNode)

@OrcaWin
OrcaWin merged commit 3515797 into main Oct 24, 2026
56 of 58 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