Repository navigation
fix(scripts): drop redundant boolean comparison in worker detection - #124668
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs maintainer review before merge. Reviewed August 16, 2026, 11:40 AM ET / 15:40 UTC. ClawSweeper reviewWhat this changesThe PR removes a redundant strict-true comparison from the changed-check worker detector so the scripts lint lane accepts the condition without changing its boolean result. Merge readinessNo blocking findings. Current main retains the lint-invalid condition, and this maintainer-owned, protected-label PR should remain open for normal exact-head CI and merge handling. Likely related people: steipete (high confidence, recent worker-routing contributor). Priority: P3 Review scores
Verification
How this fits togetherThe changed-check script classifies changed files and decides whether to run validation locally or delegate it to a remote runner. The worker-environment detector feeds that routing decision before dependency readiness selects local gates or remote execution. flowchart LR
A[Changed files] --> B[Changed-check planner]
B --> C[Worker environment]
C --> D{Dedicated Linux worker?}
D --> E[Local dependency check]
D --> F[Remote runner]
E --> G[Local validation gates]
Before merge
Agent review detailsSecurityNone. PR surfaceOther 0. Total 0 across 1 file. View PR surface stats
Review metrics
Technical reviewBest possible solution: Keep the direct boolean condition and merge once the exact PR head has completed the required lint and CI gates. Do we have a high-confidence way to reproduce the issue? Yes—current main contains the exact boolean comparison at scripts/check-changed.mts:245, and the surrounding type declarations establish the source-level lint violation; this review did not rerun the lint command locally. Is this the best way to solve the issue? Yes—the nullish-coalesced expression is already used solely as a condition and is boolean on this path, so removing the redundant comparison is the narrowest maintainable repair. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 886e5c049005. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
Merged via squash.
|
What Problem This Solves
mainis red oncheck-lint, which blocks the merge gate for every open PR:Confirmed on
mainitself (run 31955692694, commiteb174bcaffd, jobcheck-lint), not only on PR branches. Three unrelated PRs hit the identical failure.Why This Change Was Made
ChangedCheckDelegateOptions.interactiveisboolean | undefinedandprocess.stdin.isTTYisboolean, sooptions.interactive ?? process.stdin.isTTYalready narrows toboolean. The=== truecomparison is redundant and the type-aware rule is correct to reject it.Dropping the comparison is behavior-preserving across all three cases:
trueandfalsekeep their truthiness, and anundefinedfallback result was already falsy under=== true.User Impact
None at runtime. This only unblocks CI.
Evidence
node scripts/run-oxlint.mjs --tsconfig config/tsconfig/oxlint.scripts.json scripts/check-changed.mts— clean (exit 0).node scripts/run-vitest.mjs test/scripts/changed-lanes.test.ts— 151 passed, 1 failed, and that same test (runs trusted changed gates on a dedicated Linux worker) fails identically on unmodifiedorigin/mainin this environment while passing on hosted CI, so it is ambient-environment sensitivity rather than a regression from this change. Recorded here rather than fixed, since it is a separate defect from the lint break this PR unblocks.