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>
This commit is contained in:
Alby96andClaude Opus 5.5 committed 2026-12-04 14:20:43 +01:00
1 parent 8aafa5ad32
commit 9ae1e955a4
10 files changed
+471 -57

No files matched your search

@@ -655,7 +655,7 @@
<input id="lab-workers" name="valore" inputmode="numeric" autocomplete="off" value="@_labWorkers.Value" readonly="@(_labWorkers.ReadOnly || Shell.IsDemo)" />
<button class="btn btn-small" type="submit">Salva</button>
</form>
<p class="hint">Quante prove del Laboratorio girano insieme. Alzalo solo dopo averne misurato l'effetto: il Laboratorio non deve togliere tempo al trading. Vale dalla prossima prova. Su questo computer va da 1 a @LaboratorySettings.MaxWorkers.</p>
<p class="hint">Quanti calcoli di una prova del Laboratorio girano insieme: le prove restano una alla volta. Alzalo solo dopo averne misurato l'effetto: il Laboratorio non deve togliere tempo al trading. Vale dalla prossima prova. Su questo computer va da 1 a @LaboratorySettings.MaxWorkers.</p>
<h3>Salvataggi</h3>
<p class="hint">Ogni notte alle 03:30 e prima di ogni aggiornamento dello schema. Tengo gli ultimi @Backups.Keep.</p>