Skip to content

Bound stalled startup and accepted shutdown without timing out edits - #12

Merged
ellmos-multi-bot merged 4 commits into
mainfrom
fix/startup-cpu-20261022
Oct 22, 2026
Merged

ellmos-multi-bot merged 4 commits into
mainfrom
fix/startup-cpu-20261022

Conversation

@lukisch

@lukisch lukisch commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

Problem

Three installed 1.0.5 instances were found without a main window and with days
of sustained CPU use (private ticket T-20261022-397249193). The historical spin
could not be reproduced. Both affected inputs open and close successfully in
bounded tests of the actual release. No specific Qt or Markdown cause is claimed.

Change

  • Run a standard-library supervisor before Qt's PyInstaller runtime hooks.
  • Bound GUI startup to 60 seconds, including native imports and initial rendering.
  • Disable the window until the supervisor permanently acknowledges readiness.
  • Keep editable sessions free of elapsed-time termination, including IPC failures.
  • After a successful save/discard decision, disable the closing window and allow
    15 seconds for native close/teardown before stopping the retained child.
  • Keep failed saves and cancelled closes outside the shutdown deadline.
  • Route BAT, spec, and both packaged build modes through the guarded launcher.
  • Add six-language startup-error text and a bounded local event log.
  • Incorporate the existing targeted exclusion of PySide6 6.12.0, whose
    refcount crash was confirmed in the Ubuntu 3.10/3.11 CI jobs.

This is a startup/accepted-close containment fix. The historical cause remains
open for diagnosis. The installed Store package is unchanged by this PR.

Validation

  • Full Windows suite: 266 passed, 1 skipped (symlink privilege unavailable).
  • All 23 guard tests passed.
  • Independent current-head review: GO at 1c6c2d9,
    with an independent run of all 23 guard tests.
  • Ruff and git diff --check passed.
  • Independent dependency-delta review: GO for the unchanged existing exclusion
    commit on that reviewed base (new head c37f974).
  • Personal onedir executable: compiled main/launcher code matches the reviewed
    source; both reported inputs (test copies) open on native Windows and close
    with exit 0, with no remaining owned processes. The supervisor loads no QtGui.
  • No Store submission.

@ellmos-multi-bot

Copy link
Copy Markdown
Contributor

Independent functional review by GPT-6/Codex, separate session 01a160ec-8a99-7c83-b6e9-01276265c6a8, exact head c37f974. Read the complete 13-file diff, supervisor/worker entry paths, main startup and close/save logic, all guard tests, spec/BAT integration and language/dependency changes in an isolated checkout. No blocking finding in this startup/accepted-close containment change.

The window stays disabled until the supervisor has permanently disarmed startup termination and published ACK. After that transition, supervisor/IPC errors retain the child and wait rather than imposing an elapsed editing deadline. The teardown marker is emitted only after an accepted save/discard decision and disabling the window; failed document/settings saves and cancelled closes stay outside the shutdown deadline. The guard controls its retained child only. Both build modes/spec route through the pre-Qt runtime hook; the targeted Qt 6.12.0 exclusion is consistent across dependency files.

Independent Windows/Python 3.12.10 / PySide6 6.11.1: full suite 266 passed, one existing symlink-privilege skip (22.55s), including all 23 guard tests and their actual bounded child-process probes. The built-in --self-test completed with all checks successful, including temporary-copy document roundtrips. main.py py_compile, compilation of the other changed Python modules, Ruff, diff checks and German umlaut/six-language key verification passed. My custom in-tree pytest temp path initially made Ruff inspect generated fixture scripts; moving those own artifacts outside the checkout restored a clean unchanged-source lint result.

All 17 current head checks are successful; main is the default base, PR is non-Draft and CLEAN/MERGEABLE. No package version or workflow edit in the diff, and CONTRIBUTING does not require DCO. No source changes made by this review.

This review does not reproduce or identify the historical CPU-spin cause, certify a newly built EXE, establish visible native-window acceptance, update the installed Store package, or authorize Store submission. Those boundaries and the open historical diagnosis remain intact.

@ellmos-multi-bot
ellmos-multi-bot merged commit 316b939 into main Oct 22, 2026
17 checks passed
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.

2 participants