fix(controller): release completed subprocesses while retaining launch history - #618
Open
Bluu (Bluuok) wants to merge 1 commit into
Open
Bluu (Bluuok) wants to merge 1 commit into
Bluu (Bluuok) wants to merge 1 commit into
Conversation
Author
|
@microsoft-github-policy-service agree
|
Contributor
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The lifecycle changes are narrowly scoped, preserve retry records, and have comprehensive regression coverage.
Review effort: Balanced
Findings: None
What changed in this PR
Releases completed subprocess objects after successful terminal reporting while preserving compact rollout launch history.
Changes:
- Adds compact completed-process records and archival logic.
- Prevents stale rollout states from relaunching completed rollouts.
- Expands retry, shutdown, timeout, and garbage-collection coverage.
| File | Description |
|---|---|
agentlightning/controller/local_reconciler.py |
Archives completed processes after successful terminal patches. |
tests/controller/test_local_reconciler.py |
Verifies archival, retry, stale-state, shutdown, and object-release behavior. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
This branch has not been deployed
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.
Local reconciliation currently retains each completed
asyncio.subprocess.Processfor the controller's lifetime. Once its terminal status has been reported successfully, this change replaces the process record with compact launch history, allowing the process object to be released while preserving the already-launched check.Follow-up to #585: this deliberately retains history for every rollout ID. It does not evict history or bound the total number of IDs. Failed terminal patches and processes whose kill/wait has not completed keep their full record for retries; stale QUEUING/RUNNING responses cannot launch a completed rollout again.
Validation:
The Microsoft CLA check has passed. The fork CI workflow is awaiting maintainer approval and has not run. The existing local validation and its scope are documented above; this PR is being submitted for maintainer review with those limits disclosed.
AI assistance: Codex helped implement the change and tests. The diff and validation results were reviewed before submission.