Repository navigation
ci(lint): guard POSIX-only Windows test fixtures - #1608
huong8373tt-beep wants to merge 4 commits into
Conversation
Testing: The description meets the stated minimum: it records a successful build and real-CLI runs ( |
There was a problem hiding this comment.
This was generated by AI during triage.
[P1 blocking] This deletes checks that the new rule does not replace. windows-test-list.test.ts loses its POSIX_ONLY scan, but teamai/windows-test-safety only covers spawn/exec of a shell and chmod/symlink. Three of the removed patterns have no equivalent now:
- a shebang fixture (
#!/bin/...,#!/usr/bin/...); - a pinned
bash -lcrendering, with itsvi.spyOn(process, 'platform'/commandWindowsexemption; sh -cinside a string.
A Windows-listed test that asserts expect(rendered).toBe('bash -lc …') with no platform pin failed the old scan and now passes lint. Either port those three checks, with the exemption, or keep the Vitest scan for them until they are ported.
[P1 blocking] The branch conflicts with main in oxlint-plugin-teamai/index.js and .oxlintrc.json after #1601, #1602 and #1604. Please rebase and keep every existing rule.
[P3 nit] WINDOWS_TEST_FILES repeats WINDOWS_TESTS. The equality test keeps them in step, so it's fine, but a one-line comment on WINDOWS_TESTS pointing at the copy would save the next person a red build. windows-test-list.test.ts has no newline at end of file.
@jeff-r2026 Your call once both are fixed.
ab880b1 to
edf6086
Compare
|
Rebased onto current The replacement rule now covers process and filesystem POSIX calls, while the existing Vitest scanner is retained for the three fixture-only checks it does not replace: shebang fixtures, unpinned Post-rebase validation: Windows rule + list tests 39 passed, typecheck passed, lint 0 warnings/errors, build passed, built CLI Slai Agent Runtime performed the investigation, implementation, and test execution. The account owner authorized this contribution and is responsible for its content. |
|
No new findings in the scoped diff.
I only read the requested diff; I did not run, build, or install PR code. |
SaulMoro
left a comment
There was a problem hiding this comment.
This was generated by AI during triage.
Re-checked at edf60865. Both blockers are fixed: the Vitest scan keeps the shebang, bash -lc (with its exemption) and sh -c checks, and the rebase keeps every existing rule registered.
[P3 nit] The renamed test, "keeps fixture-only POSIX constructs platform-pinned", promises more than it checks: only bash -lc has a pin exemption, and a shebang or sh -c fails regardless. The old name, "has no POSIX-only construct", still fits.
[P3 nit] .oxlintrc.json and oxlint-plugin-teamai/index.js now end without a trailing newline.
@jeff-r2026 Your call: ready from my side.
SaulMoro
left a comment
There was a problem hiding this comment.
This was generated by AI during triage.
[P1 blocking] Correcting my earlier review: I offered keeping the Vitest scan as a valid option, and it is not. #1590 moves each static check into lint and deletes the Vitest test it replaces. This PR keeps the POSIX_ONLY scan in windows-test-list.test.ts for the shebang, bash -lc (with its pin exemption) and sh -c patterns. Port those three to teamai/windows-test-safety and drop the scan; the list checks (exists, sorted, unique, WINDOWS_TEST_FILES equals WINDOWS_TESTS) can stay.
@jeff-r2026 Your call once the scan is ported.
SaulMoro
left a comment
There was a problem hiding this comment.
This was generated by AI during triage.
Requesting changes for the [P1 blocking] point above (#1608 (review)): this slice must delete the Vitest scan it replaces, per #1590.
|
Pushed |
|
Follow-up |
|
Follow-up verification after |
Thank you for this. #1630 has just merged and moved all of #1590 into |
Summary
Moves the Windows-test allow-list's POSIX-only safety check from a Vitest source scanner into the existing
teamai/*oxlint plugin.teamai/windows-test-safetyfor the tests selected by Windows CI;execshell commands, and POSIX-only filesystem calls;WINDOWS_TESTSand the plugin's Node-readable allow-list synchronized through the existing list test;Part of #1590.
Validation
npx vitest run oxlint-plugin-teamai/rules/windows-test-safety.test.ts oxlint-plugin-teamai/rules/remove-delivered.test.ts src/__tests__/windows-test-list.test.ts— 13 passednpm run typecheck— passednpm run lint— 0 warnings / 0 errorsnpm run build— passednode dist/index.js --versionandnode dist/index.js list --help— passedgit diff --checkandgit diff --cached --check— passedSlai Agent Runtime performed the investigation, implementation, and test execution. The account owner authorized this contribution and is responsible for its content.