Changelog — Engine (technical, git-based)

Rol van dit document: Technische changelog van de engine, gegroepeerd per subsystem. Gebaseerd op commit history. Voor algemene wijzigingen en doc-wijzigingen: zie root CHANGELOG.md.


Subsystemen

  • Ingest runtime — run-ingest, lineage, epochs, snapshots.
  • Execution engine — run-execution-live, run-execution-only, pipeline, submit.
  • Deterministic lifecycle — DB-first, OrderTracker, fills_ledger, state_machine.
  • Strategy engine — regime, strategy selector, readiness, multiregime pipeline.
  • Exit runtime — post-fill exit_lifecycle (SL+TP), position_monitor (trail SL, TP bij market); server bewezen.
  • Validation infrastructure — scripts, markers, proof targets.
  • Systemd / operations — units, server scripts.
  • Documentation — SSOT, runbooks, architecture.

DB-architectuur (state-first, partition, generation)

CommitSubsystemDoelWat veranderdImpact
9863d64dbIncremental/watermark refresh (risico 3)refresh_watermarks-tabel; fetch_watermarks, do_full_refresh, do_incremental_refresh (delta CTE’s id>wm, merge counts/avg/var), set_watermarks; eerste refresh full, daarna O(delta); REFRESH_INCREMENTAL log met delta_*_rowsRefresh O(delta) i.p.v. O(rows); risico 3 gesloten; zie REFRESH_INCREMENTAL_DESIGN.md
5cc8322db + executionPartition cutover, generation contractRaw tabellen (L3, ticker, trade, l2) partitioned + cutover; run_symbol_state.generation_id + sequence; RefreshOutcome; state_generation_id; sync kopieert gen; live_runner: cycle_generation_id, INGEST_DECISION_SYNC_VISIBLE, EXECUTION_BLOCKED_GENERATION_MISMATCH gate; route-freshness 30s/45s + apply_route_freshness_filterState-first live path; execution alleen op gesyncte generation; partitioned raw; zie DB_ARCHITECTURE_STALE_EDGE_SAFE.md, REFRESH_COMPLEXITY_AND_GENERATION.md

Ingest runtime

CommitSubsystemDoelWat veranderdImpact
0d433c3epochIngest/execution epoch contractMigration lineage, ingest_epochs, execution_universe_snapshots, data-integrity matrix, engine modes, lineage breakExecution bindt per cycle aan één epoch
cae54c1epoch+splitSplit + validatieFASE 1 validation script/runbook; FASE 2 ingest/execution split (EXECUTION_ONLY)run-ingest apart; run-execution-only leest epochs
8de7afeepochEpoch createsqlx json feature; surface create_epoch errorsBetere foutafhandeling
9c460d6executionSnapshot insertLog EXECUTION_UNIVERSE_SNAPSHOT_INSERT_FAILED bij falenDiagnose
571d1d4dbJSONBBind JSONB execution_universe_snapshots via sqlx::types::JsonSchema compat

Execution engine

