feat: log container execution heartbeats#158
Draft
iamdhrv wants to merge 1 commit into
Draft
Conversation
Signed-off-by: Dhruv Maniya <dhruvmaniya1998@gmail.com>
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.
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
finallyblock, 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 --checkon both changed filesmypy --follow-imports=skip src/forge/sandbox/runner.pygit diff --checkThe 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.