PINK: docs v7 + reset_and_seed startup fix — 451/451 tests green
- SYSTEM_BIBLE.md → v7.0: documents fee-sign fix (Defect A), opening-fee fix (Defect B), WARN-unfreeze, orphan prevention, reset_and_seed startup, and vel_div env-override. - CAPITAL_BOOKKEEPING_DESIGN.md: status updated to PHASE-1 BUGFIXES APPLIED; sections 8.1-8.4 (applied fixes + 34-test coverage) were already present. - rust_backend.py: expose dita_kernel_reset_and_seed() via _RustKernelLib + ExecutionKernel.reset_and_seed(); zeros stale K-accumulators at startup so K=E=live_capital → delta=0 → capital_frozen=False on every clean restart. - pink_direct.py: call kernel.reset_and_seed(live_capital) after _restore_kernel_snapshot() so BingX is always the ledger of record. - launch_dolphin_pink.py: DOLPHIN_PINK_VEL_DIV_THRESHOLD env-var override for on-exchange debugging; BLUE unaffected. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -285,9 +285,12 @@ def _build_runtime(*, phase: PinkPhase) -> PinkDirectRuntime:
|
||||
market_state_runtime = MarketStateRuntime()
|
||||
|
||||
# Decision and intent policy — unchanged from BLUE semantics.
|
||||
# DOLPHIN_PINK_VEL_DIV_THRESHOLD: relax for on-exchange debugging (e.g. -0.005).
|
||||
# Default -0.02 matches BLUE production. BLUE is unaffected.
|
||||
_vel_div_threshold = float(os.environ.get("DOLPHIN_PINK_VEL_DIV_THRESHOLD", "-0.02"))
|
||||
cfg = DecisionConfig(
|
||||
vel_div_threshold=-0.02,
|
||||
vel_div_extreme=-0.05,
|
||||
vel_div_threshold=_vel_div_threshold,
|
||||
vel_div_extreme=min(_vel_div_threshold * 2.5, -0.001),
|
||||
fixed_tp_pct=float(os.environ.get("DOLPHIN_FIXED_TP_PCT", "0.0020")),
|
||||
max_hold_bars=int(os.environ.get("DOLPHIN_MAX_HOLD_BARS", "250")),
|
||||
capital_fraction=0.20,
|
||||
|
||||
Reference in New Issue
Block a user