-
Notifications
You must be signed in to change notification settings - Fork 68
Pad ethereum address with zero to fix transfer monitoring; fix operator monitoring re-assignment #335
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
+2,193
−50
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR enhances operator reconnection and task assignment robustness, adds comprehensive integration tests, and improves system status reporting and REST processing.
- Implements context-based ticker management and ensures task tracking resets on any reconnection
- Adds integration tests for ticker context races, operator reconnection flows, orphaned task reclamation, and monotonic clock behaviors
- Introduces a new
status
CLI command and updates REST and event-trigger components for JSON-aware processing and Ethereum address padding
Reviewed Changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 2 comments.
Show a summary per file
File | Description |
---|---|
integration_test/ticker_context_test.go | Tests for ticker context cancellation and connection stabilization |
integration_test/orphaned_task_reclamation_test.go | Tests orphaned task reclamation and monotonic clock reset |
integration_test/operator_reconnection_test.go | End-to-end and race-condition tests for operator reconnection |
integration_test/README.md | Documentation for integration tests |
docs/Operator_Reconnection_and_Task_Assignment.md | Detailed docs on reconnection and task assignment fixes |
core/taskengine/vm_runner_rest.go | Added JSON-aware template processing for REST bodies |
core/taskengine/trigger/event.go | Added padAddressIfNeeded for Ethereum topic filtering |
core/taskengine/engine.go | Major engine updates: ticker contexts, orphaned task reclamation, logging |
cmd/status.go | New status command for system health reporting |
aggregator/rpc_server.go | Removed outdated commented logging |
Comments suppressed due to low confidence (1)
cmd/status.go:25
- The new
status
command lacks automated tests. Add unit or integration tests to validate output formatting and error conditions (e.g., no DB, empty tasks).
fmt.Printf("📊 System Status Report\n")
…status command, fix misleading log message in engine.go, replace fixed 12s sleeps with configurable timeouts in integration tests, support testing.Short() flag for faster test execution, improve test robustness and reduce brittleness
…pdated preprocessJSONWithVariableMapping to use VM's smart variable resolution with fallback support for snake_case to camelCase, fixing CI/CD test failures in TestSmartVariableResolution
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.
This pull request introduces significant changes to improve task management, logging, and operator connection handling in the
core/taskengine
package, as well as updates to thecmd/status.go
file for enhanced system status reporting. Key themes include enhanced logging for debugging, improved operator lifecycle management, and better handling of orphaned tasks.Enhanced Logging for Debugging
core/taskengine/engine.go
: Added detailed logs for task creation, including node and edge breakdowns, as well as final counts for successful creation. Logs now include connection stability checks and task assignment details during operator reconnections. [1] [2] [3] [4]Operator Lifecycle Management
core/taskengine/engine.go
: Introduced ticker context and cancellation mechanisms to manage operator lifecycle more effectively, ensuring proper cleanup during disconnections and reconnections. Added safeguards to prevent race conditions during operator reconnections. [1] [2] [3]Handling Orphaned Tasks
core/taskengine/engine.go
: Improved orphaned task reassignment logic, ensuring tasks are reclaimed when operators reconnect. Added aggregated logging for reassigned tasks and introduced checks for active operators before reassignment. [1] [2]System Status Reporting
cmd/status.go
: Overhauled thestatus
command to display detailed system status, including active tasks in the database, troubleshooting tips, and database initialization checks.Testing Utilities
core/taskengine/engine.go
: AddedAddTaskForTesting
method to facilitate direct task injection into the engine for testing purposes, bypassing database storage and validation.