Commit Graph
4 Commits
Author SHA1 Message Date
Alby96andClaude Opus 5.5 3b13a4258d Add market data schema, catalogue, bar storage and quality checks (refs #18 #20 #21 #23)
Migration 0002 adds the market data tables on both engines: daily and
one-minute bars, corporate actions, FX rates, the exchange calendar,
calendar events, mood indicators, spread samples, data issues, source
state and universe members, plus the trading rules on instruments.

The data layer is format-independent so the venue clients can build on
it: the instrument catalogue (rules from the venue, delisted kept), bar
upserts with ON CONFLICT, the SPEC 6.4 checks with an issue register
that blocks entries until a second reading, freshness by age of the last
datum (trap 10), research history in .csv.gz with exact decimals, and
adjusted series anchored at the decision day with level and quantity
conversion across splits and dividends.

Recorded API responses from OKX, the Alpaca docs and the free sources
are kept byte for byte as test fixtures; the secret scan now ignores
pagination cursors such as Alpaca's next_page_token.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-10 14:58:44 +01:00
Alby96andClaude Opus 5.5 53ca01b7c3 feat(core): platform layer, portable database, archives and access (refs #7 #8 #9 #10 #11)
Phase 1 foundations in the Anubis library:
- Platform: startup configuration from environment variables (Docker) or
  config.toml (desktop, in-house TOML subset), data folder layout, secret key
  custody (ANUBIS_SECRET_KEY, DPAPI on Windows, restricted file elsewhere),
  installation identity and database fingerprint.
- Db: ADO.NET with Npgsql and Microsoft.Data.Sqlite, money as NUMERIC(38,18)
  or canonical text rounded to 18 decimals, UTC moments, UUIDv7 ids; numbered
  SQL migrations with type tokens and a version table; engine-independent
  export/import with count and accounting-total checks; backups keeping 14.
- Core: injectable clock, channel event bus, scheduler with fixed, interval
  and market-relative times, settings with change log, AES-GCM secrets, log
  redaction, Italian formats.
- Access: PBKDF2-SHA512 hashes, RFC 6238 TOTP, hashed session tokens,
  sign-in attempt limit.

SQLitePCLRaw (Apache-2.0) arrives with Microsoft.Data.Sqlite and is declared
in DependencyPolicyTests and API-NOTES.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-10 11:09:42 +01:00
Alby96andClaude Opus 5.5 52550ee6d1 Close phase 0 review findings: stricter policy scans, property generator, hook
ci / test (postgres) (push) Successful in 1m24s
ci / test (sqlite) (push) Successful in 1m35s
ci / image (push) Successful in 16s
ci / test (postgres) (pull_request) Successful in 1m11s
ci / test (sqlite) (pull_request) Successful in 1m24s
ci / image (pull_request) Successful in 14s
The independent review found that the policy tests could be bypassed:
Microsoft-named direct packages and GlobalPackageReference slipped past
the dependency check, the live-money scan missed the JSON, Dockerfile
and Unraid template forms, the secret scan missed short project
secrets but would have failed on the user's own ignored .env. The
scans now read only the files git would commit and cover those cases.

Also adds the fixed-seed generator for property tests, the REGISTRY
variables reserved for phase 9 in the CI, a git pre-commit hook in
place of the pre-commit tool (tasks hooks), the missing SPEC 4 facts
in API-NOTES (Fed/ECB/BLS times, USDC depth on OKX) and the full list
of today's indirect packages.

refs #3 refs #5 refs #6

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-10 10:05:10 +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