ADR 0021-0026 for the new course of 2 December 2026, roadmap of phases 10-24. The desktop application is gone: Docker is the only form, and outside a container the server runs only for development and tests with --data-dir, on this computer only. Lighter image (829 MB to 410 MB), rotating logs, backtest and learning as one-shot commands.
refs #113#114#115#78#80#81
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Alberto Balbo <alberto.balbo.96@gmail.com>
A session alone could change the password, switch the second factor on or
off, send the key of the language model to another address and remove the
rules that stop purchases. Each now needs the password and the code, with
one limit on wrong attempts that a restart of the services does not clear,
and the other sessions end when the password or the factor changes.
Requests to the brokers pass a list of allowed calls, never follow a
redirect with a key and are signed by one client only. Pages are closed by
default, nothing is cached, requests are limited to 1 MB, secrets are
masked in logs and notifications, exported tables cannot run as formulas,
archives carry no sessions and the container refuses to run as root.
refs #68
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A restore, an import or an adopted database restarts protected: the engine
stays stopped, reads from the broker what the archive does not know (orders,
stops, executions, also from the OKX history up to 89 days), cancels orders
left working, protects what it finds and waits for the user. Strategies with
real money stay exit only until confirmed again. The database of before the
restore, put back by mistake, is refused by its fingerprint.
A failed migration leaves the engine off with one backup and a way to try
again; an archive is checked whole before the database is touched; a changed
secret key no longer crashes anything, and "anubis access reset" gives the
access back to whoever holds the computer. The image runs the db and access
commands without the guard.
refs #69
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The guard (SPEC 9.3, 9.4) is now the container's main process and the parent
of the engine. It listens on a named pipe for the engine's heartbeat and
startup steps, and steps in after two minutes of silence, ten minutes of a
startup that does not move, or an exit without notice. It stops the engine,
cancels our purchases and sales left open on demo accounts, puts back the
stops the positions need from the state file the engine writes every ten
seconds, writes a note, warns the user and restarts the engine without any
injected fault. The third forced restart within an hour writes the STOP
file. The container's stop is passed on to the engine, which closes in order.
At restart the engine adopts the guard's stops before reconciling, cancels
the orders it left open and plans again the exits already decided, so the
rules of SPEC 5.6 apply to them.
The acceptance test blocks the main loop right after a sale leaves: in
process on a demo-like broker, and with real processes in the drill, which
also runs inside the Docker image (tasks ci and the CI workflow). The guard
uses the ASP.NET shared runtime so both programs share /app.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Phase 1 completed on top of the library foundations:
- Server: startup state machine (config, first run, database down, schema,
identity, ready) with an error page that retries by itself; the configured
database is the only one ever opened, and a vanished SQLite file is never
recreated. REST API and status WebSocket; session cookie auth, CSRF on
every form and write call; desktop and demo answer only the computer itself.
- Interface: static Blazor rendering with plain forms (no interactive
runtime), menu, top bar and phone bottom bar as in the mockups, light and
dark themes with appendix C tokens and a contrast test, Panoramica, Diario,
Rischio, Impostazioni; service pages for sign-in, first access, desktop
first run and the database error page with its choices.
- Demo mode (tasks seed-demo): appendix F in a database of its own under the
temp folder, frozen clock, never touches the configured installation.
- Docker: entrypoint gives /data to PUID:PGID and drops root with setpriv,
HEALTHCHECK through bash /dev/tcp; proven with SQLite, PostgreSQL, a wrong
configuration and a database that goes away and comes back.
- tasks screenshots drives the installed Edge/Chrome through DevTools for
exact 1440 and 390 pixel shots; anubis db export|import on the command line.
Fixes from the independent review: return paths without control characters,
Host check against DNS rebinding, attempt limit counted before the check and
also on the error-page password, one-use TOTP codes and a code to switch the
second factor off, error-page choices serialized with the startup loop,
identity checked before migrating, restore restarts with "Ferma tutto" on,
damaged archives reported instead of crashing. Running the server tests on
PostgreSQL exposed pages rendered before their data arrived; data-loading
components now load first (LoadedComponent).
Decisions in ADR 0007. Tests: 100 on SQLite and on PostgreSQL.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>