2 Commits
Author SHA1 Message Date
RichardandClaude Opus 4.8 98109b78f6 Slice 2 (Fable-Fixes): K2 – Neustart-Reconciliation
Ruhende GTC-Leiter-/MakerEntry-Orders ueberleben Neustarts auf dem CLOB, der
Verwaltungszustand (ExitLadders/ExitPending/PendingOrderTimestamps) ist transient.
Ohne Bereinigung liefe die Engine gegen Waisen-Orders (Doppel-Leiter, Kaskaden).

- StartupOrderReconciliationService (IHostedService): storniert beim Start je
  Live-Account alle offenen CLOB-Orders; danach entscheidet die Engine sauber neu.
  Registriert als ERSTER Modul-HostedService (nach Hydration, vor Monitor/Engine),
  pro Account fehlertolerant.
- GetOpenOrdersAsync: assetId jetzt optional (default "") -> ohne Filter ALLE
  offenen Orders des Accounts. Signaturneutral (HMAC geht ueber Pfad ohne Query),
  rueckwaertskompatibel fuer die bestehenden per-Asset-Aufrufer. IClobClient +
  FakeClobClient nachgezogen.

Hinweis: "/data/orders ohne asset_id = alle Orders" ist API-gated und im Zielland
live zu verifizieren (wie M6).

Tests: 3 neue (cancelt alle Orders je Live-Account, ueberspringt Demo/credential-los,
no-op ohne offene Orders). Build 0 Fehler, 218 Tests gruen, --smoke-ui ok.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-09 13:20:03 +02:00
RichardandClaude Opus 4.8 ad8f7b0d03 Slice 0 (Fable-Fixes): IClobClient-Seam fuer testbare CLOB-Interaktionen
Verhaltensneutrale Testinfrastruktur als Grundlage fuer Slice 1/2:
- IClobClient-Interface (Core) ueber die von Leiter/Reconciliation genutzten
  CLOB-Methoden (Place/CancelConflicting/GetOpenOrders/CancelOrder).
- PolymarketClobClient implementiert IClobClient (Signaturen unveraendert).
- DI-Seam im Modul: IClobClient -> PolymarketClobClient-Singleton.
- SellLadderService haengt jetzt an IClobClient (statische CalculateExactOrderAmounts
  bleibt am konkreten Typ).
- InternalsVisibleTo(PolyTrader.Tests) + FakeClobClient-Test-Double.

Verifikation: Build 0 Fehler, 207 Tests gruen, --smoke-ui Container-Aufbau ok.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-09 11:53:12 +02:00