Skip to content

refactor(ai-gateway): scope Effect routing state - #168

Merged
robinbraemer merged 1 commit into
mainfrom
feat/ai-gateway-effect-routing
Aug 1, 2026
Merged

refactor(ai-gateway): scope Effect routing state#168
robinbraemer merged 1 commit into
mainfrom
feat/ai-gateway-effect-routing

Conversation

@robinbraemer

Copy link
Copy Markdown
Member

Progresses #105 and #102.

What changed

  • replace the live AI Gateway routing Promise/ManagedRuntime adapter with a scoped Effect layer over codex-router SQLite
  • keep routing selection, diagnostics, lease renewal/release, health recovery, and upstream classification inside Effect
  • split the Effect routing service contract from the legacy account/state adapter so Bun SQLite tests do not load unrelated Promise-era code
  • build the routing layer in the server scope so SQLite remains live until shutdown
  • add a Bun-hosted Effect/Vitest lane with five durable routing behaviors and a host ownership regression guard

Verification

  • bun run check
    • Effect migration policy: 412 assigned TypeScript paths, zero violations
    • 529 pass / 4 intentional skip / 0 fail legacy tests
    • 260 pass Node-hosted Effect tests
    • 5 pass Bun SQLite Effect tests
    • 114 pass docs tests
    • root typecheck, docs lint, and docs typecheck pass
  • executable serve smoke: health 200, empty-vault readiness 503, authenticated status 200, clean SIGINT

The legacy routing-state.ts, Promise adapter in state.ts, and their legacy consumers remain tracked migration inventory; this PR removes them from the production serve path but does not claim repository-wide Effect completion.

@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
❌ Deployment failed
View logs
agentos-site a482e2d Aug 01 2026, 09:49 PM

@robinbraemer
robinbraemer merged commit b106031 into main Aug 1, 2026
1 of 3 checks passed
@robinbraemer
robinbraemer deleted the feat/ai-gateway-effect-routing branch August 1, 2026 21:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant