refactor(mqlaunch): de-layer diagnostics into a lib (Step 11a)#43
Merged
Conversation
Third Step 11a slice. Pull the diagnostics concern — version reporting (get_repo_version, show_version_info), self-check, debug bundle, and release notes — out of the mqlaunch.sh monolith into mqlaunch/lib/diagnostics.sh, sourced back into the launcher's scope. Verbatim move: the functions still rely on the launcher's ambient UI helpers and $BASE_DIR, and every caller (main dispatch + command-mode) resolves because the lib sources before dispatch. No behavior change. Pure bash, so the lib carries a bash shebang and is covered by shellcheck. Launcher: 1771 → 1654 lines (~430 out since 11a began). Add the diagnostics row to tests/monolith-delayer-smoke.sh (now 28 functions across 3 concern libs). AUTHORITY_MAP lists the new LIVE support lib; CHANGELOG updated. Note: system_check (an isolated diagnostics function elsewhere in the monolith) is a candidate for a follow-up slice into this same lib; left out here to keep this a single contiguous verbatim band. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Third slice of Step 11a (monolith de-layering, audit P4). Pull the diagnostics concern out of
terminal/launchers/mqlaunch.shintomqlaunch/lib/diagnostics.sh:get_repo_version,show_version_info,run_self_check,run_debug_bundle,show_release_notes.$BASE_DIR. No behavior change.… || true), since the lib sources before dispatch.Guard
Added the diagnostics row to
tests/monolith-delayer-smoke.sh— now 28 functions across 3 concern libs, each asserted defined-in-lib, sourced-by-launcher, not-redefined-in-monolith.Verification
Docs
docs/AUTHORITY_MAP.mdlists the new LIVE support lib;CHANGELOG.mdconsolidates the three 11a extractions.Follow-up note:
system_checkis an isolated diagnostics function elsewhere in the monolith — a candidate for a later slice into this same lib. Left out here to keep this a single contiguous verbatim band (R2: one concern per PR, no batching).Part of the
v2.0.0runtime-authority track; 11a unblocks Step 12 (v1 removal).🤖 Generated with Claude Code