Repository navigation
test: remove redundant checks and strengthen runtime assertions - #33498
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:
e92876f5-d245-4548-848b-560ea86f199a
Files selected for processing: 17-
config/scripts/check-changed-code-quality.test.mjsconfig/scripts/electron-vite-output-contract.test.tsconfig/scripts/locale-collator-sort-benchmark.mjsconfig/scripts/pr-preflight-gates.test.mjssrc/cli/paired-terminal-desktop-reveal.test.tssrc/cli/runtime-client-deferral.test.tssrc/main/agent-hooks/managed-hook-stdin-lifecycle.test.tssrc/main/runtime/agent-prompt-submission-runtime.test.tssrc/main/runtime/mobile-cloud-relay/relay-auth-coordinator.test.tssrc/main/runtime/mobile-cloud-relay/relay-auth-host-close-reason.test.tssrc/main/runtime/mobile-cloud-relay/relay-control-client.test.tssrc/main/runtime/mobile-cloud-relay/relay-control-origin.test.tssrc/main/runtime/mobile-cloud-relay/relay-demand-ledger.test.tssrc/main/runtime/mobile-cloud-relay/relay-region-correction.test.tssrc/main/runtime/mobile-cloud-relay/relay-region-preference.test.tssrc/main/runtime/mobile-cloud-relay/relay-session-broker.test.tssrc/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) |
There was a problem hiding this comment.
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
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.