Skip to content

feat: log container execution heartbeats#158

Draft
iamdhrv wants to merge 1 commit into
forge-sdlc:mainfrom
iamdhrv:agent/container-heartbeat-logging
Draft

feat: log container execution heartbeats#158
iamdhrv wants to merge 1 commit into
forge-sdlc:mainfrom
iamdhrv:agent/container-heartbeat-logging

Conversation

@iamdhrv

@iamdhrv iamdhrv commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

Summary

Log a heartbeat every 60 seconds while a container process is running, including elapsed time and the remaining configured timeout. The heartbeat task is cancelled and awaited in a finally block, so it is cleaned up after success, timeout, or caller cancellation.

The regression coverage verifies both the exact progress message and that the background task cannot outlive a completed container process.

Fixes #78

Validation

  • pytest tests/unit/sandbox/test_runner_timeout_cleanup.py -q (5 passed)
  • pytest tests/unit/ -q (1467 passed, 2 skipped)
  • ruff check src/
  • ruff format --check on both changed files
  • mypy --follow-imports=skip src/forge/sandbox/runner.py
  • git diff --check

The repository-wide mypy src/forge/ command currently reports 293 existing errors across 57 files; the changed module passes when checked in isolation.

Development note: implemented with Codex assistance and validated locally with the complete unit suite.

Signed-off-by: Dhruv Maniya <dhruvmaniya1998@gmail.com>
@eshulman2 eshulman2 added enhancement New feature or request area:execution Agent execution, containers, sandboxes, and runtime drivers area:observability Metrics, tracing, dashboards, logging, and operational visibility work in progress labels Jul 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:execution Agent execution, containers, sandboxes, and runtime drivers area:observability Metrics, tracing, dashboards, logging, and operational visibility enhancement New feature or request work in progress

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: heartbeat logging during long-running container execution

2 participants