GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — refactor(server): import Effect services as namespaces by juliusmarminge · Pull Request #14385 · pingdotgg/t3code

Conversation

@juliusmarminge

@juliusmarminge juliusmarminge commented Sep 30, 2026 •
edited by devin-ai-integration Bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

Local Effect service modules are imported as namespaces (import * as ProjectService from "./ProjectService.ts", then ProjectService.ProjectService / ProjectService.layer / ProjectService.make), never as named or aliased tags and layers. This PR applies that rule to apps/server outside src/orchestration-v2/: provider, mcp, project, persistence, pullRequest, scheduledTasks, device, scheduling, relay, git, the src/ root (ws.ts, server.ts, …), integration/, scripts/, and the other src/ directories that took ServerConfig/ServerSettingsService tags by name.

The change covers imports and call sites only, with no behavior change. It was done with a TypeScript-checker codemod, so every rewritten reference resolves to the same symbol. When a file needed the tag and also a helper, error or type from the same module, everything now goes through the one namespace, so no module is imported both ways. config.ts becomes ServerConfig and serverSettings.ts becomes ServerSettings. Three files already bind ServerSettings to the contracts schema, so they use Settings, which follows the existing precedent in storageCleanup.ts. The deprecated static ServerConfig.layerTest / ServerSettingsService.layerTest accessors are replaced with the module-level layerTest in files this PR already touches.

Audit counts (ns-audit.py, apps/server minus src/orchestration-v2/)

files imports
before (base 8297ccf85d) 135 322
after 5 8

