fix(binance): expose safe startup diagnostics - #279
Merged
Merged
Conversation
Co-Authored-By: Codex <noreply@openai.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
recovery_control_read_failed.RuntimeErrorsubclasses carrying a fixedreason_code.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 passedtests/test_validate_runtime_startup.py: 24 passedtests/test_main_runtime_error_notification.py: 12 passed, 2 subtests passedvalidate_onlyrun34998046567on SHAe66ec910ec85536f9e7bfdafeaaa7593cb580f61passed startup validation withexecution_permitted=false; it did not execute a full cycle.No deployment, live dispatch, merge, or production/runtime change is included.