Skip to content

fix(binance): expose safe startup diagnostics - #279

Merged
Pigbibi merged 1 commit into
mainfrom
fix/binance-startup-diagnostic-reason-20260916
Sep 15, 2026
Merged

Pigbibi merged 1 commit into
mainfrom
fix/binance-startup-diagnostic-reason-20260916

Conversation

@Pigbibi

@Pigbibi Pigbibi commented Sep 15, 2026

Copy link
Copy Markdown
Collaborator

Problem

Binance live startup failures were reduced to runtime_setup_failed stage=strategy_load error_type=RuntimeError, so the operator could not distinguish a recovery-control read failure from a later validation or authorization rejection.

Change

  • Classify only the recovery-control read boundary as the fixed safe reason recovery_control_read_failed.
  • Reuse the startup validator's allowlist for safe exception reason codes, including RuntimeError subclasses carrying a fixed reason_code.
  • Keep validation and authorization failures on their existing reason codes; unknown exceptions remain generalized.
  • Show the machine reason code in runtime logs and a fixed human-readable Chinese or English explanation in notifications.
  • Add offline stub coverage and document the diagnostic boundary.

This improves diagnosis only. It does not claim to identify the historical first failure, activate recovery, or restore a real trading cycle. There is no retry, recovery-state change, broker action, or order path.

Validation

  • tests/test_reconciliation_recovery.py: 25 passed
  • tests/test_validate_runtime_startup.py: 24 passed
  • tests/test_main_runtime_error_notification.py: 12 passed, 2 subtests passed
  • Total: 61 passed, 2 subtests passed
  • Ruff and diff checks passed in the pinned validation environment.
  • validate_only run 34998046567 on SHA e66ec910ec85536f9e7bfdafeaaa7593cb580f61 passed startup validation with execution_permitted=false; it did not execute a full cycle.

No deployment, live dispatch, merge, or production/runtime change is included.

Co-Authored-By: Codex <noreply@openai.com>
@Pigbibi
Pigbibi merged commit 3af2c43 into main Sep 15, 2026
1 check passed
@Pigbibi
Pigbibi deleted the fix/binance-startup-diagnostic-reason-20260916 branch September 15, 2026 18:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant