Skip to content

implemented status heartbeat#189

Open
raphael-goetz wants to merge 1 commit intomainfrom
#187-status-heartbeat
Open

implemented status heartbeat#189
raphael-goetz wants to merge 1 commit intomainfrom
#187-status-heartbeat

Conversation

@raphael-goetz
Copy link
Copy Markdown
Member

Resolves: #187

Copilot AI review requested due to automatic review settings April 28, 2026 16:54
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Implements a periodic “heartbeat” update of Taurus runtime status (issue #187) so the runtime continually reports Running while active, rather than only updating status at startup/shutdown.

Changes:

  • Added a configurable runtime-status heartbeat interval (env-driven) to Taurus configuration.
  • Started a background Tokio task in dynamic mode to periodically call update_runtime_status(Running).
  • Aborted the heartbeat task during shutdown and then updated status to Stopped.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
crates/taurus/src/config/mod.rs Adds a new config field/env var for heartbeat interval.
crates/taurus/src/app/mod.rs Spawns/aborts the heartbeat task and adjusts runtime-status service ownership for the task.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +27 to +29
/// Runtime status heartbeat interval in seconds while Taurus is running.
/// Set to 0 to disable periodic heartbeat updates.
pub adapter_status_update_interval_seconds: u64,
Copy link

Copilot AI Apr 28, 2026

Choose a reason for hiding this comment

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

The new config field name/env var (adapter_status_update_interval_seconds / ADAPTER_STATUS_UPDATE_INTERVAL_SECONDS) doesn’t match the docstring (“Runtime status heartbeat”). Consider renaming the field and env var to refer to runtime-status/heartbeat (and update the doc comment to mention it only applies in dynamic mode, since the status service is only initialized there).

Copilot uses AI. Check for mistakes.
Comment on lines +152 to +156
loop {
interval.tick().await;
status_service
.update_runtime_status(tucana::shared::execution_runtime_status::Status::Running)
.await;
Copy link

Copilot AI Apr 28, 2026

Choose a reason for hiding this comment

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

The heartbeat loop calls update_runtime_status on every tick; that method logs at INFO level on each call and performs a network request. With the default 30s interval this can create persistent log noise and steady load on Aquila/Sagittarius. Consider lowering the log level for periodic heartbeats (or adding a lightweight/quiet update path) so normal operation doesn’t spam logs.

Copilot uses AI. Check for mistakes.
}

async fn update_stopped_status(runtime_status_service: Option<&TaurusRuntimeStatusService>) {
async fn update_stopped_status(runtime_status_service: Option<&Arc<TaurusRuntimeStatusService>>) {
Copy link

Copilot AI Apr 28, 2026

Choose a reason for hiding this comment

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

update_stopped_status takes Option<&Arc<TaurusRuntimeStatusService>>, which propagates the Arc into the helper’s signature. To keep the helper independent of the ownership strategy, consider taking Option<&TaurusRuntimeStatusService> and calling it with runtime_status_service.as_deref() (and similarly for other call sites).

Suggested change
async fn update_stopped_status(runtime_status_service: Option<&Arc<TaurusRuntimeStatusService>>) {
async fn update_stopped_status(
runtime_status_service: Option<&TaurusRuntimeStatusService>,
) {

Copilot uses AI. Check for mistakes.
@github-actions
Copy link
Copy Markdown

GitLab Pipeline Action

General information

Link to pipeline: https://gitlab.com/code0-tech/development/taurus/-/pipelines/2486106095

Status: Passed
Duration: 1 minutes

Job summaries

docs:preview

Documentation preview available at https://code0-tech.gitlab.io/-/development/telescopium/-/jobs/14127729616/artifacts/out/index.html

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.

Runtime status should be changed to a heartbeat

2 participants