[codex] Refactor primary HTTP Effect service#3205
Conversation
|
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 |
|
🚀 Expo continuous deployment is ready!
|
ApprovabilityVerdict: Approved Mechanical refactor that reorganizes exports and switches to namespace imports. No runtime behavior changes - the Effect service creation logic remains identical. You can customize Macroscope's approvability policy. Learn more. |
Co-authored-by: codex <codex@users.noreply.github.com>
bbbd09a to
f3496a6
Compare
Dismissing prior approval to re-evaluate f3496a6
Summary
PrimaryEnvironmentHttpClientservice contract and remove the standalone shape typelayerexportImpact
This is a structural Effect-service cleanup with no intended user-facing behavior change. The primary HTTP target continues to resolve when the layer is built, so runtime configuration is not captured at module load.
Validation
vp checkvp run typecheckNote
Low Risk
Export and typing refactor only; deferred URL resolution via
Effect.suspendis unchanged, so runtime HTTP behavior should stay the same.Overview
Structural cleanup for the primary environment HTTP Effect service with no intended behavior change.
In
httpClient.ts, the standalonePrimaryEnvironmentHttpClientShapealias is removed and the service class uses an inlinedEffect.Success<ReturnType<typeof makeEnvironmentHttpApiClient>>type. Client construction is factored into amakeeffect still wrapped inEffect.suspend(so primary URL resolution happens at layer build time), and the live layer is exported aslayerinstead ofprimaryEnvironmentHttpClientLive.runtime.tsswitches to a namespace import (* as PrimaryEnvironmentHttpClient) and wiresPrimaryEnvironmentHttpClient.layerintoManagedRuntime.make, updatingPrimaryHttpEffectRunner/runPrimaryHttpgenerics to referencePrimaryEnvironmentHttpClient.PrimaryEnvironmentHttpClient.Reviewed by Cursor Bugbot for commit f3496a6. Bugbot is set up for automated code reviews on this repo. Configure here.
Note
Refactor primary HTTP Effect service to use namespace import and
layerexportPrimaryEnvironmentHttpClientShapetype alias from httpClient.ts, inlining the type directly into thePrimaryEnvironmentHttpClientservice class.primaryEnvironmentHttpClientLiveexport with alayerexport constructed viaLayer.effectand a localmakeEffect usingEffect.suspend.* as PrimaryEnvironmentHttpClient) and referencesPrimaryEnvironmentHttpClient.layerinstead of the removedprimaryEnvironmentHttpClientLive.Macroscope summarized f3496a6.