Skip to content

fix(lifecycle): accept confirmed concurrent session cleanup - #149

Merged
roodboi merged 1 commit into
nextfrom
fix/lifecycle-cleanup-race
Oct 6, 2026
Merged

roodboi merged 1 commit into
nextfrom
fix/lifecycle-cleanup-race

Conversation

@roodboi

@roodboi roodboi commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

Draft; scope corrected. This is independent concurrency hardening, not the cause of the reported native application shutdown refusal. The private test harness selected a different tmux server containing a same-name session with a different ownership token. Hack correctly refused that foreign session. Native shutdown qualification must use the application's verified supervisor context; it is not established by the first attempt with this build.

Concurrent foreground shutdown can separately remove an owned lifecycle session between listing it and reading its ownership token. Recheck the exact session only when the persisted backend/name/token match and the observed token is missing; accept explicit absence while preserving refusals for changed tokens, live or unknown sessions, missing query support, and backend errors.

The deterministic regression reproduces that interleaving with the actual owned-session retirement helper: it fails on the base and passes with this change. Validation: 47 focused lifecycle tests; full CLI suite 2,079 passed, 68 skipped, zero failures; typecheck, lint, privacy scan, compiled CLI build and version invocation passed. Unchanged database checks used the shared cache. Independent source review found no blocker. These source checks do not establish reproduction of this race in the real application.

Related: HACK-1216. Native application shutdown acceptance and packaged prerelease qualification remain separate gates; this PR does not publish a release.

@roodboi
roodboi marked this pull request as draft October 6, 2026 14:57
@roodboi
roodboi marked this pull request as ready for review October 6, 2026 17:25
@roodboi
roodboi merged commit 5436182 into next Oct 6, 2026
10 checks passed
@roodboi
roodboi deleted the fix/lifecycle-cleanup-race branch October 6, 2026 17:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant