Skip to content

Fix GUI ownership and cleanup through runtime wrappers - #48

Merged
InauguralPhysicist merged 1 commit into
mainfrom
fix/gui-wrapper-ownership
Oct 4, 2026
Merged

InauguralPhysicist merged 1 commit into
mainfrom
fix/gui-wrapper-ownership

Conversation

@InauguralPhysicist

Copy link
Copy Markdown
Contributor

The mouse oracle misses the runtime window when EIGENSCRIPT is a synchronous counting wrapper: it searches the wrapper PID and eventually reports app exited rc0. Track live members of a dedicated process group and session, retaining visible exact-title and PID matching. Cleanup covers the owned family even after its launcher exits, and defers SIGTERM through registration and cleanup.

Validation against the frozen one-file change:

  • Original wrapper failure reproduced; corrected actual GUI controls pass 8/8 with all 94 glyphs and identical baseline/target pixels. An unrelated same-title window survives cleanup.
  • Process controls pass 12/12, including exited launchers, TERM-ignoring children and interruption during cleanup.
  • Current-runtime direct and faithful counting-wrapper GUI runs each pass all 16 checks and kill all three planted faults.
  • Published v0.43.0 runtime passes all eight normal CI scripts, including the GUI and memory fault controls.
  • Independent review confirms all 16 assertion bodies, three faults, pixel thresholds and the shell wrapper are unchanged.

The initial external GUI calibration had an occluded screenshot and is excluded from acceptance; the corrected calibration verifies on-screen, nonoverlapping geometry and exact pixels. Cleanup is bounded under the tested conditions; direct SIGKILL cannot run Python cleanup.

Refs #47. The complete 16-consumer integration wave remains pending and the issue stays open until that acceptance finishes.

Track verified members of each launched session/process group for window
selection and cleanup; defer TERM across registration and registry drain.
Preserve the existing 16 assertions, three faults and pixel thresholds.

Validation: process12/12; actual GUIv2 8/8 with94/94glyphs; direct16/16+3/3
and counting-proxy16/16+3/3; pinnedv0.43 normalCI8/8. Original wrapper
failure reproduced. Occluded first GUI calibration explicitly excluded.

Refs #47; complete consumer-wave integration acceptance remains pending.
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 4, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-04T11:22:43.108874Z 74f9fca PR opened
🔒 Security Review ✅ Completed 2026-10-04T11:22:22.690952Z 74f9fca PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 74f9fcaa53

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread tests/mouse_oracle.py
if proc is not None:
stop_app(proc)
try:
stop_apps()

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Block SIGTERM before entering the final cleanup

When SIGTERM arrives after normal execution has entered this finally block but before stop_apps() executes its first pthread_sigmask, interrupted() raises immediately and changes SIGTERM to SIG_IGN. Depending on the exact bytecode, that exception either skips this call entirely or is caught by the nested except, which only records the error and never retries cleanup. Because the applications were launched with start_new_session=True, the active GUI process can then outlive the oracle and ignore the supervisor's subsequent TERM; block SIGTERM before entering this cleanup region or ensure the exception path still drains OWNED_APPS.

Useful? React with 👍 / 👎.

@InauguralPhysicist
InauguralPhysicist merged commit 52dd7d2 into main Oct 4, 2026
1 check passed
@InauguralPhysicist
InauguralPhysicist deleted the fix/gui-wrapper-ownership branch October 4, 2026 11:23
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