Run task suites on agents - #237
Open
un-lock-able wants to merge 7 commits into
Open
Conversation
un-lock-able
commented
Jul 29, 2026
| /// terminal job answers 409, which the agent reads as "the job is closed, | ||
| /// stop reporting and go idle". | ||
| #[error("Conflicting request: {0}")] | ||
| Conflict(String), |
Comment on lines
+25
to
+30
| fn suite_sweep_period(idle_window: std::time::Duration) -> std::time::Duration { | ||
| (idle_window / 2).clamp( | ||
| std::time::Duration::from_secs(1), | ||
| std::time::Duration::from_secs(30), | ||
| ) | ||
| } |
| pub struct MitoCoordinator { | ||
| pub infra_pool: InfraPool, | ||
| pub worker_task_queue: TaskDispatcher, | ||
| pub worker_heartbeat_queue: HeartbeatQueue, |
Comment on lines
+213
to
+217
| let delay = period | ||
| + std::time::Duration::from_millis(rand::Rng::random_range( | ||
| &mut rand::rng(), | ||
| 0..=(period.as_millis() as u64 / 2), | ||
| )); |
| /// this point the oldest events are dropped. Notifications are hints — the | ||
| /// agent re-derives the real state from the HTTP endpoints — so a dropped one | ||
| /// costs at most a delay until the next `SuiteAvailable`. | ||
| const MAX_BUFFERED_NOTIFICATIONS: usize = 256; |
Comment on lines
+42
to
+44
| Unregister { uuid: Uuid }, | ||
| /// Forget the agent entirely (buffer included). | ||
| RemoveAgent { uuid: Uuid }, |
| /// everything still buffered beyond it **without** dropping it. | ||
| PendingNotifications { | ||
| uuid: Uuid, | ||
| after_id: u64, |
Comment on lines
+41
to
+43
| .route("/job/start", post(start_job)) | ||
| .route("/job/cleanup", post(enter_cleanup)) | ||
| .route("/job/complete", post(complete_job)) |
un-lock-able
commented
Jul 29, 2026
BobAnkh
requested changes
Jul 29, 2026
BobAnkh
left a comment
Member
There was a problem hiding this comment.
I leave this to update the state, but the comments below you should still consider.
| Mode::Agent(agent_cli) => { | ||
| // Multi-threaded: the agent runs its main loop, a WebSocket reader, | ||
| // and a suite runner concurrently. | ||
| tokio::runtime::Builder::new_multi_thread() |
Member
There was a problem hiding this comment.
We shall discuss on this, to see if we need multi_thread for agent.
un-lock-able
force-pushed
the
suite-agent
branch
from
July 29, 2026 15:34
df808c8 to
2a2a735
Compare
un-lock-able
force-pushed
the
suite-agent
branch
from
July 31, 2026 09:36
71851ce to
9220390
Compare
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
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.
No description provided.