0020 · The IBKR login stays with the owner, and the local gates are the CI of record
Status: accepted, 2026-09-27. Both are defaults the owner can reverse. The code is src/broker/ibkr/session.ts
(the supervised gateway session), .githooks/pre-push and .github/workflows/ci.yml.
Context
Two questions were left open once the IBKR work and the repository gates were built.
- IBKR offers a headless login through OAuth 1.0a. With it, the fund would need no gateway login from the owner: consumer keys held on the server would open sessions by themselves.
- GitHub Actions does not run on this repository while the account's billing is blocked. The workflow exists, and the same gates run in the pre-push hook.
Decision
- The owner logs in to the IBKR gateway; the fund holds no key that can open a session. A signed order still needs the owner's signature, but OAuth keys on the server could trade the account without one: anyone who reads the server's disk would hold them. The gateway login keeps that power with the owner. The cost is a login after each gateway restart and once a day. The session supervisor tells the owner when a login is needed, and re-primes the session afterwards.
- The pre-push hook is the CI of record.
npm run checkruns types, academy content, generated docs and the test suite before anything leaves the machine. The workflow still exists, and it takes its runner from the repository variableCI_RUNS_ON,ubuntu-latestby default. Setting it to the label of a self-hosted runner moves CI there with no change to the file. The image job binds only to loopback port 14747, and removes its container afterwards, so it can share a host with a running fund.
Alternatives
- OAuth 1.0a for IBKR. Rejected by default, for the reason above. It could be revisited with keys held in a hardware module, or kept on a machine separate from the web app.
- A self-hosted runner now. Deferred: installing one changes the server's access, and that is the owner's call.
Would change if
- The daily login causes missed orders. Count the owner's logins and the orders that expired waiting for one in the first live quarter.
- GitHub billing is restored, or the owner installs a runner. Either way CI runs again with no change to the workflow.