Repository navigation
Stop runs the previous template saved - #3343
Open
jparker2006 wants to merge 3 commits into
Open
jparker2006 wants to merge 3 commits into
jparker2006 wants to merge 3 commits into
Conversation
Co-authored-by: Jake Parker <jparker2006@users.noreply.github.com>
Member
Author
Review #3343 at 50d0d33I inferred Grok (xAI) from the Cursor attribution and date. This review is from OpenAI Codex.
Checked all three changed files against #1694 and the repo standards. #1694 has no formal owned-paths section. The driver and test are within its stated template scope, and the fleet rules cover its changelog file. All 27 template tests and five template-focused driver-kit tests passed on Linux, including the kit's simulated macOS case. The synthetic upgrade probes also confirmed that wake refuses the old record and stop ends a foreground-only harness. VERDICT: CHANGES at 50d0d33 |
…confirmation (#1694) - Find surviving legacy processes tied to recorded turn PIDs, process groups, or sessions on Linux, verify OPENWIZ_RUN only on those candidates, stop them and their descendants with the normal shutdown grace before SIGKILL, and confirm exit before recording stopped. - Refuse before marking stopped when shutdown cannot be confirmed (surviving processes, unreadable own-process environ, or hosts without /proc). - Exercise the pre-#1590 upgrade path with surviving workers, checkpoint grace, SIGKILL escalation, unconfirmed-shutdown refusals, and PID-reuse safety. - Narrow changes/1694.md to the verified behavior (supporting edit: kind 2, changes/1694.md).
Live-rig's four-driver fixture appends falsy 0 to a dict turn list to simulate a failed wake while keeping stop working; matching legacy_turns only when every turn entry is an int keeps that path intact.
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
A run saved by the template from before #1590 stores each turn as a pid. Wake and stop treated every turn as a supervisor object, so both failed with TypeError after stop had already marked the run stopped, and the old process kept running.
Stop now ends those pids, and only when the process still carries that run's
OPENWIZ_RUNmark, before it records the run as stopped. Wake refuses that record instead of starting another turn.Fixes #1694
Tests
python3 -I adapters/template/test_driver.py Template.test_a_run_saved_by_the_older_template_stops_and_does_not_wakeandTemplate.test_stop_ends_what_the_turn_left_behind_after_it_exits.