Skip to content

docs: separate paper from live, so a figure from one is never read as the other - #242

Merged
eaitbrahim merged 1 commit into
mainfrom
docs/paper-vs-live
Aug 11, 2026
Merged

docs: separate paper from live, so a figure from one is never read as the other#242
eaitbrahim merged 1 commit into
mainfrom
docs/paper-vs-live

Conversation

@eaitbrahim

Copy link
Copy Markdown
Contributor

Why

Conflating the paper and live accounts is the single most costly confusion in this project. It produced a wrong diagnosis: a paper-run position size was checked against live-account equity, and the conclusion was wrong as a result.

Nothing in the docs made the split explicit, and nothing on the dashboard says which account a number belongs to — paper and live render in an identical layout. This makes the mistake hard to repeat.

What

README.md — new ## Paper vs. live section (placed before ## Before trading live). It leads with the thing that causes errors — two separate accounts, separate databases, separate configs, separate schedules, separate histories, so a figure from one says nothing about the other — then a comparison table of the measured values, then:

  • which one am I looking atequity_state_mode on any dashboard, the --config/--db pair on the command line, and that --db defaults to keel.db, so a live command that omits it silently reads the paper database;
  • order gating — paper places freely against synthetic cash; live runs mode: confirm, which asks for a typed y and fails closed headless unless autonomy is armed, cross-referencing Confirm vs. autonomy;
  • cadence — "it fires hourly" and "it runs once a day" are both true. Both jobs have hourly triggers plus RunAtLoad; both runners are day-stamped; the trigger count is catch-up breadth, not cadence, because launchd does not re-run an interval that passed while the machine was off. A failed cycle leaves no stamp and is retried next hour. The two differ only in anchor: paper is local-date, live is UTC-date.
  • sizing — paper sizes off its own synthetic equity (equity_override); live falls back to caps.max_exposure_usd as a proxy. Same rule, same setup, same day, different quantities.

keel/commands/tui.py — new Which account is this? help section (a few lines, before Live balance): which field disambiguates, and that switching accounts means relaunching with the other --config/--db pair, since there is no in-app switch.

tests/commands/test_tui.py — one test in the existing section-scoped style, pinning that the help names equity_state_mode, both flags, keel-live.db, and the keel.db default.

Notes

Gates

$ uv run ruff check keel tests packages scripts
All checks passed!

$ uv run pytest -q
2665 passed, 1 skipped in 38.56s

$ uv run mypy
Success: no issues found in 221 source files

Baseline on origin/main is 2664 passed / 1 skipped; the +1 is the new test. The single skip is the expected one:

SKIPPED [1] packages/keel-broker-api/keel_broker_api/conformance/suite.py:254: adapter serves no granularity the suite could exercise

🤖 Generated with Claude Code

… the other

Conflating the two accounts is this project's most expensive confusion: a
paper-run position size compared against live-account equity produced a
confident wrong diagnosis. Nothing in the docs made the split explicit, and
nothing on the dashboard says which account a number belongs to -- paper and
live render in an identical layout.

README gains a `Paper vs. live` section: the two deployments share nothing
(config, database, allowlist, caps, schedule, history), a comparison table of
the measured values, how to tell which is on screen (`equity_state_mode`) or on
the command line (the `--config`/`--db` pair, where `--db` defaulting to
`keel.db` is the trap), how order gating differs, and why sizing is a different
calculation on each. It also reconciles "it fires hourly" with "it runs daily":
both jobs have hourly triggers, both runners are day-stamped, and the trigger
count is catch-up breadth rather than cadence.

The TUI help gains a short `Which account is this?` section -- which field
disambiguates, and that switching means relaunching with the other pair, since
there is no in-app switch.

Documentation only: no behaviour, default or config value changes.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@eaitbrahim eaitbrahim added the documentation Improvements or additions to documentation label Aug 11, 2026
@eaitbrahim
eaitbrahim merged commit 2a58ffb into main Aug 11, 2026
1 check passed
@eaitbrahim
eaitbrahim deleted the docs/paper-vs-live branch August 11, 2026 19:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant