Skip to content

test: remove redundant checks and strengthen runtime assertions - #33498

Merged
OrcaWin merged 2 commits into
mainfrom
audit/test-value-batch345
Oct 25, 2026
Merged

OrcaWin merged 2 commits into
mainfrom
audit/test-value-batch345

Conversation

@OrcaWin

@OrcaWin OrcaWin commented Oct 25, 2026 •

Copy link
Copy Markdown
Collaborator
Files Added Deleted Net
Test 16 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​195 $\color{#cf222e}{\Huge{\mathbf{−}}}$​267 $\color{#cf222e}{\Huge{\mathbf{−}}}$​72
Prod 2 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​6 $\color{#cf222e}{\Huge{\mathbf{−}}}$​6 0

Several tests could pass before asynchronous work settled, without forwarding the requested prompt input, or without reading the lazy client twice. Strengthen those assertions, use fake clocks for relay linger boundaries, and exercise actual scanner output and CLI unpack-path matching.

Remove eight redundant or misleading tests: four literal build-config inventories, a copied CI step inventory, a duplicate sanitizer example, a constant-only relay deadline check, and a region-threshold case whose owner never applies that threshold. Repair relay assignment fixtures to match the wire contract and fix the locale benchmark’s moved import and comparison locale. Seventeen test/support files and the pruned flaky-test baseline change; application code is unchanged.

Audited 40 sources and 413 authored declarations: 372 keep, 33 repair, 8 remove. This includes 28 newly audited sources and 12 stale-review reconciliations. Local original/candidate runs, focused lint/format checks, and independent evidence validators passed. Deliberate owner faults confirm prompt forwarding, client memoization, host binding, and linger assertions. One optional ast-grep matcher remains locally unvalidated; full PR CI must cover it and typechecking. Windows/native-focus behavior was not exercised locally.

@OrcaWin
OrcaWin requested a review from brennanb2025 as a code owner October 25, 2026 10:05
@coderabbitai

coderabbitai Bot commented Oct 25, 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: ff469559-d209-4ac0-bd66-9b463960bea3
Commits

Reviewing files that changed from the base of the PR and between 0097d4a and 76a4f64.

Files selected for processing: 1
  • config/flaky-test-pattern-baseline.txt
Files with no reviewable changes: 1
  • config/flaky-test-pattern-baseline.txt

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 and benchmark setup across configuration scripts, CLI and runtime behavior, and mobile cloud relay components. It adds integration checks for nested lint configuration and focused-plugin diagnostics, changes Electron output checks, and fixes the automation benchmark locale. Relay tests use controlled timers and updated assignment fixtures. Several earlier assertions and tests are removed.

Priority: Low

Merge Risk: Minimal · up to 76a4f

The baseline now matches the coordinator test, with no actionable merge risk identified in the selected change.

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, reasons, testing, known limitations, and scope. It does not follow the required template and omits the mandatory linked issue, visual-proof statement, checkl… Update the description to include the required template sections. Add an actual linked issue after Fixes #, write N/A with a reason under Visual Proof because this is a test-only change, complete the Testing and Checklist items, and add…
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 6 functions across 17 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: removing redundant tests and strengthening runtime assertions.
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, reasons, testing, known limitations, and scope. It does not follow the required template and omits the mandatory linked issue, visual-proof statement, checklist status, and explicit review sections.

Resolution

Update the description to include the required template sections. Add an actual linked issue after Fixes #, write N/A with a reason under Visual Proof because this is a test-only change, complete the Testing and Checklist items, and address Review, AI Disclosure, Agent skill upstream boundary, and Notes as applicable.

  • 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: e92876f5-d245-4548-848b-560ea86f199a
Commits

Reviewing files that changed from the base of the PR and between a4e9000 and 0097d4a.

Files selected for processing: 17
  • config/scripts/check-changed-code-quality.test.mjs
  • config/scripts/electron-vite-output-contract.test.ts
  • config/scripts/locale-collator-sort-benchmark.mjs
  • config/scripts/pr-preflight-gates.test.mjs
  • src/cli/paired-terminal-desktop-reveal.test.ts
  • src/cli/runtime-client-deferral.test.ts
  • src/main/agent-hooks/managed-hook-stdin-lifecycle.test.ts
  • src/main/runtime/agent-prompt-submission-runtime.test.ts
  • src/main/runtime/mobile-cloud-relay/relay-auth-coordinator.test.ts
  • src/main/runtime/mobile-cloud-relay/relay-auth-host-close-reason.test.ts
  • src/main/runtime/mobile-cloud-relay/relay-control-client.test.ts
  • src/main/runtime/mobile-cloud-relay/relay-control-origin.test.ts
  • src/main/runtime/mobile-cloud-relay/relay-demand-ledger.test.ts
  • src/main/runtime/mobile-cloud-relay/relay-region-correction.test.ts
  • src/main/runtime/mobile-cloud-relay/relay-region-preference.test.ts
  • src/main/runtime/mobile-cloud-relay/relay-session-broker.test.ts
  • src/shared/agent-prompt-injection.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.

coordinator.reconcile()
await new Promise((resolve) => setTimeout(resolve, 30))
await vi.advanceTimersByTimeAsync(0)
await vi.advanceTimersByTimeAsync(20)

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.

Major · Maintainability & Code Quality · Quick win

Prune the flaky-test ratchet baseline.

Replacing the real-time delay removes the last test-no-real-time-wait match. The baseline still expects one match, so node config/scripts/run-ratchets.mjs fails in CI. Run pnpm check:flaky-test-pattern-ratchet --prune and include the updated baseline.

Source: Pipeline failures

@OrcaWin
OrcaWin merged commit ca3bad5 into main Oct 25, 2026
38 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