Repository navigation
Conversation
Use an erased named Electron owner type and optional numeric test-global declaration instead of a broad object parameter and reflected reads.
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 25 minutes. View limit detailsLimit details: You’ve used all 10 included reviews currently available. Review configuration: ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (1)
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. Comment |
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
- Named Electron host type —
type ElectronEvaluateHost = Partial<typeof Electron>replaces the broadobjectparameter annotation on the mockedevaluatecallback, clearinganti-slop/no-object-parameters. - Typed global access —
declare global { var __terminalPtyWriteDelayMs: number | undefined }lets the assertions readglobalThis.__terminalPtyWriteDelayMsdirectly instead of viaReflect.get, clearing bothanti-slop/no-reflect-gethits. Callbacks, arguments, assertions,vi.stubGlobal, and cleanup are unchanged.
Verified locally: the anti-slop audit and root oxlint report 0 findings, check-changed-code-quality.mjs passes all six scans, tsc -p config/tsconfig.e2e.json reports no error for the file, and the test still passes (1/1). The two direct reads are equivalent to the removed Reflect.get for the stubbed data property, so the test still fails if the helper stops writing the global.
deepseek-v4.1-flash (free via Pullfrog for OSS) | 𝕏

This PR is superseded by main and will be closed without merging. Main
1241ce1b49ac1dade61c371d96b235610f40ff65already removes the three documented static findings with its own reviewed test fixture. Its fixture SHA-256 isb9f1b0d91f8bb374c39e2167953f89d6c8a05302cfd82c220ba9ed0d8a236caf, unchanged from the named main used in the independent integration review. Main deliberately passesundefinedto the mocked first callback argument; this older PR must not overwrite that newer fixture.The exact main fixture/helper strict compiler passes, and the fixture/retry controls pass 8 tests across 2 suites. No Electron application runs. The original PR's green CI and review remain historical evidence; other older-head PRs need their own current-head qualification. No branch is deleted and nothing is merged.
The original proposal and validation follow for history.
ELI5
The terminal test describes the values it uses, so the existing code checker can verify it without rejecting an otherwise working test.
What Changed
A fixture recently added on main caused three failures in the full static audit: a broad object argument and two reflected property reads. Its mock now names the partial Electron owner and declares the optional numeric test global, allowing direct typed reads. Callback arguments, both awaited calls, assertions, values and global cleanup are unchanged. This PR contains only that test fixture.
Why
The full audit correctly scans unchanged files when a code PR runs. Repairing the fixture preserves that rule and avoids suppressions or narrower coverage. This is a separate CI readiness fix needed by performance PRs such as #24557 and #24558, not an application optimization.
Linked Issue
Internal performance audit; no pre-existing issue. CI fixture repair relates to #24557 and #24558.
Visual Proof
N/A — cleanup or test-only types; live UI and interaction behavior remain unchanged.
Testing
Exact newer-main stock fixture reproduces the same three scanner errors; repaired fixture reports zero. Author and independent reviewer each pass nine tests across the stock/fixed fixture and existing retry suite, using an isolated alias to the exact newer-main helper. Strict focused TypeScript and ordinary/scoped lint/format pass. Compiled-token and VM parity preserve two callbacks with arguments and values 35/0, removal of the stub global, original Error identity, negative-to-zero, NaN and Infinity behavior. No Electron app or window launches. This branch is parented on newer main, where the two-argument helper already exists.
All test launches used ORCA_BACKGROUND_LAUNCH=1.
Review
Independent audit_renderer review approved the frozen file hashes, reproduced the original regression and checked final compatibility.
Agent skill upstream boundary
Notes
Test-only type repair; no production helper, scanner rule, suppression, workflow, credentials, input/focus, transport, wire, remote host or workspace behavior changes. Local macOS unit and strict compiler evidence; full newer-main CI and native platform runs remain pending. Performance PRs blocked by these baseline errors should rerun against the repaired main after this independent PR lands; nothing has been merged.
Checklist