GH-598: second QA fix - first review#728
GH-598: second QA fix - first review#728bertllll wants to merge 27 commits intoGH-598-first-QA-fix-second-revfrom
Conversation
| } | ||
|
|
||
| pub fn acknowledge_scan_error(&mut self, error: &ScanError, logger: &Logger) { | ||
| debug!(logger, "Acknowledging a scan that couldn't finish"); |
There was a problem hiding this comment.
Perhaps you could add more details to this log, using the contents of the error.
* Fixed the AddRouteResultMessage panic problem too * Preemptive review issues * Formatting * example.com -> www.example.com * Formatting * Added some debug logging to track RRI * Formatting * Clippy * Made RRI logs more consistent and increased straggler timeout to 30s * Typo corrections * Interim commit * Tests pass * Unit tests pass * Interim commit: a real mess * Proxy Server tests passing; some cleanup yet to do * Unit tests are all passing * Unit and multinode tests pass * All the tests pass now * Tests passing except one in proxy_client * RRIDs are completely gone; hostnames are mandatory. * MOre review issues * Review issues * Test is passing now, and code is cleaner * Cleaned up some code * More review issues * Formatting * Added packet describers * Error message change. * log messages enhanced of StreamKey --------- Co-authored-by: czarte <czarte@gmail.com>
* update ci-matrix to test new runners * Revert Windows runner in CI matrix Moving windows runner back to 2022, so we can allow macos-latest to fully run through Actions
* Refine regex for max block count extraction and add test Updated regex to capture maximum block count from error messages more accurately - namely update to Nodies provider. Added a new test case for extracting this specific error response. * Fix inclusive range calculation for block scanning in BlockchainInterfaceWeb3 Adjusted the end block marker calculation to correctly account for inclusive ranges by subtracting 1 from the scan range. T * Fix block marker calculations in tests for blockchain bridge and interface. Adjusted expected new start block values to ensure accurate transaction retrieval and logging.
| } | ||
|
|
||
| pub fn acknowledge_scan_error(&mut self, error: &ScanError, logger: &Logger) { | ||
| debug!(logger, "Acknowledging a scan that couldn't finish"); |
There was a problem hiding this comment.
Bug: Insufficient logging detail in scan error handler (Bugbot Rules)
The debug log in acknowledge_scan_error logs a generic message without including error details. The PR reviewer explicitly requested adding more details using the contents of the error parameter, which contains scan_type, response_skeleton_opt, and msg fields that would aid debugging. The commit adds the log but doesn't incorporate the error's contents as requested.
* GH-827: add boilerplate code * GH-827: introduce new logic * GH-827: some renamings for clarity * GH-827: fix test estimate_transaction_fee_total_works_for_retry_txs * GH-827: refactor test estimate_transaction_fee_total_works_for_retry_txs * GH-827: fix test returns_correct_priced_qualified_payables_for_retry_payable_scan * GH-827: fix test blockchain_interface_web3_can_introduce_blockchain_agent_in_the_retry_payables_mode * GH-827: fix 2 more tests * GH-827: refactor retry_payables_gas_price_ceiling_test_of_border_value_if_the_previous_attempt_being_bigger * GH-827: review changes
node/src/accountant/scanners/payable_scanner/tx_templates/priced/retry.rs
Show resolved
Hide resolved
* PersistentConfiguration now handles CryptDEs * Temporary commit * All tests apparently passing * Starting to deal with the consequences of removing CryptDE as a static * About two-thirds done. * All unit tests passing * New integration test is passing * Unit, integration, and multinode tests passing * Review issues * Removed two fields from BootstrapperConfig * Formatting * Review issues * Removed unused second parameter to CrashTestDummy constructor * Formatting * Changing the way database passwords are established * Formatting * Trying to find issue with --fake-public-key and chain * Multinode tests and unit tests are working. * Formatting and removing debug logs * Removed unused import * Clippy appeasement * Review issues * Formatting * Switched test from example.com to testingmcafeesites.com * Made running single integration tests easier; added TLS retries to integration test * Formatting * Race in setup_reporter removed * Increased a timeout * Formatting * example.com -> www.example.com * Review issues * SetupReporter tests are modified and passing * Parsing command-line parameter * Implemented --new-public-key * --new-public-key default is now '' / Blank * Review issues * Now we know what to do, but there's a missing test * Now the GH-623 problem should be fixed * .gitignore for Copilot * Added newly-required --blockchain-service-url parameter to a test * Did some (not all) switching from www.example.com to www.testingmcafeesites.com * Now bad parameters return configuration error rather than panicking * formatting * If configuration returns the right error, it doesn't have to panic. --------- Co-authored-by: KauriHero <kaurihero@masq.ai> Co-authored-by: czarte <czarte@gmail.com>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
Bugbot Autofix prepared fixes for both issues found in the latest run.
- ✅ Fixed: Log message omits error content details
- Updated
acknowledge_scan_errorto include the fullScanErrorpayload in the debug log for better traceability.
- Updated
- ✅ Fixed: Test uses moved value in second assertion
- Changed the UTF-8 debug message conversions to use cloned response buffers so the original vectors remain available across both assertions.
Or push these changes by commenting:
@cursor push 42494c425a
Preview (42494c425a)
diff --git a/multinode_integration_tests/tests/data_routing_test.rs b/multinode_integration_tests/tests/data_routing_test.rs
--- a/multinode_integration_tests/tests/data_routing_test.rs
+++ b/multinode_integration_tests/tests/data_routing_test.rs
@@ -330,7 +330,7 @@
.is_some(),
true,
"Actual response:\n{}",
- String::from_utf8(one_response).unwrap()
+ String::from_utf8(one_response.clone()).unwrap()
);
assert_eq!(
index_of(
@@ -341,7 +341,7 @@
.is_some(),
true,
"Actual response:\n{}",
- String::from_utf8(one_response).unwrap()
+ String::from_utf8(one_response.clone()).unwrap()
);
}
{
@@ -353,7 +353,7 @@
.is_some(),
true,
"Actual response:\n{}",
- String::from_utf8(another_response).unwrap()
+ String::from_utf8(another_response.clone()).unwrap()
);
assert_eq!(
index_of(
@@ -364,7 +364,7 @@
.is_some(),
true,
"Actual response:\n{}",
- String::from_utf8(another_response).unwrap()
+ String::from_utf8(another_response.clone()).unwrap()
);
}
}
diff --git a/node/src/accountant/scanners/mod.rs b/node/src/accountant/scanners/mod.rs
--- a/node/src/accountant/scanners/mod.rs
+++ b/node/src/accountant/scanners/mod.rs
@@ -266,7 +266,10 @@
}
pub fn acknowledge_scan_error(&mut self, error: &ScanError, logger: &Logger) {
- debug!(logger, "Acknowledging a scan that couldn't finish");
+ debug!(
+ logger,
+ "Acknowledging a scan that couldn't finish: {:?}", error
+ );
match error.scan_type {
DetailedScanType::NewPayables | DetailedScanType::RetryPayables => {
self.payable.mark_as_ended(logger)| } | ||
|
|
||
| pub fn acknowledge_scan_error(&mut self, error: &ScanError, logger: &Logger) { | ||
| debug!(logger, "Acknowledging a scan that couldn't finish"); |
There was a problem hiding this comment.
Log message omits error content details
Low Severity
The new debug log "Acknowledging a scan that couldn't finish" in acknowledge_scan_error doesn't include the contents of the error: &ScanError parameter. The PR reviewer (@utkarshg6) specifically requested: "Perhaps you could add more details to this log, using the contents of the error." Including error in this log message would help with debugging since context can be lost between the error log at the caller and this acknowledgment.



Note
High Risk
Touches payment/scan orchestration and transaction pricing logic (retry amounts and gas price computation), which can directly affect on-chain payouts and automated recovery after failures.
Overview
Accountant scanning/retry behavior is refactored and tightened. Receivable scans are rescheduled only when appropriate (e.g., no UI response), start-scan error handling is centralized via
UnableToStartScanner, and retry-payable scans are now scheduled vianotify_laterwith an explicit interval.Retry transaction generation/pricing is changed. Retry templates now replace the retry amount with the latest payable balance (instead of adding), add detailed debug logging, and adjust gas-price logic to use
increase_by_percentagewith a fallback constant increment when the latest gas price drops; new constantsDEFAULT_GAS_PRICE_RETRY_PERCENTAGEandDEFAULT_GAS_PRICE_RETRY_CONSTANTare introduced.CLI/tests/infra updates. Adds
--new-public-key (on|off)and unifies on/off parsing via a sharedOnOffenum, updates integration tests to hitwww.testingmcafeesites.comendpoints, fixes failed-payable SQL matching forRecheckRequired, bumps crate versions to0.9.1, updates gitignores, and switches CI macOS runner tomacos-latest.Written by Cursor Bugbot for commit 8bd5a40. This will update automatically on new commits. Configure here.