Repository navigation
test(cli): cover apps/cli/tests with effect lint (CLI-2852) - #7327
Conversation
There was a problem hiding this comment.
Superseded by a newer AI review
🤖 AI Review
Reviewed both findings against the checked-out code and trusted conventions. The subprocess cleanup finding remains uncertain because the dependency implementation needed to verify teardown behavior is unavailable. The duplication nit is refuted under the documented testing conventions. No runtime checks were possible without installed dependencies.
Findings
| Severity | Location | Category | Sources | Claim |
|---|---|---|---|---|
| 🟠 MAJOR | apps/cli/tests/helpers/cli.ts:678 |
resource-lifecycle |
codex | Interruption during subprocess acquisition can bypass the harness's effective cleanup, leaving a long-running CLI alive or blocking teardown. |
Refuted findings (kept for transparency, not posted as review comments)
apps/cli/tests/smoke-test-windows.ts:26(duplication): The withFinally cleanup algorithm is repeated in live.ts, smoke-test-macos.ts, and smoke-test-windows.ts, creating a potential maintenance drift concern.
Refuted: The repetition exists, although the implementations are not literally word for word identical. trusted/CLAUDE.md:159 explicitly accepts some duplication instead of unnecessary test abstractions, and trusted/apps/cli/CLAUDE.md:34–38 cautions against automatically extracting repeated helpers. These small local helpers have equivalent behavior; the finding identifies no existing divergence or correctness defect that overrides those conventions.
Stats
Claude findings: 1 · Codex findings: 1 · Confirmed: 0 · Refuted: 1 · Uncertain: 1
Models: claude-opus-5-5 + gpt-6.1-sol · Trigger: auto · Workflow run
This review runs once per PR. A maintainer can request another with a /ai-review comment.
|
/ai-review |
There was a problem hiding this comment.
🤖 AI Review
Verified all three findings from both independent reviews. Confirmed the minor stdin error-reporting race, refuted the storage compatibility concern, and left the cleanup finding uncertain because Effect's spawner implementation is unavailable in this checkout.
Findings
| Severity | Location | Category | Sources | Claim |
|---|---|---|---|---|
| 🟡 MINOR | apps/cli/src/commands/experimental/stack/start/start.e2e.test.ts:344 |
resource-cleanup |
claude | Scope closure may not await the log follower's exit, despite the new comment, allowing subsequent stack cleanup to race with the exiting follower. |
| 🟡 MINOR | apps/cli/tests/helpers/cli.ts:783 |
error-handling |
codex | The exit path can silently drop stdin write failures because it never waits for the forked writer. |
Refuted findings (kept for transparency, not posted as review comments)
apps/cli/tests/helpers/storage.ts:318(test-reliability): Moving fixture writes from setupStorage invocation to first layer acquisition introduces an undocumented compatibility regression that can overwrite intervening test edits.
Refuted: The timing change is real, but storage.ts:316-317 explicitly documents initialization 'on first use'. The callers do not establish the claimed regression: for example, cp.integration.test.ts:58-77 builds the layer before executing file preparation, and ls.integration.test.ts:358-375 writes ancestor configuration before setupStorage without supplying conflicting fixture contents. No caller depending on eager fixture writes was found. trusted/CLAUDE.md:144-152 permits reshaping internal APIs based on current consumer requirements.
Stats
Claude findings: 2 · Codex findings: 1 · Confirmed: 1 · Refuted: 1 · Uncertain: 1
Models: claude-opus-5-5 + gpt-6.1-sol · Trigger: manual · Workflow run
This review runs once per PR. A maintainer can request another with a /ai-review comment.
Flaky test check: ✅ no flaky testsCommit Each execution is a separate Vitest process; |
TL;DR
brings
apps/cli/testsandapps/cli/vitest.config.tsunder the effect lintwhats introduced?
apps/cli/tests/**andapps/cli/vitest.config.tsjoin the allow list, replacing the seven per-filetests/helpersentriesFileSystem,Path,ConfigandChildProcess, and promise helpers likerunSupabasekeep their call shape and reject with the same valuesspawnSupabaseandmakeTempHomebecome scoped effects, andseedLegacyStateDecoysandsetLinkedRefFilebecome effects, so their e2e and integration call sites yield themuntilrun now kills its child and removes its temp home instead of leaving both behindref