[codex] Fix main CI Effect test runtimes#3008
Conversation
Co-authored-by: codex <codex@users.noreply.github.com>
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
ApprovabilityVerdict: Approved Test-only changes that refactor test files to use @effect/vitest's You can customize Macroscope's approvability policy. Learn more. |
Summary
@effect/vitestand test layersRoot cause
The Grok provider merge introduced manual
Effect.runPromisecalls in backend tests. The repository lint rulet3code/no-manual-effect-runtime-in-testsrejects those calls, causing theCheckjob onmainto fail.Validation
vp checkvp run typecheckvp test run apps/server/src/provider/acp/GrokAcpSupport.test.ts apps/server/src/provider/Layers/GrokProvider.test.ts apps/server/src/provider/Layers/GrokAdapter.test.ts apps/server/src/orchestration/Layers/ProviderCommandReactor.test.ts(50 tests)Note
Fix CI test runtimes by migrating Effect tests to
@effect/vitestReplaces manual
Effect.runPromisecalls and custom runner helpers across four test files with@effect/vitest'sit.effectandit.layerwrappers. Where needed,NodeServices.layeris now provided viait.layer(...)instead of a customrunNodehelper. ThewaitForFileContentutility in GrokAdapter.test.ts is converted from async/Promise to an Effect-returning function that usesEffect.dieon timeout instead of a rejected Promise.Macroscope summarized 010c198.
Note
Low Risk
Test-only refactors with no production code changes; behavior assertions are preserved.
Overview
Fixes main CI Check failures from the
t3code/no-manual-effect-runtime-in-testslint rule by moving Grok-related and one reactor test off manualEffect.runPromise/ custom runners.Grok tests now use
@effect/vitest(describe/itfrom that package,it.effect, andit.layer(NodeServices.layer)for status checks that need Node). The oldrunNodehelper is removed in favor of layer-scoped tests.GrokAdapter.test.ts:waitForFileContentis rewritten as anEffectthat polls withEffect.sleepand fails viaEffect.dieon timeout; the stop-session test yields it directly instead of wrapping inEffect.promise.ProviderCommandReactor.test.ts: The model-change rejection case is the only reactor test switched toeffectIt.effect, with dispatches and assertions composed inEffect.gen(async harness setup still bridged withEffect.promisewhere needed).Reviewed by Cursor Bugbot for commit 010c198. Bugbot is set up for automated code reviews on this repo. Configure here.