Skip to content

refactor(mqlaunch): de-layer diagnostics into a lib (Step 11a)#43

Merged
MCamner merged 1 commit into
mainfrom
feat/monolith-delayer-diagnostics
Jul 5, 2026
Merged

refactor(mqlaunch): de-layer diagnostics into a lib (Step 11a)#43
MCamner merged 1 commit into
mainfrom
feat/monolith-delayer-diagnostics

Conversation

@MCamner

@MCamner MCamner commented Jul 5, 2026

Copy link
Copy Markdown
Owner

What

Third slice of Step 11a (monolith de-layering, audit P4). Pull the diagnostics concern out of terminal/launchers/mqlaunch.sh into mqlaunch/lib/diagnostics.sh:

get_repo_version, show_version_info, run_self_check, run_debug_bundle, show_release_notes.

  • Verbatim move, sourced back into the launcher's scope — still uses the ambient UI helpers and $BASE_DIR. No behavior change.
  • All callers resolve (main dispatch + command-mode … || true), since the lib sources before dispatch.
  • Pure bash → bash shebang + full shellcheck coverage.
  • Launcher: 1771 → 1654 lines. Since 11a began: 2082 → 1654, ~430 lines now out of the monolith across three concern libs.

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

  • Full selftest suite green (144 shell files lint clean); shellcheck clean on the new lib.
  • Function-resolution smoke confirms all 5 resolve after sourcing.
  • markdownlint clean.

Docs

docs/AUTHORITY_MAP.md lists the new LIVE support lib; CHANGELOG.md consolidates the three 11a extractions.

Follow-up note: system_check is 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.0 runtime-authority track; 11a unblocks Step 12 (v1 removal).

🤖 Generated with Claude Code

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>
@MCamner MCamner merged commit 337c072 into main Jul 5, 2026
3 checks passed
@MCamner MCamner deleted the feat/monolith-delayer-diagnostics branch July 5, 2026 18:19
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