Skip to content

Split Worker route handlers and support modules - #15

Merged
dills122 merged 3 commits into
mainfrom
feature/worker-module-split
Jun 7, 2026
Merged

dills122 merged 3 commits into
mainfrom
feature/worker-module-split

Conversation

@dills122

@dills122 dills122 commented Jun 7, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • Splits the Worker god file into focused modules by routing, handlers, storage, security helpers, and Durable Object responsibilities.
  • Keeps behavior unchanged while making the OAuth/session/security code easier to review and maintain.

What Changed

  • Reduced apps/worker/src/index.ts to a small Worker router.
  • Moved Durable Object behavior into auth-coordinator.ts.
  • Split OAuth, session/logout, settings, account deletion, and starred repository proxy logic into dedicated handler modules.
  • Extracted shared Worker concerns into http, env, crypto, session-store, settings, rate-limit, github, coordinator-client, constants, and types modules.
  • Moved Worker test fixtures and mocks into test/helpers.mjs.

Validation

  • pnpm --filter @forage/worker test
  • pnpm --filter @forage/worker typecheck
  • pnpm --filter @forage/worker build
  • pnpm lint
  • pnpm check

Scope Notes

  • This is a behavior-preserving refactor.
  • No auth, storage, rate-limit, or API behavior was intentionally changed.
  • DB and analysis-package refactors are intentionally left for separate branches.

@dills122 dills122 changed the title Feature/worker module split Split Worker route handlers and support modules Jun 7, 2026
@dills122
dills122 merged commit 43e9b2f into main Jun 7, 2026
1 check passed
@dills122
dills122 deleted the feature/worker-module-split branch June 7, 2026 03:38
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