mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #4250] [GUI] record child absence before publishing managed host state #4974
Labels
No labels
needs-format
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Niko1221/Strata#4974
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Niko1221/Strata/pull/4250
Author: @zapabob
Created: 10/26/2026
Status: 🔄 Open
Base:
main← Head:codex/runtime-before-child-record📝 Commits (1)
743a533[GUI] record child absence before publishing managed host state📊 Changes
2 files changed (+88 additions, -21 deletions)
View changed files
📝
strata_control/runtime.py(+33 -21)📝
tests/terminal/test_runtime.py(+55 -0)📄 Description
Problem and result
The managed host publishes its state before entering the child-launch path. If it is killed whilst planning, the state can survive without any child ownership record. Recovery then correctly refuses to proceed, leaving the profile unavailable for subsequent loads.
This records an explicit private
no_childphase before publishing host state. Recovery recognises only the exact record for that host token, after taking the existing state lease. The launch path still writeslaunchingbefore spawning a child, so an uncertain spawn remains blocked.Approach and safety limits
The existing owned-child, identity and private-file checks remain. Missing markers, mismatched tokens and incomplete launch records are not treated as proof that a child is absent. This prevents the publication gap for future hosts; it deliberately does not delete or fabricate ownership records for profiles already stranded by an older version.
Validation
Windows, based on upstream
4b9e05a2a806a3fe24f7b2560d98626c37dade35.Passed:
uv run --no-project --with pytest --with regex --with jinja2 python -m pytest tests/terminal/test_runtime.py -k 'killed_host_before_launch or missing_marker_still or no_child_marker_failure or recovery_refuses_a_still_present_child' -q: 4 passed, 47 deselected, 27.20 seconds. The new cases kill a real host during planning, refuse a missing record, and inject a marker-write failure before state publication. The existing live-child refusal case also passes.git diff --check.Failed or corrected during preparation:
regex; temporary uv test dependencies were supplied without changing repository metadata.test_a_marker_left_by_a_killed_app_is_cleaned_up_when_its_number_belongs_to_a_later_programfails withstartup_wait_expired/ready_file_not_matchedboth with this patch and with the unchanged upstream runtime in the same environment. This is unresolved; no full-suite success is claimed.Not run: full terminal suite, Linux/macOS execution, installed desktop integration, or GPU inference. No real user profile or service was changed.
Kept as a draft because the broader startup check and cross-platform lifecycle verification remain outstanding.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.