[codex] Align provider Effect service modules#3195
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: Needs human review Diff is too large for automated approval analysis. A human reviewer should evaluate this PR. You can customize Macroscope's approvability policy. Learn more. |
98fc694 to
716eab6
Compare
10f4bbb to
2579a32
Compare
Co-authored-by: codex <codex@users.noreply.github.com>
Co-authored-by: codex <codex@users.noreply.github.com>
Co-authored-by: codex <codex@users.noreply.github.com>
Co-authored-by: codex <codex@users.noreply.github.com>
Co-authored-by: codex <codex@users.noreply.github.com>
Co-authored-by: codex <codex@users.noreply.github.com>
Co-authored-by: codex <codex@users.noreply.github.com>
Co-authored-by: codex <codex@users.noreply.github.com>
Co-authored-by: codex <codex@users.noreply.github.com>
Co-authored-by: codex <codex@users.noreply.github.com>
Co-authored-by: codex <codex@users.noreply.github.com>
Co-authored-by: codex <codex@users.noreply.github.com>
Co-authored-by: codex <codex@users.noreply.github.com>
Co-authored-by: codex <codex@users.noreply.github.com>
Co-authored-by: codex <codex@users.noreply.github.com>
Co-authored-by: codex <codex@users.noreply.github.com>
Co-authored-by: codex <codex@users.noreply.github.com>
Co-authored-by: codex <codex@users.noreply.github.com>
Co-authored-by: codex <codex@users.noreply.github.com>
Co-authored-by: codex <codex@users.noreply.github.com>
2579a32 to
60a235b
Compare
Summary
Services/andLayers/to theprovider/domain rootContext.Service, expose realmakeconstructors and canonicallayerexports, and useService["Service"]for contract typesImpact
Primarily structural. OpenCode failures now retain exact causes plus bounded status/count/byte/timing metadata while avoiding arbitrary SDK response bodies and process streams in direct error fields or messages. Existing provider tests retain compact behavioral coverage; no broad refactor-only test suite was added.
Validation
vp check(0 errors; repository-existing warnings only)vp run typecheckgit diff --checkNote
Align provider Effect modules to Context.Service pattern with standardized error types
ProviderService,ProviderSessionDirectory,ProviderSessionReaper,ProviderAdapterRegistry,ProviderInstanceRegistry,ProviderRegistry,OpenCodeRuntime,ProviderMaintenanceRunner,ProviderEventLoggers) from shape-based exports toContext.Serviceclasses with typed service tags and replaces legacy*Livelayer exports with a singlelayerexport per module.ProviderAdapterProcessError.stage,OpenCodeRuntimeError,OpenCodeProbeError,ProviderMaintenanceCommandSpawnError) that carry typed metadata fields instead of raw message strings.detailstrings across all adapters and runtime error paths to generic, non-leaky messages, preventing SDK response bodies, cause messages, or credentials from appearing in surfaced error details.isInitialSnapshottoProviderSnapshotSourcesoProviderRegistrycan distinguish the unprobed startup snapshot from live data when deciding whether to use a cached provider state.ProviderService.sendTurnnow rejects whitespace-only input with no attachments via a typedProviderValidationErrorwithout calling the adapter; previously such input was passed through.Macroscope summarized 60a235b.
Note
Medium Risk
Touches core provider session routing, orchestration reactors, and all built-in drivers; behavior changes mainly affect error strings/metadata and layer composition, but mistakes could break session startup or provider status UX.
Overview
Migrates provider wiring from scattered
Layers//Services/modules to consolidatedprovider/*.tsservices (ProviderService,ProviderRegistry,ProviderAdapterRegistry,ProviderSessionDirectory,ProviderEventLoggers, etc.) that exposemake+layeronContext.Servicetags. Orchestration, integration harnesses, drivers, and tests now import these as namespaces (e.g.ProviderService.layer,ProviderAdapterRegistry.ProviderAdapterRegistry) instead of*Live/makeProviderServiceLiveshims.Tightens failure surfaces across adapters and OpenCode:
ProviderAdapterProcessErrorgains a requiredstage; request/process/driver errors use fixeddetail/messagestrings rather than embedding underlying cause text. OpenCode paths add structuredOpenCodeProbeError, generic SDK failure mapping, and sanitized server URL diagnostics (origin/host only, no credentials/path/query). Claude/Codex/Cursor/Grok/OpenCode adapter and probe tests are updated for the new shapes and import paths.Minor test harness cleanup in
TestProviderAdapter.integration.tsinlinesProviderAdapterSessionNotFoundErrorconstruction where a helper was removed.Reviewed by Cursor Bugbot for commit 60a235b. Bugbot is set up for automated code reviews on this repo. Configure here.