CommitSubsystemDoelWat veranderdImpact
64a9dd9exit lifecycle + pipeline + strategy_selectorHorizon-aware SL/TP/time_stop + direction fixexit_config_for_exit_strategy_with_route(exit, max_hold_secs, expected_move_bps): SL=50% expected_move (min 100, max 500 bps), TP=150% expected_move (min 150, max 1000 bps), time_stop=horizon max_hold_secs; Outcome.max_hold_secs + expected_move_bps vanuit V2 pipeline (horizon.max_hold_secs() i.p.v. route.max_hold_secs dat 0 is bij TSL); exit_lifecycle.rs direction-aware SL/TP (long: SL onder entry, short: SL boven entry)Breakout trades krijgen proportionele exit config i.p.v. vaste 60bps SL / 30s time_stop; geen impact op MakerLadder/TimeDecay
(latest)route + analysis + cliExecution universe feature-completeCurrentRunMarketRow.l2_count, is_feature_complete(); route analysis filter op feature-complete; FEATURE_FILTER_APPLIED, FEATURE_INCOMPLETE_SYMBOLS; report-feature-completeness; docs/FEATURE_COMPLETENESS_CONTRACT.mdRoute engine evalueert alleen symbolen met bruikbare L2 state; economics stabiel op filtered universe
execution + route + db + cliModel Input Pipeline HardeningFEATURE_COVERAGE_L2 + ROUTE_ENGINE_SKIP bij coverage < 60%; FEATURE_READY_SIGNAL + refresh gate (l2_raw_feature_ready); MarketFeatures l2_*_missing + path fallback (confidence/move); DIRECTION_FALLBACK_USED; economics CLI exit(2); report-l2-feature-lineage; docs MODEL_INPUT_PIPELINE_HARDENING, L2_FEATURE_LINEAGE_DEBUGGINGGeen silent degradation; economics tuning alleen bij voldoende L2 coverage; zie CHANGELOG.md sectie Model Input Pipeline Hardening
a9778a1executionLIVE_USE_OWN_RUN_ONLY warmup pollNa flush: poll run_raw_counts(ingest, run_id) elke 2s tot sufficient (max 90s); log LIVE_USE_OWN_RUN_ONLY: raw data sufficientCapacity-test symbol_count eenduidig op eigen run
6c72ab5executionLIVE_USE_OWN_RUN_ONLY flush vóór refreshFlush writer + 3s sleep vóór warmup-check (eerste versie)Voorloper van poll-aanpak
0f27b96execution + config + epochLIVE_USE_OWN_RUN_ONLYConfig live_use_own_run_only; warmup data_run_id=run_id, 60s; epoch binding select_valid_epoch_for_run / current_epoch_for_exit_only_for_run; script EXECUTION_UNIVERSE_LIMIT, LIVE_USE_OWN_RUN_ONLYGeïntegreerde run voor schone 400-test
2e525b4configEXECUTION_ONLY parseparse_bool_env: accept "1"/"0"/"true"/"false" i.p.v. alleen bool parsesystemd EXECUTION_ONLY=1 werkt; execution draait in split mode
2e525b4executionLineage break eerste bindinglineage_break_detected alleen bij vorige lineage != huidige; last_bound_lineage_id altijd na binding zettenGeen onterechte ExitOnly bij eerste epoch-binding
b793739executionExecution layerMigration, execution/*, db execution tables, runner, server validation scriptEerste execution path
838c8c3executionLive validationrun-execution-live: long-running met WS data + periodic pipelineLive loop
fa69932executionSchedulingGuard: runtime > warmup + interval; LIVE_EVALUATION_SCHEDULED/STARTED/COMPLETED/SKIPPEDGeen start bij te korte runtime
c8b471cexecutionShutdownCap sleep to deadline in run-execution-liveNette shutdown
0715310executionMultistrategyRestore multistrategy live candidate flowStrategy in live path

Deterministic lifecycle

CommitSubsystemDoelWat veranderdImpact
3b98ea8executionDeterministic engine13 states, DB-first, OrderTracker, fills_ledger, reconcileGeen f64 in beslissingen; traceerbare lifecycle
c4edd1cexecutionOrderTrackerWire OrderTracker + ws_handler in live execution loopACK/FILL/REJECT/CANCEL via tracker
a30e38cexecutionFillsexecution_report_to_event incremental fill (cum_qty_before); AmendOrderParams skip order_id when NoneCorrecte fill-accounting
0d29b83dbQueryquery_scalar return type (i64,) → i64Typefix

Route Decision Engine v2

CommitSubsystemDoelWat veranderdImpact
a50de41route_engineMarket-first route engine v2Nieuwe modulaire route decision layer: types, market_features, expected_path, route_expectancy, route_selector, shadow (7 bestanden, 1282 LOC)Vervangt strategy-first economic decisioning; per pair: market features → expected path → route candidates → expectancy → winner (route×horizon×entry×exit) of NoTrade
a50de41pipelineV2 pipeline bridgerun_strategy_pipeline_v2: converteert V2RouteReport → Outcome via legacy strategy mapping, risk gate, sizingV2 routeresultaten bruikbaar in bestaande execution layer
a50de41executionV2 integrationlive_runner: evaluatieloop vervangt readiness+v1 pipeline door v2 route analysis + v2 pipelineRuntime draait nu v2 engine
a50de41shadowCounterfactual loggingwhy_lost met numerieke deltas (edge/confidence/score vs winnaar); ROUTE_SHADOW_SUMMARY met winner edge+scoreBeslissingen volledig traceerbaar in runtime logs

Strategy engine

CommitSubsystemDoelWat veranderdImpact
650a909readinessVolume EdgeNegative bypass + entry lookupreadiness_gate: Volume uitgezonderd van generiek EdgeNegative; check_entry_readiness: matcht nu symbol+strategyVolume niet meer onterecht geblokt; geen StrategyMismatch meer
9a1a48canalysisCapturable move strategy-awareCapturableMoveInputs per strategie met strategy_move_bps i.p.v. maker expected_move_bps; voorkomt onterechte SurplusBelowFloor voor MomentumCorrecte capturable_move → cost_breakdown → surplus floor
82d88a8pipelineMultiregimePer-pair strategy in readiness check, funnel drop counts, no_pair guardRegime → strategy per pair
e157c5aanalysisPro engineReadiness, cost/surplus, live validation, post-trade layersReadiness gate, cost_breakdown

Validation infrastructure

CommitSubsystemDoelWat veranderdImpact
00ea2f5scriptsValidateFail on dirty tree, SKIP_RUN, server instructionsBetrouwbare server-validatie
212beeescriptsValidateLoad ~/.cargo/env when cargo not in PATH (ssh)Script werkt non-interactive
cff7b72scriptsValidateFail when proof target unmetStrikte proof
5cb496bscriptsValidateHandle unset SKIP_RUNRobuustheid
3112cbdexecutionProofrun-deterministic-proof: live edge-case validationInternal exerciser
f646c2edocsProofLabel run-deterministic-proof as internal; distinguish from live validationDuidelijkheid

Universe / safety

CommitSubsystemDoelWat veranderdImpact
068b67buniverseDynamic universeUniverseManager, atomic snapshot rotationPool/L2/L3/execution layers
c182d4euniversePinningUse base_position in positions tableCorrecte pinned set
128f314universeExecutionFilter illiquid symbols from Execution layerMinder ongeschikte symbols
b4ad93buniverseEpochMIN_EXECUTION_TICKER_ACTIVITY = 10 (= epoch minimum)Epoch valid haalbaar
dd48798executionSafetyWS-native safety: latency, watchdog, exit-only, hard-blocksymbol_safety_state, quiet mode
52262e9scriptsSafetyws_safety_report scriptRapportage
778b788executionSafetyPinned invariants, WS reconcile logs, latency heatmapLogging

Systemd / operations

CommitSubsystemDoelWat veranderdImpact
c2e5c8bscriptsServerstart_live_validation_engine_server.sh executableServer start
5191d7cdocsRuleServer validation steps in git-only-codeflow ruleRepo policy

Observability export

CommitSubsystemDoelWat veranderdImpact
61f96faobservabilityRead-model exportobservability_queries, observability/snapshots+export, CLI export-observability-snapshots, OBSERVABILITY_SNAPSHOT_CONTRACT.mdJSON-snapshots voor KapitaalBot-Website BFF; geen directe DB-toegang vanuit website

Exit, capital, epoch validity (2025-03-17)

CommitSubsystemDoelWat veranderdImpact
9bd11b1epochL2/L3 epoch validityL2 cold-start (>50% l2=0 → criteria_l2_ok); L3 partial (frac_l3≥70% → criteria_l3_ok); EPOCH_VALIDITY_COMPUTED l2_cold_startEpoch valid bij warmup en Kraken L3 rate limits
35071f9docsSSOT/ARCHITECTUREExit (post-fill + position_monitor), compounding (live equity), capital (CapitalAllocator) actueelPublieke docs up-to-date
764eebeexecutionRestart doctrineUnbounded runtime (0=unbounded); lineage_break→NoNewEntries; RESTART_DOCTRINE.mdGeen tijdslimiet; lineage grace 1 cycle

Documentation milestones

CommitDoelWat veranderd
dcdf2deLive runsDocs: live validation runs analysis (run_id=32-34)
32aae98DeliverableDeterministic engine deliverable OrderTracker wiring status
e57a816UniverseUniverse audit (200/60/50/30); repo policy remote-execution-ssh
985ff06AuditTDD gaps + server validation + universe audit (git-only codeflow)
b183ae9AuditInstrument constraints + execution pipeline funnel + EXECUTION_ENABLE

Laatste update: 2025-03-17. Gebaseerd op git log; geen marketing claims.