Harden live actor diagnostics and retries#40
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces comprehensive match-search diagnostics across the bot, supervisor, and order packages, providing better visibility into order matching and rejection reasons. It refines error handling by categorizing fetch failures as retryable and improves the tester's logic for skipping fresh orders based on their actionability. Additionally, the supervisor now tracks matchable order and candidate counts in its public state. Feedback for this PR suggests using shared BigInt comparison utilities in the order package instead of redefining local helper functions to ensure consistency and avoid potential precision issues.
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request enhances the bot's monitoring and diagnostic capabilities by introducing detailed match-search statistics and structured error reporting. It updates the order matching engine to track candidate viability and rejection reasons, which are now surfaced through bot events and captured by the supervisor. Additionally, the tester's logic for skipping fresh orders was refined to account for current fee rates and marketability. Feedback was provided to ensure that the new diagnostic counters for insufficient allowances are mutually exclusive to prevent double-counting in the reported statistics.
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request introduces comprehensive match-search diagnostics to the OrderManager.bestMatch function and propagates these diagnostics through the bot and supervisor applications. It also refines error handling for bot iterations by distinguishing between retryable and terminal failures, and updates the tester application to include fee-aware actionability checks for orders. Feedback focuses on optimizing the bestMatch implementation to reduce redundant iterations and leveraging the OrderMatcher directly for single-order checks in the tester to improve efficiency and simplify the API surface.
There was a problem hiding this comment.
Code Review
This pull request introduces comprehensive match-search diagnostics within the OrderManager, enabling the bot and supervisor to track detailed order matching metrics and rejection reasons. It refines error handling by identifying retryable fetch failures and managing unrepresentable tester estimates. Additionally, the tester's logic for skipping fresh orders was updated with a more precise actionability check, and the block threshold for these skips was significantly reduced. Feedback was provided to optimize the isActionableOrder function in the tester by utilizing OrderMatcher directly for single-order evaluations instead of the more resource-intensive bestMatch search.
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request introduces comprehensive match diagnostics across the bot, supervisor, and order packages, providing detailed insights into order matching and rejection reasons. It refactors the bestMatch logic to collect these diagnostics and updates the bot's error handling to better manage retryable failures, such as fetch transport errors. Additionally, the PR adjusts tester parameters, including a significant reduction in MAX_ELAPSED_BLOCKS, and reorders supervisor loop logic to prioritize incident reporting. Feedback was provided to use a more idiomatic approach for counting matchable orders in the order package.
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request introduces comprehensive diagnostic tracking for order matching across the bot, supervisor, and order packages, refactoring the bestMatch logic to collect detailed statistics on match candidates and rejection reasons. It also improves error handling by identifying retryable "fetch failed" errors, updates the tester's order skipping logic to be fee-aware, and adjusts the supervisor loop to prioritize incident reporting. Feedback was provided to ensure that transient network errors are treated as unconfirmed statuses rather than fatal errors, adhering to repository polling guidelines.
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request introduces comprehensive match-search diagnostics and improves error handling for retryable bot iterations. Key changes include the addition of detailed diagnostic tracking in the OrderManager to report candidate counts and rejection reasons, and the expansion of retryable errors to include fetch failures. The supervisor and tester apps were updated to utilize these new diagnostics and handle unrepresentable estimate errors. Additionally, the tester's logic for skipping fresh matchable orders was refined to consider actual actionability and current fee rates. I have no feedback to provide as there were no review comments to assess.
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request introduces comprehensive match-search diagnostics within the OrderManager and propagates this data through the bot and supervisor applications. It refactors the bestMatch logic to collect detailed statistics on candidate evaluation, including reasons for rejection such as insufficient allowance or non-positive gain. Additionally, it improves error handling by identifying retryable fetch failures and unrepresentable tester estimates, updates the tester's fresh order skip logic to use actionable criteria, and adjusts constants and documentation related to bot iteration behavior. I have no feedback to provide as there were no review comments to assess.
|
LGTM Phroi %163 |
Why
Live iCKB actor runs need public evidence that explains why matching did or did not progress, and transient chain/RPC races should not prematurely consume bounded iterations or stop the bot.
Changes