napi: polyfill uv_thread_* against pthread #29261
Open
Claude / Claude Code Review
completed
Apr 13, 2026 in 15m 36s
Code review found 2 potential issues
Found 5 candidates, confirmed 2. See review comments for details.
Details
| Severity | Count |
|---|---|
| 🔴 Important | 0 |
| 🟡 Nit | 2 |
| 🟣 Pre-existing | 0 |
| Severity | File:Line | Issue |
|---|---|---|
| 🟡 Nit | test/napi/uv_stub.test.ts:89-97 |
exitCode asserted before stdout assertions |
| 🟡 Nit | test/regression/issue/29260.test.ts:62 |
Negative panic-string assertion violates CLAUDE.md |
Annotations
Check warning on line 97 in test/napi/uv_stub.test.ts
claude / Claude Code Review
exitCode asserted before stdout assertions
In the 'should not crash when calling supported uv functions' test, `expect(exitCode).toBe(0)` is checked before the stdout assertions, violating the CLAUDE.md rule that stdout assertions must precede exit-code assertions. Move `expect(exitCode).toBe(0)` to after both `expect(out).toContain("HI\!")` and `expect(out).toContain("THREAD_OK")` so that a failure shows what stdout contained instead of just reporting a non-zero exit code.
Check warning on line 62 in test/regression/issue/29260.test.ts
claude / Claude Code Review
Negative panic-string assertion violates CLAUDE.md
Line 62 of the regression test asserts `expect(stderr).not.toContain("unsupported uv function")`, which is explicitly forbidden by CLAUDE.md: "NEVER write tests that check for no panic or uncaught exception or similar in the test output. These tests will never fail in CI." Remove line 62; the existing `expect(stdout).toContain("boolean")` and `expect(exitCode).toBe(0)` already fully catch any crash caused by the original bug.
Loading