Skip to content

Conversation

@chrisli30
Copy link
Member

will-dz and others added 10 commits November 21, 2025 14:19
* fix: add bundler availability checks and withdrawal tests

- Add CheckBundlerAvailability utility function to testutil for centralized bundler connectivity checks
- Add EnsureWalletDeployed utility function to programmatically deploy smart wallets for integration tests
- Add bundler availability checks to all withdrawal and UserOp-related tests:
  * TestUserOpExecutionFailureInsufficientBalance
  * TestUserOpExecutionFailureExcessiveTransfer
  * TestUserOpExecutionSuccessWithPaymaster
  * TestSendUserOp
  * TestBuildUserOpWithPaymasterErrors
  * TestUserOpETHTransferWithPaymaster
  * TestUserOpUSDCWithdrawalWithPaymaster
  * TestUserOpEntryPointWithdrawalWithPaymaster
  * TestUserOpETHWithdrawal_Sepolia
  * TestRunNodeImmediately_UniswapSwap_Base (and variants)
  * TestExecuteTask_SequentialContractWrites_Sepolia
- Fix ControllerAddress not being set in mockGetBaseTestSmartWalletConfig()
- Add paymaster signature validation debugging (verifyingSigner check)
- Add TestUserOpETHWithdrawal_Sepolia: fixed 0.001 ETH withdrawal test on Sepolia
- Add TestWithdrawAllETH_Sepolia: 'withdraw all' test with manual build tag (excluded from normal test runs)
- Update TEST-IMPROVEMENTS-EXECUTION-SUCCESS.md documentation with current test status

* fix: separate smart wallet ownership and deployment validation checks

* fix: update get-copilot-comments script for EigenLayer-AVS repo

* fix: correct bash syntax errors in analyze-userop.sh hex conversion

* Remove a test analysis md file from docs
- Change summary line to show '{failedCount} out of {totalSteps} nodes failed' format
- Remove redundant 'contract writes failed' text from on-chain transactions line
- Remove 'ultimately' from error status message
- Fix total steps calculation to use executedSteps + skippedCount instead of getTotalWorkflowSteps
  to match top message format and account for skipped nodes correctly
- Update tests to use ExecutionLogs array length as source of truth
…#433)

* chore: add plan for implementing active status

* fix: switch to active/inactive tasks; add SetTaskActive; update operator/storage/tests

* fix: active/inactive tasks; add SetTaskActive; update operator, storage, tests; integration fixes

* fix: test failures caused by mock server
* fix: migrate to enabled/disabled; harden engine concurrency; update tests/docs

* fix: complete enabled/disabled terminology migration per copilot feedback
…ue (#436)

* feat: add cooldown mechanism for event triggers

- Add cooldown_seconds field to EventTrigger config (default: 300s/5min)
- Implement cooldown logic to prevent repeated triggers when conditions remain true
- Extract cooldown check and update methods for testability
- Add comprehensive unit tests covering all cooldown scenarios
- Define DefaultEventTriggerCooldownSeconds constant
- Update registry and node_types to support cooldown configuration

This prevents event triggers from firing constantly when conditions are met
(e.g., price > threshold fires every block). The cooldown ensures tasks only
trigger once per configured period, even if matching events continue to occur.

* fix: update cooldown logic and remove unused legacy functions

- Update cooldown extraction: use default (300s) only when not set (nil), respect explicit 0
- Remove unused legacy functions: logMatchesTask and evaluateEventConditions
- Update legacy conversion to use default cooldown for old tasks
- Update comments to reflect new cooldown behavior

* fix: atomic cooldown check-and-update to prevent race condition

- Add checkAndUpdateCooldown method that atomically checks cooldown and updates timestamp
- Prevents TOCTOU vulnerability where concurrent events could both pass cooldown check
- Follows same atomic pattern as deduplication logic in processLog
- Initialize cooldownMutex explicitly in test setup for clarity

* fix: use MockAPIEndpoint in template tests to prevent CI timeouts

- Replace httpbin.org endpoints with MockAPIEndpoint in TestRunNodeImmediately_MalformedTemplateDetection
- Replace httpbin.org endpoints with MockAPIEndpoint in TestRunNodeImmediately_ValidTemplateAfterFix
- Prevents network timeout failures in CI environments
…#437)

* fix: run_node error response not clear for contract_read node

* fix: run_node error response for contract_write node

* fix: prevent data race in StreamCheckToOperator by fixing lock release timing

Fixed a critical data race condition in StreamCheckToOperator where the lock
was released prematurely inside the if block, leaving the else block to access
and modify n.trackSyncedTasks without proper synchronization.

Changes:
- Release lock once after both if/else branches complete
- Store oldTickerCancel while holding lock, then cancel after lock release
- Add comprehensive concurrent access tests with race detector enabled
- Tests verify both concurrent connections and reconnection race scenarios

* fix: ensure finalizeStep is single source of truth for step success

- Add finalizeStep calls to all early error returns in ContractRead Execute
- Remove redundant safeguards in RunNodeImmediatelyRPC that were setting success value
- Success value is now deterministically set only by finalizeStep, ensuring consistent behavior
- All error handling tests pass, confirming proper error propagation

* fix: remove redundant log.WriteString calls in ContractRead error handling

The error messages are already captured by finalizeStep via err.Error(),
so writing them to the log buffer before finalizeStep is redundant.

* fix: simplify fallback logic and clarify comment per Copilot review

- Remove overly defensive fallback logic in ContractRead success computation
  (methodResults, rawResultsForMetadata, and results all contain same error info)
- Clarify comment about abiType.T == 0 check (detects unspecified/zero-value, not incomplete types)
- The 'invalid request:' prefix is intentional and matches test expectations
@chrisli30 chrisli30 changed the title staging feat: switch cancel task to active/inactive tasks; add SetTaskActive; Dec 20, 2025
@chrisli30 chrisli30 merged commit 61e54e3 into main Dec 20, 2025
17 checks passed
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.

4 participants