[BTAPI-81] Add a feature flag to gate the wealthsimple-api migration cutover #91
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feature/BTAPI-81"
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?
Ticket
BTAPI-81 — Add a feature flag to gate the wealthsimple-api migration cutover
Summary
Config.wealthsimpleApiEnabled(envWS_API_ENABLED, defaultfalse), the flag that gates the whole wealthsimple-api migration cutover — the client swap (BTAPI-75), doorbell delegation (BTAPI-76), and status sourcing (BTAPI-77).falsekeeps today's direct-Wealthsimple / local-session path untouched. BTAPI-75/76/77 each add the branch point that consumes it.server/lib/wealthsimple/CLAUDE.md, including two things a later implementer would otherwise hit blind: the three consumers do not share a network (syncis not onapi-shared, so BTAPI-75 carries an infra prerequisite this ticket deliberately does not resolve), and BTAPI-78 retires the flag with the local credentials deleted last so the rollback path survives.WS_API_ENABLED=falsein.env.example, with the caveat that flipping it needs the container recreated, not merely restarted — compose resolvesenv_fileat creation..env.examplevalue are both asserted.Verification
bun --cwd=./server run verify— type-check, lint, format, format:check all pass; tests 773 passed / 1 skipped / 1 failed. The single failure islib/wealthsimple/trigger-listener/.test.ts:97binding port 9998 →EADDRINUSE, which is environmental and pre-existing (reproduced onmainwith this branch absent; the port is held by the host'sstashcontainer at0.0.0.0:9998->9999/tcp, and the file is 9/9 green withWS_SYNC_TRIGGER_PORT=19998). It does not reproduce in CI.🤖 Generated with Claude Code