Skip to content

Run task suites on agents - #237

Open
un-lock-able wants to merge 7 commits into
devfrom
suite-agent
Open

Run task suites on agents#237
un-lock-able wants to merge 7 commits into
devfrom
suite-agent

Conversation

@un-lock-able

Copy link
Copy Markdown

No description provided.

@un-lock-able
un-lock-able requested a review from BobAnkh July 28, 2026 18:02
Comment thread config.example.toml Outdated
Comment thread netmito/src/error.rs
/// terminal job answers 409, which the agent reads as "the job is closed,
/// stop reporting and go idle".
#[error("Conflicting request: {0}")]
Conflict(String),

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Modify

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),
)
}

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Modify

pub struct MitoCoordinator {
pub infra_pool: InfraPool,
pub worker_task_queue: TaskDispatcher,
pub worker_heartbeat_queue: HeartbeatQueue,

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WorkerHeartBeatQueue

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),
));

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove jitter

/// 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;

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Check unbounded

Comment on lines +42 to +44
Unregister { uuid: Uuid },
/// Forget the agent entirely (buffer included).
RemoveAgent { uuid: Uuid },

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

difference?

/// everything still buffered beyond it **without** dropping it.
PendingNotifications {
uuid: Uuid,
after_id: u64,

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rename ack_by_id

Comment thread netmito/src/agent.rs
Comment thread netmito/src/api/agents.rs
Comment on lines +41 to +43
.route("/job/start", post(start_job))
.route("/job/cleanup", post(enter_cleanup))
.route("/job/complete", post(complete_job))

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Combine

Comment thread netmito/src/config/agent.rs Outdated

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Check diff with worker.rs

@BobAnkh BobAnkh left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I leave this to update the state, but the comments below you should still consider.

Comment thread config.example.toml Outdated
Comment thread src/main.rs
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()

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We shall discuss on this, to see if we need multi_thread for agent.

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