Skip to content

Extract application shutdown helpers without behavior changes - #234

Draft
dayfine wants to merge 8 commits into
mainfrom
startup/shutdown-refactor
Draft

dayfine wants to merge 8 commits into
mainfrom
startup/shutdown-refactor

Conversation

@dayfine

@dayfine dayfine commented Nov 6, 2026 •

Copy link
Copy Markdown
Owner

Base: main. No feature or lab parents; this diff is a mechanical prerequisite for lab PR #233.

Extract the existing service shutdown and worker-pool shutdown blocks from Main.cpp into file-local helpers. Calls, their order, conditional compilation, and the Windows Qt quick-exit workaround stay unchanged. File-local helpers now share one anonymous namespace inside PokemonAutomation, with no using namespace directive; main() and Qt metatype registration remain global. There are no argument-validation, profile-policy, test-mode or device-startup changes here.

Validation: code health passes against origin/main; whitespace checks pass. Full application builds and native suites are dispatched on macOS, Windows Clang and Ubuntu. No console or app deployment is involved.

How to review

Review this PR before #233. The helper bodies are moved from the end of main() without changing their statements. Compare using:

git diff --color-moved=dimmed-zebra --color-moved-ws=allow-indentation-change origin/main...startup/shutdown-refactor

This branch is based on fork main and contains no lab tooling, so it can be prepared for an upstream handoff independently. This is a draft on the fork, not an upstream submission.

Code-health dependency: #235 fixes baseline matching for namespace moves and namespace comments after metatype macros. This C++ revision passes the updated linter; canonical CI requires that tooling PR to merge into agents first.

dayfine and others added 5 commits November 6, 2026 07:00
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E
Conflict in Main.cpp: main no longer defines use_qt_ui() there, so the file-local namespace opens right after Q_DECLARE_METATYPE.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E
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