Skip to content

Conversation

@joaquim-verges
Copy link
Member

@joaquim-verges joaquim-verges commented Nov 21, 2025

Summary by CodeRabbit

  • Bug Fixes

    • Ensured EOA operation locks are always released after workflow completion, even on errors; improved error-path handling to trigger break-on-failure reliably.
  • Performance & Optimization

    • Reduced concurrent in-flight EOA jobs to better balance resource use.
  • Logging & Observability

    • Added detailed job duration, remaining-work metrics, and enhanced debug logging for EOA processing.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link

coderabbitai bot commented Nov 21, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

EOA worker lock handling was refactored to always release the EOA lock after workflow completion (success or failure). Send preparation now flags failures earlier. Server logging was expanded and the EOA executor max in-flight limit was reduced from 100 to 50.

Changes

Cohort / File(s) Summary
EOA Worker Lock & Error Management
executors/src/eoa/worker/mod.rs
Reworked process() to capture workflow result, unconditionally release the EOA lock, then propagate errors; removed per-hook lock release and soft_release_eoa_lock() helper; adjusted imports (removed AsyncCommands, TransactionStoreError) and added public kms_client_cache fields.
EOA Send Failure Detection
executors/src/eoa/worker/send.rs
In clean_prepration_results, set failure_occurred = true immediately on Err(e) when should_break_on_failure is true, removing the later else-if assignment to ensure earlier break-on-first-failure behavior.
Server Initialization & Logging
server/src/main.rs
Reformatted imports and logs; expanded queue initialization log to include queue config details; minor reformatting around executor metrics initialization (behavior unchanged).
EOA Executor Concurrency Configuration
server/src/queue/manager.rs
Lowered EOA executor max_inflight from 100 to 50.

Sequence Diagram

sequenceDiagram
    participant Caller
    participant process
    participant execute_main_workflow
    participant EOA_Lock

    Caller->>process: start job
    process->>EOA_Lock: acquire lock
    process->>execute_main_workflow: run workflow

    alt workflow succeeds
        execute_main_workflow-->>process: Ok(result)
        rect rgb(220, 250, 220)
            note right of process: Unconditionally release lock before returning
            process->>EOA_Lock: release lock
        end
        process-->>Caller: Ok(result)
    else workflow fails
        execute_main_workflow-->>process: Err(error)
        rect rgb(255, 230, 230)
            note right of process: Unconditionally release lock, then propagate error
            process->>EOA_Lock: release lock
        end
        process-->>Caller: Err(error)
    end
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

  • Review executors/src/eoa/worker/mod.rs for correct unconditional lock release semantics, ensuring no race or double-release with other code paths.
  • Verify executors/src/eoa/worker/send.rs change doesn't alter retry or downstream logic unintentionally.
  • Validate server/src/queue/manager.rs concurrency reduction impact on throughput and queuing behavior.

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The pull request title accurately summarizes both main changes: EOA lock release improvements and max_inflight reduction to 50, matching the primary modifications across multiple files.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between c60f92c and 227a458.

📒 Files selected for processing (4)
  • executors/src/eoa/worker/mod.rs (6 hunks)
  • executors/src/eoa/worker/send.rs (1 hunks)
  • server/src/main.rs (3 hunks)
  • server/src/queue/manager.rs (1 hunks)

Comment @coderabbitai help to get the list of available commands and usage tips.

@joaquim-verges joaquim-verges marked this pull request as ready for review November 21, 2025 01:36
Copy link
Member Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@joaquim-verges joaquim-verges force-pushed the Improve_EOA_lock_release_and_reduce_max_inflight_to_50 branch from c60f92c to 227a458 Compare November 21, 2025 01:42
@joaquim-verges joaquim-verges merged commit a0d76d7 into main Nov 21, 2025
3 of 4 checks passed
@joaquim-verges joaquim-verges deleted the Improve_EOA_lock_release_and_reduce_max_inflight_to_50 branch November 21, 2025 01:42
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.

2 participants