-
Notifications
You must be signed in to change notification settings - Fork 31
Add testing for positions. Tweak mdd logic. Refactoring #4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Conversation
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
f09dd77 to
53764e8
Compare
7e80444 to
7ca6d42
Compare
…g logic. Remove unused tests
7ca6d42 to
7a89f75
Compare
jbonilla-tao
added a commit
that referenced
this pull request
Sep 23, 2025
Document the new 0.1% * leverage spread (transaction) fee that applies to crypto pairs only. This fee simulates transaction costs that normal exchanges would add. Updates: - Added spread fee as third primary cost in miner.md - Created separate tables for carry fees and spread fees - Added new rule #4 in README.md for spread fee - Clarified this is a transaction fee, not bid-ask spread 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
jbonilla-tao
added a commit
that referenced
this pull request
Sep 24, 2025
Document the new 0.1% * leverage spread (transaction) fee that applies to crypto pairs only. This fee simulates transaction costs that normal exchanges would add. Updates: - Added spread fee as third primary cost in miner.md - Created separate tables for carry fees and spread fees - Added new rule #4 in README.md for spread fee - Clarified this is a transaction fee, not bid-ask spread 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
jbonilla-tao
added a commit
that referenced
this pull request
Sep 24, 2025
* Fix MDD checker race condition with additional position validation Added check to ensure refreshed position is still a candidate for price correction after acquiring lock. This prevents processing positions that may have been closed or are no longer valid for price updates. Changes: - Add _position_is_candidate_for_price_correction() check after position refresh - Log warning when position is no longer valid for correction - Bump subnet version to 6.7.6 This addresses race conditions where positions are modified between the initial position list snapshot and actual processing with locks. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]> * enable spread fee. * fix 2 tests * fix test * tests * Add stack traces to Slack error notifications in weight setter Include compact stack traces in error messages sent to Slack for better debugging. Uses existing ErrorUtils.get_compact_stacktrace() to provide filtered, relevant trace info. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]> * spread fee for crypto only. flat .1% * 1. fix bypass value and 2. default return/fees dict during edge case that probably was never hit. * Add spread fee documentation for crypto pairs Document the new 0.1% * leverage spread (transaction) fee that applies to crypto pairs only. This fee simulates transaction costs that normal exchanges would add. Updates: - Added spread fee as third primary cost in miner.md - Created separate tables for carry fees and spread fees - Added new rule #4 in README.md for spread fee - Clarified this is a transaction fee, not bid-ask spread 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]> * update regression tests for new fee * testing fixes * added validator. improve tests * meta inc * delta update makes assertions trigger * clear plm data in tests --------- Co-authored-by: Claude <[email protected]>
12 tasks
jbonilla-tao
added a commit
that referenced
this pull request
Nov 8, 2025
Issue #2: Remove is_alive() checks from LivePriceFetcher._start_server() - Removed all is_alive() checks that would crash when called from HealthChecker daemon - Use terminate() and kill() directly (safe to call on dead processes) - Rely on connect() to verify server is working instead of process checks - Simplified startup logic with 2s wait + connection attempt Issue #4: Move timestamp update inside lock in auto_sync.py - Moved last_signal_sync_time_ms update into finally block inside lock - Prevents race condition where second sync starts before timestamp updates - Ensures timestamp is always updated even if sync fails Issue #5: Remove unused shutdown_dict logic from daemons - Removed shutdown_dict parameter from HealthChecker.__init__() - Removed shutdown_dict parameter from FeatureRefresher.__init__() - Changed while loops from "while not self.shutdown_dict" to "while True" - Daemons run indefinitely and terminate when main process exits (daemon=True) - Updated validator.py to not pass shutdown_dict to daemon initializations 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
jbonilla-tao
added a commit
that referenced
this pull request
Nov 8, 2025
Issue #2: Remove is_alive() checks from LivePriceFetcher._start_server() - Removed all is_alive() checks that would crash when called from HealthChecker daemon - Use terminate() and kill() directly (safe to call on dead processes) - Rely on connect() to verify server is working instead of process checks - Simplified startup logic with 2s wait + connection attempt Issue #4: Move timestamp update inside lock in auto_sync.py - Moved last_signal_sync_time_ms update into finally block inside lock - Prevents race condition where second sync starts before timestamp updates - Ensures timestamp is always updated even if sync fails Issue #5: Remove unused shutdown_dict logic from daemons - Removed shutdown_dict parameter from HealthChecker.__init__() - Removed shutdown_dict parameter from FeatureRefresher.__init__() - Changed while loops from "while not self.shutdown_dict" to "while True" - Daemons run indefinitely and terminate when main process exits (daemon=True) - Updated validator.py to not pass shutdown_dict to daemon initializations 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
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.
Large refactor/simplification/modularization complete. No more need to use an epsilon constant. Combined FLAT conditions into one, unified total return calculation.
New tests are implemented to verify position internal state as well as final return values as orders are received.
next short term steps: Modularize tests more. Add more complex testing scenarios, add cache to mdd logic to allow non-blocking wait for deleting eliminated miner data.
Tests are passing but I should probably run this in testnet, right? Please advise