Keep the guard drill's engine off the internet (refs #102)
ci / test (postgres) (push) Successful in 3m38s
ci / test (sqlite) (push) Successful in 4m6s
ci / test (postgres) (pull_request) Failing after 4m7s
ci / test (sqlite) (pull_request) Successful in 4m24s
ci / image (pull_request) Skipped
ci / image (push) Successful in 1m25s

Since Phase 7 the drill's child engine read the real news feeds every two
minutes and downloaded the ONNX tone model, and it already asked the ECB,
the mood and calendar sources and the Binance archives. The drill is meant
to stay on the computer (ADR 0012 point 5) and that extra work loaded the
slow CI runner while the drill timed the engine.

Under a guard with the drill's loopback OKX, the market data now runs
offline: no news job, no model, and every request goes through a
loopback-only handler that answers anything else with a final 403, so no
source retries with back-off and the engine keeps its pace. No new
variable: the drill is recognised by the same conditions as its fake OKX.

The drill gains an eighth check (no news read, no model downloaded), and a
test runs every market data job, a history round and a news round as the
drill builds them and finds only loopback requests on the network. ADR 0016.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Alby96andClaude Opus 5.5 committed 2026-11-16 09:41:45 +01:00
1 parent a77aa1b7eb
commit a5a6918dae
6 files changed
+184 -13

No files matched your search

+6 -2
View File
@@ -313,9 +313,13 @@ internal sealed partial class AnubisHost(
}
var scheduler = new Scheduler(clock, bus);
// The guard drill's engine: prices from the drill's local OKX, and then nothing else leaves the computer either
// (no news, no model, no other source: ADR 0016). Honored only under a guard, like the drill's OKX itself.
var drill = Guard is null ? null : GuardDrill.DrillOkx(environment);
_market = MarketDataEnabled
? new MarketDataService(_db, clock, bus, settings, secrets, Config.Data, overrides?.MarketHttp, overrides?.MarketSockets, logger,
Guard is null ? null : GuardDrill.DrillOkx(environment))
? new MarketDataService(_db, clock, bus, settings, secrets, Config.Data, overrides?.MarketHttp, overrides?.MarketSockets, logger, drill,
offline: drill is not null)
: null;
_trading = TradingEnabled && (identity.File ?? Installation.ReadFile(Config.Data)) is { } file
? new TradingService(_db, clock, bus, secrets, _market, new FxStore(_db, clock), TradingConsent.From(Config), file.InstallationId,