Repository navigation
refactor(provider-core): follow the Effect service conventions throughout - #17427
Conversation
ApprovabilityVerdict: Not approved Macroscope's review found this PR not approvable — This is a broad provider-core and server-wide refactor that changes shared Effect service abstractions, module/service identities, dependency acquisition, and production logger wiring across 107 files. Although the underlying logging and ID algorithms appear preserved and no product defaults or schemas change, the shared-infrastructure scope warrants human review. You can add or adjust custom eligibility rules. Learn more. |
Thread transfer impact✅ Thread transfer remains within every enforced ceiling.
Baseline: unavailable · PR result: Scenario and decoded snapshot size10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.
Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed. |
…hout An audit of every provider-core module against docs/internals/effect-services.md: - No standalone Shape interfaces: IdAllocatorV2, ProviderAdapterV2, and ProviderHost define their interface inline; consumers use `X["Service"]`. IdAllocatorV2's sub-records drop the Shape suffix. - Service modules are PascalCase and utility modules camelCase: continuationRequests becomes ProviderContinuationRequests (with a matching key), and ProviderAuthFlow becomes providerAuthFlow (it defines no service). - Imports from service modules (IdAllocator, ProviderAdapter, ProviderHost, ProviderEventLoggers, ProviderContinuationRequests, ModelCatalog) are namespace imports everywhere they are used. - Services come from the environment, not parameters: makeProviderSnapshotSettingsSource yields ProviderHost, and the failure turn-item helpers use the pure IdAllocator.derive, now a top-level export the layer reuses. - No re-export shims: the server's ProviderEventLoggers module becomes ProviderEventLoggersLive (its layer only), and consumers import the tag from provider-core. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…rver.ts Its only consumer was the runtime layer; a separate *Live module for 25 lines added an import path and nothing else. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
7e29597 to
ffd407b
Compare
## What's Changed * fix(web): Local environment switch stays reachable after turning it off by @ScottN-PV in pingdotgg/t3code#17359 * fix(web): keep chat banners inside the lane beside the docked details card by @macodev00 in pingdotgg/t3code#17094 * fix(web): settled and snoozed lines line up with the messages above them by @RakshithBhat03 in pingdotgg/t3code#17191 * fix(web): distinguish project filter from new project by @voltcrash in pingdotgg/t3code#12113 * feat(web): assign a thread details panel shortcut by @maria-rcks in pingdotgg/t3code#16694 * fix(web): chat content keeps pace with sidebar resizing by @flamboh in pingdotgg/t3code#17383 * refactor(provider-core): expose model metadata through a ModelCatalog port by @juliusmarminge in pingdotgg/t3code#17417 * refactor(provider-core): follow the Effect service conventions throughout by @juliusmarminge in pingdotgg/t3code#17427 * refactor(provider-core): latest-version lookups go through a ProviderLatestVersions service by @juliusmarminge in pingdotgg/t3code#17434 * refactor(provider-core): MCP provider sessions live in a McpProviderSessions service by @juliusmarminge in pingdotgg/t3code#17446 * refactor(provider): bring opencode, muse, pi, core and testing in line with Effect conventions by @juliusmarminge in pingdotgg/t3code#17542 * refactor(provider-acp): ACP, ACP Registry and Grok follow the Effect service conventions by @juliusmarminge in pingdotgg/t3code#17544 * refactor(provider-cursor): follow the Effect service conventions by @juliusmarminge in pingdotgg/t3code#17545 * fix(marketing): use app wordmark in header by @voltcrash in pingdotgg/t3code#13240 * fix(web): pr merge actions stay visible while the stack refreshes by @maria-rcks in pingdotgg/t3code#17559 ## New Contributors * @voltcrash made their first contribution in pingdotgg/t3code#12113 **Full Changelog**: pingdotgg/t3code@v0.0.46-nightly.20261009.2873...v0.0.46-nightly.20261009.2886 Upstream release: https://github.com/pingdotgg/t3code/releases/tag/v0.0.46-nightly.20261009.2886
## What's Changed * fix(web): Local environment switch stays reachable after turning it off by @ScottN-PV in pingdotgg/t3code#17359 * fix(web): keep chat banners inside the lane beside the docked details card by @macodev00 in pingdotgg/t3code#17094 * fix(web): settled and snoozed lines line up with the messages above them by @RakshithBhat03 in pingdotgg/t3code#17191 * fix(web): distinguish project filter from new project by @voltcrash in pingdotgg/t3code#12113 * feat(web): assign a thread details panel shortcut by @maria-rcks in pingdotgg/t3code#16694 * fix(web): chat content keeps pace with sidebar resizing by @flamboh in pingdotgg/t3code#17383 * refactor(provider-core): expose model metadata through a ModelCatalog port by @juliusmarminge in pingdotgg/t3code#17417 * refactor(provider-core): follow the Effect service conventions throughout by @juliusmarminge in pingdotgg/t3code#17427 * refactor(provider-core): latest-version lookups go through a ProviderLatestVersions service by @juliusmarminge in pingdotgg/t3code#17434 * refactor(provider-core): MCP provider sessions live in a McpProviderSessions service by @juliusmarminge in pingdotgg/t3code#17446 * refactor(provider): bring opencode, muse, pi, core and testing in line with Effect conventions by @juliusmarminge in pingdotgg/t3code#17542 * refactor(provider-acp): ACP, ACP Registry and Grok follow the Effect service conventions by @juliusmarminge in pingdotgg/t3code#17544 * refactor(provider-cursor): follow the Effect service conventions by @juliusmarminge in pingdotgg/t3code#17545 * fix(marketing): use app wordmark in header by @voltcrash in pingdotgg/t3code#13240 * fix(web): pr merge actions stay visible while the stack refreshes by @maria-rcks in pingdotgg/t3code#17559 ## New Contributors * @voltcrash made their first contribution in pingdotgg/t3code#12113 **Full Changelog**: pingdotgg/t3code@v0.0.46-nightly.20261009.2873...v0.0.46-nightly.20261009.2886 Upstream release: https://github.com/pingdotgg/t3code/releases/tag/v0.0.46-nightly.20261009.2886
Resolve the modify/delete on apps/server/src/provider/ProviderEventLoggers.ts from pingdotgg#17427, which moved the service tag to provider-core and inlined its construction into server.ts. The server construction moves into a small provider/ProviderEventLoggers.ts module (make, then layer) that builds the provider-core service; the opt-out guard and its tests are unchanged. server.ts provides ProviderEventLoggers.layer instead of the inline layer. The new minimalDesktopFlags test helper gains providerEventLogs like the other flag literals. Model and harness: Claude Opus 5.5 via Claude Code. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Authored-By: claude
The first part of a full audit of the provider packages against docs/internals/effect-services.md. This PR covers provider-core and the places that consume it.
Shape interfaces
IdAllocatorV2,ProviderAdapterV2, andProviderHostnow define their interface inline. Consumers useX["Service"], about 90 references across the packages and the server.IdAllocatorV2's sub-records are renamedIdAllocatorV2AllocateandIdAllocatorV2Derive.Module names and keys
continuationRequestsbecomesProviderContinuationRequests, since it defines aContext.Reference. Its key changes to match.ProviderAuthFlowbecomesproviderAuthFlow, since it defines no service.Namespace imports
IdAllocator,ProviderAdapter,ProviderHost,ProviderEventLoggers,ProviderContinuationRequests, andModelCatalog.Services come from the environment
makeProviderSnapshotSettingsSourcenow yieldsProviderHostinstead of takinghost.settings. Its 8 driver call sites are updated.IdAllocator.deriveis now a top-level pure export that the layer reuses. The failure and retry turn-item helpers use it and drop theiridAllocatorparameter.No re-export shims
ProviderEventLoggers.tsre-exported the core tag next to its own layer. The module is gone:server.tsbuilds the layer inline (its only consumer), and everything else imports the tag from provider-core.Not in this PR: the per-package findings and the module-level state, such as the MCP session map, the version cache, Cursor's SDK guard and keychain singleton, and the OpenCode message-id counter. Those come next as their own layers.
Verification: typecheck is clean across provider-core, all eight provider packages, and the server. 1280 tests pass across the provider packages, provider drivers and registry, session manager, and orchestrator replay fixtures. knip and lint pass.
Done by Claude Opus 5.5 in Claude Code.
🤖 Generated with Claude Code