The 5 remaining files are left alone on purpose, because open PRs are changing them:

  • src/provider/Drivers/OpenCodeDriver.ts: { ServerConfig }, { ServerSettingsService }, { OpenCodeRuntime }
  • src/provider/Drivers/CodexManagedProvider.ts: { ServerSettingsService }
  • src/provider/Layers/OpenCodeProvider.ts: { OpenCodeRuntime }
  • src/provider/ModelManifest.ts: { ServerConfig }
  • src/provider/Layers/OpenCodeProvider.test.ts: { ServerConfig }, { OpenCodeRuntime }. This file is not on the protected list, but the OpenCode 2 stack (feat(server): detect OpenCode 1.x or 2.x per instance and route by it #14239 and above) edits its import block.

A grep for layer as , make as and Live as in this area now finds nothing. The remaining named imports from service modules are pure helpers (for example makeLinuxCgroupController from AcpSessionRuntime.ts, and makeClaudeQueryOptions in a script), which the convention allows.

Follow-ups (not in this PR)

Non-canonical export names are still referenced through namespaces here. Renaming any of them touches files in open PRs (#5589, #9376, #9635 for the Cursor/Codex/Antigravity ones), so they are left for later:

  • provider/Layers/CursorSdkCatalog.ts: CursorSdkCatalogLive, makeCursorSdkCatalog, makeCursorSdkCatalogTestLayer (should be layer / make / a test layer)
  • provider/CodexInstallation.ts, provider/AntigravityInstallation.ts: makeCodexInstallation, makeAntigravityInstallation, and the layer exposed only as a static Tag.layer with no module-level layer, so call sites read CodexInstallation.CodexInstallation.layer
  • provider/acp/AcpRegistryRuntimeCoordinator.ts: the layer is module-private and exposed only through static get layer()
  • provider/acp/AcpRegistrySupport.ts: makeAcpRegistryCatalog. The AcpRegistryCatalog tag lives in a support module and is not named for it.
  • provider/opencodeRuntime.ts (protected): OpenCodeRuntimeLive
  • persistence/Layers/Sqlite.ts: layerConfig, makeSqlitePersistenceLive, SqlitePersistenceMemory
  • device/DeviceService.ts: makeWithHosts
  • orchestration-v2 exports used from here: claudeAgentSdkQueryRunnerLiveLayer, codexAppServerClientFactoryFromSettingsLayer, cursorAgentSdkRunnerLiveLayer, UsageLimitRecoveryWorker.workerLive, ProviderAdapterRegistry.makeLayer / layerFromProviderInstanceRegistry
  • Layer-only modules that export *Live / *Layer names without a service tag (runtimeLayer.ts, http.ts route layers, ProviderRegistry.ts / ProviderInstanceRegistryHydration.ts / AcpRegistryCatalog.ts under provider/Layers/, MCP toolkit *HandlersLive). The audit doesn't cover these, and they belong with the export-rename follow-up.
  • Structural: provider/Services/* hold the tags while provider/Layers/* hold the implementations, and persistence/Services + persistence/Layers are split the same way. So one service is spread over two modules, against the one-module-per-service convention.
  • Deprecated static layerTest accessors on ServerConfig and ServerSettingsService are still used by files outside this PR (assets, checkpointing, telemetry, textGeneration, workspace tests).

Verification

  • cd apps/server && vp exec tsc --noEmit -p .: exit 0, no error TS / warning TS.
  • vp test run on the tests for every touched file, plus ProviderRegistry.test.ts, ProviderInstanceRegistryLive.test.ts, all src/mcp/** tests, ws.test.ts, cli/project.test.ts, and the serverRuntimeStartup/serverLifecycleEvents/serverRuntimeState/serverSettings tests: 103 files, 1359 tests passed. No server.test.ts exists on V2. server.ts layer wiring is covered by tsc, since a missing provide fails the requirements type.
  • vp lint on the 139 touched files: exit 0. The warning set is identical to base (16 pre-existing, 0 new).
  • vp run knip:check: exit 0.
  • Not run: repo-wide vp check, -r test/typecheck, live provider tests (*.live.test.ts).

Model: Claude Opus 5.5 (Claude Code)

🤖 Generated with Claude Code


Devin Review

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
juliusmarminge and others added 6 commits September 30, 2026 00:48
@juliusmarminge @claude
refactor(provider): import Effect services as namespaces
924367b
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
@juliusmarminge @claude
refactor(mcp): import Effect services as namespaces
d284a57
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
@juliusmarminge @claude
refactor(project): import Effect services as namespaces
1302bc0
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
@juliusmarminge @claude
refactor(persistence): import Effect services as namespaces
a85cc1b
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
@juliusmarminge @claude
refactor(server): import Effect services as namespaces in pull reques…
193d88c
…t, git, device, scheduling and relay modules

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
@juliusmarminge @claude
refactor(server): import Effect services as namespaces in ws, server …
b55c469
…and remaining modules

Covers the src/ root (ws.ts, server.ts and others), integration/, scripts/, and the remaining src directories whose only violations were tag imports of ServerConfig and ServerSettingsService.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
@github-actions github-actions Bot added vouch:trusted Author is trusted by repo permissions or the VOUCHED list. size:XXL 1,000+ changed lines (additions + deletions). labels Sep 30, 2026
@github-actions

github-actions Bot commented Sep 30, 2026

Copy link
Copy Markdown
Contributor

Thread transfer impact

✅ Thread transfer remains within every enforced ceiling.

ℹ️ No successful main baseline artifact is available yet. This run establishes the initial measurement.

Provider Metric Main baseline This PR Impact PR ceiling
Codex Total thread wire — 4.9 KiB — 6.8 KiB ✅
Codex Thread snapshot wire — 3.7 KiB — 4.9 KiB ✅
Codex Live turn WebSocket wire — 1.2 KiB — 2.0 KiB ✅
Codex Live turn WebSocket decoded — 20.4 KiB — 29.3 KiB ✅
Codex Live turn messages — 2 — 8 ✅
Claude Total thread wire — 4.9 KiB — 6.8 KiB ✅
Claude Thread snapshot wire — 3.7 KiB — 4.9 KiB ✅
Claude Live turn WebSocket wire — 1.2 KiB — 2.0 KiB ✅
Claude Live turn WebSocket decoded — 20.8 KiB — 29.3 KiB ✅
Claude Live turn messages — 2 — 8 ✅

Baseline: unavailable · PR result: b55c469 · Source CI: success

Scenario and decoded snapshot size

10 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.

  • Codex decoded thread snapshot: 106.1 KiB
  • Claude decoded thread snapshot: 106.4 KiB

Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@macroscopeapp

macroscopeapp Bot commented Sep 30, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Not approved

Macroscope's review found this PR not approvable — This is a large but predominantly mechanical namespace-import refactor with no intended behavior or default changes. Human review is still required because the diff includes authentication/security-related production files, which are treated as sensitive regardless of the narrowness of the edits.

You can add or adjust custom eligibility rules. Learn more.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@juliusmarminge
juliusmarminge merged commit 16d72f4 into t3code/codex-turn-mapping Sep 30, 2026
23 of 24 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@juliusmarminge
juliusmarminge deleted the v2/ns-imports-server branch September 30, 2026 17:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

size:XXL 1,000+ changed lines (additions + deletions). vouch:trusted Author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@juliusmarminge
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.