Commit Graph
3 Commits
Author SHA1 Message Date
Alby96andClaude Opus 5.5 1e71038209 Run market data inside the server (refs #19 #20 #22 #24)
MarketDataService wires the collector, the reference sources, the
universes and the corporate actions into the scheduler. Short jobs (rates,
calendar, mood, spread samples, corporate actions) run on their schedule;
long downloads (catalogues, the first history, thousands of stocks, the
Binance archives) run on a background worker the jobs only wake, so they
never delay the backup or each other. The live crypto feed follows the
crypto universe, or BTC, ETH and SOL until one exists.

Alpaca uses only the paper account keys; without them the stock part is off
and the sources list says why. Market data is off in demo mode, with
ANUBIS_MARKET_DATA=off, and in tests that bring no fake network.

New: GET /api/data/quality (JSON or Markdown) and /api/data/sources, and
"anubis data report|binance|csv" on the command line.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-10 15:42:10 +01:00
Alby96andClaude Opus 5.5 f9d71559e8 feat(server): web server, interface shell, demo mode and Docker image (refs #11 #12 #13 #14 #15 #16 #17)
ci / test (postgres) (push) Successful in 2m22s
ci / test (sqlite) (push) Failing after 2m27s
ci / image (push) Skipped
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>
2026-11-10 12:40:15 +01:00
Alby96andClaude Opus 5.5 b4bf864f74 Set up phase 0: .NET 10 solution, toolchain, minimal app, Docker and CI
ci / test (postgres) (push) Successful in 1m18s
ci / test (sqlite) (push) Successful in 1m23s
ci / image (push) Successful in 41s
Empty but complete solution so every later phase starts from a working
toolchain: analyzers as errors, locked restore, format check, policy tests
that keep packages within ADR 0004 and keep live trading switched off,
a /health endpoint served from Docker, and a Gitea workflow with only
run steps. API facts of SPEC section 4 re-checked in docs/API-NOTES.md;
ADR 0006 records what changed (MSTest base packages, Ubuntu images,
OKX WebSocket on 443, Alpaca margin-only accounts).

refs #1 refs #2 refs #3 refs #4 refs #5

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-10 09:51:41 +01:00