Repository navigation
ci(lint): enable boolean literal comparison rule - #1567
Conversation
No other confident findings in the specified diff. |
|
Addressed the P1 verification-record request in the PR description. After That is a compiled-CLI exercise of the changed default environment-delivery path. |
SaulMoro
left a comment
There was a problem hiding this comment.
This was generated by AI during triage.
@huong8373tt-beep Thanks. Checked at aafaf19a:
npm run lintpasses. It runs with--deny-warnings, so the newwarnrule is a hard CI gate, as intended.tscand the build pass.- The four changed test files pass, 77/77 here and on main.
- With the built CLI,
init,pullandenv execgive the same output on main and this head. - The verification record you added to the body covers the CI review's missing-record point.
Non-blocking:
- [P2 non-blocking] Two edits the rule does not ask for. With the rule turned on at main, oxlint reports 25 comparisons, not 27. The two extra edits are the
inheritUserScope === true→(inheritUserScope ?? false)changes insrc/resources/env.ts(around lines 474 and 551). They are equivalent, but they are outside the rule. Please drop them or say why they belong, and correct the count in the body. - [P2 non-blocking] Values read from untyped JSON. Six sites read a boolean from JSON that is only typed by declaration. For a stored value that is not a real boolean, the rewrite changes behavior. Example:
src/local-agent.ts:764now readsfileConfig.disabledas truthy, so a hand-edited"disabled": "false"disables the source, where=== truedid not. Declaring such fields asboolean | undefinedkeeps the strict comparison, and the rule does not flag nullable types. - [P3 nit] The
recordedexpression insrc/coauthor-reconcile.ts:466is harder to read after the rewrite. A few?? truefallbacks sit on fields a zod default already fills. Some test assertions now acceptundefined.
The GITHUB_OPENSOURCE_SCAN_PIPELINE@PULL_REQUEST check fails at this head. It passes on other open PRs, and its details are not public.
@jeff-r2026 Your call. Nothing here blocks from my side apart from that failing scan check.
|
No confident findings in the specified diff. The earlier [P1 blocking] Missing real-CLI verification record is resolved: the updated description records a post-build run using Review was read-only; I did not run, build, or install PR code. |
|
Addressed the semantic-safety and scope feedback in
Validation passed: This keeps the intended |
SaulMoro
left a comment
There was a problem hiding this comment.
This was generated by AI during triage.
@huong8373tt-beep Thanks, the points that mattered are fixed at 655b7f6a. The two inheritUserScope edits are gone. The six reads of JSON-sourced values are back to main's strict form: a stored "disabled": "false" now behaves the same as on main. With the built CLI, env delivery and that case give the same output on main and this head. With only this rule enabled, oxlint reports 25 comparisons on main and 0 on this head. The CodeCC scan now passes.
Still open, non-blocking:
- The body still says 27 comparisons; it is 25.
- The
recordedrewrite insrc/coauthor-reconcile.ts:466is still there. Your reply says it was reverted, but this commit does not touch that file. - [P3 nit] The
?? truefallbacks on zod-defaulted fields, and the test assertions that acceptundefined.
Three macOS Lint & Test jobs were still running when I checked. None had failed.
@jeff-r2026 Nothing blocking from my side once those jobs are green.
* ci(lint): enable boolean literal comparison rule * ci(lint): preserve strict boolean semantics
Summary
typescript/no-unnecessary-boolean-literal-compareas an oxlint warningundefinedbehavior where those distinctions matterPart of #836.
Validation
npm run typechecknpm run lintnpm run buildnpm exec -- oxlint --config .oxlintrc.jsonon all changed files (0 warnings/errors)npx vitest run src/__tests__/coauthor-reconcile.test.ts src/__tests__/push-namespaces.test.ts src/__tests__/trae.test.ts(57 passed)npx vitest run src/__tests__/hooks-security.test.ts(20 passed)workflow-local-drivercases (3 passed)Real-CLI verification
After
npm run build, used the builtdist/index.jsin an isolated temporary HOME with a local bare team repository whoseenv/env.yamlcontainsTEAMAI_PR1567_FLAG=verified-default-env:The run exercises the changed default-true environment-delivery path through the compiled CLI. The broader local workflow/session suite hit known Windows-specific test-environment issues unrelated to this diff (POSIX shell/file-mode assertions, plus the existing Claude malformed-session assertion); CI covers those targets on its native runners.