Resolution

Contributing to Resolution

Resolution is a one-owner research desk and fund. Changes are welcome when they keep that shape: the owner decides, the code enforces, and the numbers are measured rather than claimed.

Before you start

Setup

You need Node 24 or later. Docker is optional.

git clone https://github.com/bram32/resolution && cd resolution
npm ci
npm run demo          # a seeded paper fund on http://localhost:4747

The log prints a link with a one-time ?t= token. node src/main.ts --memory runs an empty fund that is thrown away on exit.

The gates

Every pull request must pass the same checks as CI:

npm run typecheck     # TypeScript, no emit
npm test              # node:test, all suites
npm run academy:check # lessons, cases and glossary are complete in en and nl
npm run docs:check    # docs/reference is up to date with the code

npm run check runs all four in order. A versioned pre-push hook runs it before every push; enable it once per clone:

git config core.hooksPath .githooks

GitHub Actions runs the same gates on ubuntu-latest. To run them on a self-hosted runner, set the repository variable CI_RUNS_ON to its label (decision 0020).

Contributions are accepted under the project licence, AGPL-3.0-or-later.

If you change rules, events, configuration, routes, providers or npm scripts, run npm run docs and commit the regenerated docs/reference/.

The product website is built from this repository with npm run site into site/dist/ (ignored by git); site/README.md has the build and deploy steps. It is not a CI gate, but test/site-gen.test.ts builds it in the test suite, so a change that breaks the build or the renderer fails npm test.

Code conventions

Tests

Tests live in test/ and use node:test. The fake IBKR gateway is in test/helpers/fake-ibkr.ts; the market fake is the seeded synthetic provider in src/market/, and the model fake is the scripted provider in src/seats/. A new rule, route or event needs a test that names what it guards. Anything on the order path needs a test for its failure mode: a timeout, a lost reply, a duplicate or a stale price.

Commits and pull requests

Reporting security issues

See SECURITY.md. Please don't use public issues for these.