Skip to content

fix(console): restore stdout after logout - #218

Merged
zoeyrose merged 1 commit into
mainfrom
fix/python-console-logout-livelock
Aug 13, 2026
Merged

fix(console): restore stdout after logout#218
zoeyrose merged 1 commit into
mainfrom
fix/python-console-logout-livelock

Conversation

@zoeyrose

@zoeyrose zoeyrose commented Aug 13, 2026

Copy link
Copy Markdown
Member

Summary

  • prevent a cached Python console with an invalidated activator from rendering during stdout flush
  • always restore process stdout after console evaluation, including flush failures
  • add regression coverage for invalid-activator teardown and stdout restoration

Issue linkage

Implements the physical-owner change for Classic issue 262. This cross-repository PR intentionally does not close that issue.

Coordinates

  • Base: main at 63952c73a08a9d9d4a99fdf08dcccda22ca9faae
  • Head: fix/python-console-logout-livelock at a36defbaaeba9f32dae8f87aa1b6d8d928900d4c
  • Worktree: /workspaces/atrinik/workspace/worktrees/content/issue-262-python-console

Validation

  • python3 -m unittest tools.tests.test_python_commands -v
  • python3 tools/validate.py
  • git diff --check
  • Dedicated Classic scenario provisioned with final content: issue-262-python-console.

The final profile’s integrated Classic build succeeded. Live topology staging was attempted twice and failed closed before process startup because the wrapper detected a changed staging destination; no topology or shared state was modified. The regression tests cover the affected Python stdout/invalid-activator lifecycle directly.

Manual verification

On a host with a display and a working wrapper topology staging environment:

./atrinik profile show issue-262-python-console --json
./atrinik scenario credentials issue-262-python-console
./atrinik topology show issue-262-python-console --state scenario-issue-262-python-console --json
./atrinik up --name issue-262-python-console --profile issue-262-python-console --state scenario-issue-262-python-console
./atrinik ps issue-262-python-console --json
./atrinik logs issue-262-python-console server --tail 100
./atrinik down issue-262-python-console

Log in with the locally retrieved scenario credentials, open /console, run print('output'), disconnect without exit(), then reconnect. The server should remain responsive and no invalid-activator console flush traceback should appear. Repeat by resetting only after shutdown with ./atrinik scenario reset issue-262-python-console; retain the scenario and worktree while this PR is open.

@zoeyrose
zoeyrose marked this pull request as ready for review August 13, 2026 22:12
@zoeyrose

Copy link
Copy Markdown
Member Author

Delivery update for the final head a36defbaaeba9f32dae8f87aa1b6d8d928900d4c:

  • complete owner validation and the focused console regression tests pass
  • all required PR checks pass; the fresh whole-diff review found zero actionable findings
  • dedicated Classic scenario issue-262-python-console was provisioned against this head and the integrated Classic build passed

The exact interactive replay, shutdown, reset, and preservation commands are in the PR’s Manual verification section. This host’s topology staging guard failed closed twice before process startup, so no live server replay was run here and no shared state was changed.

@zoeyrose
zoeyrose merged commit ffc24fe into main Aug 13, 2026
7 of 8 checks passed
@zoeyrose
zoeyrose deleted the fix/python-console-logout-livelock branch August 13, 2026 22:13
@github-actions

Copy link
Copy Markdown

🎉 This PR is included in version 4.2.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant