Commit Graph
7 Commits
Author SHA1 Message Date
Alby96andClaude Opus 5.5 9ae1e955a4 Keep the laboratory going and resumed units consistent when judging tournaments
An error while judging a tournament (a plan that no longer reads, the database out
of reach) could stop the whole laboratory queue or leave the tournament unjudged
until a restart. The judge now reads inside its failure handling, so an unreadable
plan fails the tournament with an Italian reason; every call of the judge is
guarded; and a finished contender trial that comes back to the queue brings its
tournament to the judge.

Resumed trials and judges reused finished units without checking they were
computed on the same inputs, so a restart after new bars or an image update mixed
runs of two data sets or two engines. Every unit now records its fingerprint (the
data, the engine version, the build) and only units on the same inputs are reused;
the runs on the final tract are checked on the build and, when the tract is read,
on its data.

The judge also checks that each contender trial is the one the tournament plan
wrote: plan hash, grid, data source, capital, slippage and reference share.

The settings hint now says the workers are calculations of one trial; trials still
run one at a time.

refs #122, refs #123

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-04 14:20:43 +01:00
Alby96andClaude Opus 5.5 b564871391 Split the trial judge into units and run them on a resumable worker pool
The tournament of Phase 13 needs many trials to run on more than one thread
and to survive a restart without redoing finished work. The judge was one
monolithic call on one thread, so a restart redid the whole trial.

TrialRunner.Run is now Judge(Variants()): Variants does every engine execution
as a keyed unit in two stages (grid and outside-grid run, then, after the
plateau choice, costed runs, benchmark and look-ahead), and Judge is the old
pure judging code working on runs assembled by key. Both Run overloads keep
their signatures; on one thread the engine is called in the order of today,
and the three golden reports do not move.

The single low-priority worker becomes a pool of N threads (setting
laboratory.workers, default 1, at most one less than the processors, shown in
Impostazioni > Sistema). The Laboratory records each unit in the new
tournament_units table (migration 0016, which also creates tournaments for the
next part of the phase): claimed as running, then done with the gzip of its
run. A resumed trial drops its running units, reloads the done ones and runs
only the rest; a run reloaded from storage gives the same report byte for
byte. Plain trials drop their unit outcomes when they finish or fail. The pool
no longer disposes its queue while a thread may still read it.

refs #122

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-04 13:07:14 +01:00
Alby96andClaude Opus 5.5 e0a438a0b2 Fase 12 — Dati e matematica dei panieri (#187)
ci / test (postgres) (push) Successful in 9m14s
ci / test (sqlite) (push) Successful in 6m40s
ci / image (push) Successful in 2m18s
Research-only data and maths for basket mean reversion (ADR 0028): a seam between the trial judge and the engines, the basket maths in src/Anubis/Baskets, sub-day research bars, ECB crosses and FX minute import.

refs #118, refs #119, refs #120, refs #121

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Alberto Balbo <alberto.balbo.96@gmail.com>
2026-12-04 11:29:00 +01:00
Alby96andClaude Opus 5.5 93cdf7850d Fase 11 — Decisioni solo matematiche (#186)
ci / test (postgres) (push) Successful in 7m36s
ci / test (sqlite) (push) Successful in 6m41s
ci / image (push) Successful in 1m49s
News, the economic calendar and earnings dates no longer change any decision (ADR 0023, choices in ADR 0027). The outside rules are measured in the shadow; a switch in the settings turns them back on.

refs #116, refs #117

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Alberto Balbo <alberto.balbo.96@gmail.com>
2026-12-04 09:14:11 +01:00
Alby96andClaude Opus 5.5 1bc7e067fd Fase 10 — Nuova rotta: solo Docker (#184)
ci / test (postgres) (push) Successful in 4m50s
ci / test (sqlite) (push) Failing after 4m21s
ci / image (push) Skipped
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>
2026-12-03 19:59:00 +01:00
Alby96andClaude Opus 5.5 76b64ef147 Replay the past of a rebuilt account in its order
What an account did while the bot was off is now written before the splits and
the dividends of those days, once and without acting on it; an attempt cut
halfway is taken up from the same point. Until then the account is not valued
at today's price, the guard keeps the last figures it knew with their time,
and a stop order only cancels what is open. Protective sales of the archive
are not continued, and the rest of a stop that fired in part is sold.

Also the decisions of the phase (ADR 0020), the manuals and the dates under
the equity chart.

refs #69 #72 #75

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-01 22:58:08 +01:00
Alby96andClaude Opus 5.5 24e20584d4 Write the manuals and fix what following them found
The manual, the runbook and the go-live list are written and checked claim by
claim against the code, and the installation is done from zero by following
them on both engines. That found real defects, now fixed:

- with SQLite a missing database file left no way to restore a backup: the
  choices appear, and the file is created only by the user's choice;
- an account whose difference vanished after the 15 minutes stayed prudent
  with no button, a missing stop could be left out for good, and a choice
  made while the broker was silent used old numbers;
- after "Ferma tutto" the positions could not be closed without restarting;
- a refused key looked like a silent broker: it has its own notice now;
- the split of the capital between the strategies of a broker (SPEC 13.5)
  could not be changed from the interface.

refs #72 #68

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-01 21:38:33 +01:00