The trading service loaded the outcomes in the background after the host reported "ready", so for a moment Strategie showed every strategy as without a backtest. CI run 219 caught it on SQLite. The host now loads them before it is ready; the call is idempotent, so the one at trading start changes nothing. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
9ac159a7db
commit
dc1ba4e701
1 file changed
+6
@@ -295,6 +295,12 @@ internal sealed partial class AnubisHost(
|
|||||||
overrides?.MarketHttp, overrides?.MarketSockets, logger, settings, (password, code, ct) => access.ReauthenticateAsync(password, code, ct),
|
overrides?.MarketHttp, overrides?.MarketSockets, logger, settings, (password, code, ct) => access.ReauthenticateAsync(password, code, ct),
|
||||||
Path.Combine(Config.Data.Root, "STOP"))
|
Path.Combine(Config.Data.Root, "STOP"))
|
||||||
: null;
|
: null;
|
||||||
|
if (_trading is not null)
|
||||||
|
{
|
||||||
|
// Before "ready": the Strategie page must never show a strategy without its backtest outcome (SPEC 12.3).
|
||||||
|
await _trading.LoadOutcomesAsync(cancellationToken).ConfigureAwait(false);
|
||||||
|
}
|
||||||
|
|
||||||
// The laboratory computes on its own thread and reads only local data; the demo shows appendix F and runs none.
|
// The laboratory computes on its own thread and reads only local data; the demo shows appendix F and runs none.
|
||||||
_lab = options.Demo ? null : new Laboratory(_db, clock, Config.Data.Research, logger);
|
_lab = options.Demo ? null : new Laboratory(_db, clock, Config.Data.Research, logger);
|
||||||
_services = new AppServices(_db, settings, secrets, access, backups, scheduler, _market, _trading, _lab);
|
_services = new AppServices(_db, settings, secrets, access, backups, scheduler, _market, _trading, _lab);
|
||||||
|
|||||||
Reference in new issue
Block a user