fix(gateway): resolve two startup bugs blocking E2E testing #102
Reference in New Issue
Block a user
Delete Branch "fix/gateway-startup-bugs"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Two bugs found during E2E smoke testing that prevent gateway startup:
PLUGIN_REGISTRY circular reference — plugin.service.ts imports from plugin.module.ts which imports plugin.service.ts. Extracted PLUGIN_REGISTRY symbol to plugin.tokens.ts (same pattern as auth.tokens.ts, brain.tokens.ts).
AuthStorage.create() silent exit — Pi SDK file-based auth resolves ~/.pi/auth.json causing silent process exit. Replaced with AuthStorage.inMemory() since gateway manages API keys via env vars.
Test plan