Skip to content

Stability Audit

github-actions[bot] edited this page Dec 6, 2026 · 2 revisions

GridLock Stability & Modernization Audit (v0.14.0)

Scope: Active architecture, C++23/Qt6 modernization, plugin v2.0 hardening, and release quality-gate checklist for GridLock v0.14.0. Archived Baseline: All v0.10.0 stability, security, protocol, lifecycle, and UI hardening items (62 Completed | 1 Deferred) are archived in docs/audits/Stability-Audit-v0.10.0.md. Reconciliation Status (v0.14.0): 26 Completed ([x]) | 4 Open ([ ]) actionable items across Section 1 (1 completed, 0 open), Section 2 (6 completed, 0 open), Section 3 (0 completed, 3 open), Section 4 (13 completed, 1 open), and Section 5 (v0.12.0–v0.14.0 Hardening & Delivery: 6 completed, 0 open). All C/C++ source and header files under src/, include/, plugins/, and tests/ remain strictly under the 800-line agent.md ceiling (0 files >= 800 lines), with 63/63 headless Meson test suites and tests/scripts/ Python tests passing.


Executive Summary

Section Focus Area Completed ([x]) Open ([ ]) Priority
1. Directory & Module Layout Deferred v0.10.0 src/ui/ & src/backend/ domain partitioning 1 0 Medium
2. C++23 & Qt6 Modernization Deferred qt-cpp-review type-safety, container, and API naming cleanups 6 0 Low-Medium
3. Scheduled Release Quality Gates Visual/DPI/contrast review, extended ASan/TSan soak, and file-size headroom 0 3 High
4. qt-ui-design UX & WCAG 2.2 Audit 4 Critical + 6 Warning + 3 Opportunity (completed), and 1 Opportunity UI/UX finding 13 1 Critical
5. v0.12.0–v0.14.0 Hardening & Delivery DEBUG Source+Assembly split, floating popup chrome/geometry, async GDB/MI extraction, canvas input & 63/63 headless tests 6 0 High
Total v0.14.0 Actionable Audit Plan 26 4

1. Deferred Architectural & Directory Grouping (v0.10.0 Carry-Over)

  • Partition dense src/ui/views/ and src/ui/widgets/ by feature domain and fold single-purpose sibling directories (src/ui/tutorial/, src/backend/) (8296b16):
    • Target Paths: meson.build, src/ui/views/{editor,disassembly,memory,mpi}/, src/ui/widgets/{mpi,console,explorer}/, src/ui/dialogs/tutorial/, src/automation/.
    • Resolution: Partitioned src/ui/views/ and src/ui/widgets/ by feature domain, moved GdbConsoleWidget.{hpp,cpp} to src/ui/widgets/console/, moved TutorialDialog.{hpp,cpp} to src/ui/dialogs/tutorial/, renamed src/backend/ to src/automation/, updated all module README.md indexes, and refreshed graphify (15,954 nodes).

2. Deferred qt-cpp-review Modernization Backlog

  • Convert stringly-typed state, theme, perspective, gutter, and view-mode vocabularies to scoped enum class types (80f16af):

    • Target Paths: src/RankState.hpp, src/core/managers/ThemeManager.{hpp,cpp}, src/ui/mainwindow/MainWindowPerspectives.cpp, src/ui/views/editor/SourceCodeTypes.hpp, src/ui/widgets/console/HpcConsoleWidget.{hpp,cpp}, src/ui/widgets/mpi/MpiDiagnosticsWidget.{hpp,cpp}.
    • Goal: Replace repeated string comparisons ("stopped", "running", "Debug", "Binary", "Table", "List", "Raw") with strongly typed enum class values and explicit serialization helpers at persistence/UI boundaries.
  • Add const-correct child-widget and sub-model accessor overloads (497d02f):

    • Target Paths: src/ui/mainwindow/MainWindow.hpp, src/ui/EditorTabManager.hpp, src/ui/dialogs/preferences/PreferencesDialog.hpp, src/ui/views/disassembly/DisassemblyView.hpp, src/ui/widgets/explorer/ProjectExplorerWidget.hpp.
    • Goal: Ensure read-only queries and const member functions do not rely on const_cast or non-const widget pointers when inspecting child state.
  • Standardize timestamp generation on QDateTime::currentDateTimeUtc() (687b2d3):

    • Target Paths: src/core/hpc/gdb/GdbMiTranscriptRecorder.hpp, src/core/hpc/gdb/GdbRankCoordinator.hpp, src/core/managers/SessionManager.cpp, src/core/plugins/PluginManifest.cpp, src/core/hpc/system/LocalSlurmBackend.cpp, src/core/hpc/memory/MemoryExporter.cpp.
    • Goal: Replace remaining local-time QDateTime::currentDateTime() calls in logs, lockfiles, and exported artifacts with UTC ISO-8601 timestamps (Qt::ISODateWithMs) so multi-node cluster logs compare cleanly across timezones and DST boundaries.
  • Replace unordered QMap lookups with QHash on hot paths (c4d5623):

    • Target Paths: src/core/hpc/gdb/GdbRankCoordinator.{hpp,cpp}, src/core/hpc/dap/DapCoordinator.{hpp,cpp}, src/ui/views/mpi/ServerRackView.{hpp,cpp}, src/ui/views/memory/RegisterView.{hpp,cpp}, src/ui/dialogs/graph/PointerGraphEvaluator.cpp.
    • Goal: Keep QMap only where sorted key iteration or lowerBound/upperBound range queries (such as address-to-line tables) are required; switch pure key-lookup caches to QHash.
  • Apply C++23 std::pair / std::clamp / structured-binding cleanups (3d373fb):

    • Target Paths: src/ui/views/disassembly/Disassembly*.cpp, src/ui/dialogs/plotter/ArrayPlot*.cpp, src/ui/views/editor/SourceCodeView*.cpp, src/core/binary/ElfBinaryInspector.cpp.
    • Goal: Replace legacy qBound/qMin/qMax and verbose QPair boilerplate with standard C++23 std::clamp, std::min/std::max, and structured bindings where types match directly.
  • Align getter naming conventions (API-5) across Core and UI headers (2c91936):

    • Target Paths: src/core/managers/ConfigManager.hpp, src/core/hpc/IBackendCoordinator.hpp, src/core/Version.hpp, src/ui/dialogs/project/ProjectWizard.hpp.
    • Goal: Standardize Qt-idiomatic getter names (dropping redundant get* prefixes on new or internal C++ accessors while keeping frozen C99 ABI headers under include/gridlock/plugin_api.h untouched).

3. Scheduled v0.11.0 Quality Gates

  • Run a comprehensive qt-ui-design visual, HiDPI, and contrast review pass:

    • Target Paths: src/core/managers/ThemePalettes.cpp, src/ui/dialogs/, src/ui/views/, src/ui/widgets/, docs/screenshots/.
    • Goal: Audit all 8 curated dark and light themes at 1x and 2x DPI scaling for >= 4.5:1 text contrast, zero clipped headers or buttons (including MpiDiagnosticsWidget column headers and VariablesDockWidget toolbar spacing in light themes), and regenerate docs/screenshots/ via ./scripts/capture_ui.sh --docs.
  • Execute an extended multi-hour ASan/UBSan + TSan soak verification run:

    • Target Paths: scripts/stress_soak.sh, tests/stress/stress_soak.cpp, tests/stress/mpi_chaos_target.cpp, scripts/lsan_qt.supp, scripts/tsan_qt.supp.
    • Goal: Run ./scripts/stress_soak.sh --mode all --ranks 8 --duration 3600 (and overnight soak) prior to tagging v0.11.0, verifying zero ASan/UBSan/TSan diagnostics, zero deadlocks, and bounded VmHWM peak RSS in builddir-soak-logs/.
  • Decompose caution-tier files sitting at 790 to 799 lines to restore headroom below the 800-line ceiling:

    • Target Paths: src/ui/widgets/console/GdbConsoleWidget.cpp (799), src/ui/dialogs/preferences/PluginSettingsPage.cpp (799), src/core/plugins/PluginInstaller.cpp (799), src/ui/mainwindow/MainWindowPlugins.cpp (797), src/core/plugins/PluginHostBridge.cpp (797), tests/ui/test_ui_aux.cpp (799), tests/hpc/test_mi_parser.cpp (798).
    • Goal: Extract focused helper units where natural so future v0.11.0 feature work does not collide with the 800-line file cap.

4. qt-ui-design UX & WCAG 2.2 Accessibility Audit (v0.11.0)

Target Profile & Evidence: Linux Desktop (Qt 6.11 Widgets + Qt-Advanced-Stylesheets, 1600x960 workstation + native dialogs), 8 curated dark/light themes (ThemeManager / ThemePalettes), 11 live renders in docs/screenshots/, and static scan of 84 src/ui/**/*.cpp files.

4.1 Critical Findings (4 Completed | 0 Open)

  • Light-theme inline variable ghost contrast (< 4.5:1 WCAG AA):

    • Target Paths: src/ui/views/editor/SourceCodeViewInteraction.cpp, src/ui/views/editor/SourceCodeView.cpp, src/ui/views/editor/SourceCodeView.hpp.
    • Evidence: docs/screenshots/theme_daylight_light.png, docs/screenshots/theme_catppuccin_latte.png.
    • Remediation: Added SourceCodeView::inlineGhostTextColor() backed by ThemeManager::paletteForTheme() (#4b5563 on light canvases, #8b949e on dark canvases, >= 4.5:1 WCAG AA contrast) and viewport repaint on reloadStyle().
  • MpiDiagnosticsWidget invisible rows 1-3 & clipped headers in Light Themes:

    • Target Paths: src/ui/widgets/mpi/MpiDiagnosticsWidget.cpp, src/core/managers/ThemePalettes.cpp, src/core/managers/ThemeManager.cpp.
    • Evidence: docs/screenshots/theme_daylight_light.png, docs/screenshots/theme_catppuccin_latte.png.
    • Remediation: Separated QHeaderView from QHeaderView::section in getHighContrastLightQssOverlay() so hidden vertical headers are no longer clamped to max-height: 24px (fixing row 1-3 paint clipping across all light themes), added explicit light QTableView::item padding/color, recomputed per-cell colors in MpiDiagnosticsWidget::reloadStyle(), and sized PEER / TARGET and COMMUNICATOR columns from QFontMetrics + padding.
  • ArrayPlotDialog Row 3 horizontal control clipping at 1040x600:

    • Target Paths: src/ui/dialogs/plotter/ArrayPlotDialog.hpp, src/ui/dialogs/plotter/ArrayPlotDialog.cpp, src/ui/dialogs/plotter/ArrayPlotExport.cpp.
    • Evidence: docs/screenshots/v087_array_plotter_1d_2d.png.
    • Remediation: Grouped secondary/export actions (Clear History, Undo Clear, Export CSV..., Save PNG..., Open in gnuplot) into a compact Actions / Export menu button (arrayPlotActionsExportBtn) while retaining hidden legacy buttons for test compatibility, sized Row 3 buttons with QSizePolicy::Minimum and fontMetrics(), and tightened the hover readout width.
  • VariablesDockWidget Scope: combo box blank/unreadable selected text:

    • Target Paths: src/ui/docks/VariablesDockWidget.hpp, src/ui/docks/VariablesDockWidget.cpp, src/ui/mainwindow/MainWindowPerspectives.cpp.
    • Evidence: docs/screenshots/workspace_overview.png, docs/screenshots/theme_daylight_light.png, docs/screenshots/theme_catppuccin_latte.png.
    • Remediation: Retained the default Rank 0 (Master) item whenever onProcessCountChanged() receives count <= 0, added VariablesDockWidget::reloadStyle() wired to ThemeManager::themeModeChanged and propagateThemeToAllWidgets(), and applied explicit theme palette colors and AdjustToContents sizing.

4.2 Warning Findings (6 Completed | 0 Open)

  • PROJECT / SYMBOL dock title truncation in Light Themes:

    • Target Paths: src/ui/mainwindow/MainWindowDocks.cpp, src/ui/widgets/explorer/ProjectExplorerWidget.cpp.
    • Evidence: docs/screenshots/theme_daylight_light.png, docs/screenshots/theme_catppuccin_latte.png.
    • Remediation: Tighten dock title-bar spacing or use a concise PROJECT label / fontMetrics() minimum width.
  • Hardcoded pixel font sizes (136 font-size: *px vs 7 pt) & 797 raw #hex literals across src/ui/:

    • Target Paths: src/ui/**/*.{hpp,cpp}, src/core/managers/ThemeManager.{hpp,cpp}, src/core/managers/ThemePalettes.cpp.
    • Remediation: Migrated all inline QSS and workstation stylesheet overlay font sizes across src/ui/ and ThemePalettes.cpp from px to OS-scalable pt units (0 remaining font-size: *px rules in src/ui/), extended ThemeManager::ThemePalette with semantic surface/status/contrast tokens, and routed all inline widget QSS #hex colors across src/ui/ through ThemeManager::paletteForTheme().
  • CFG minimap overlap on bottom-right basic block in DisassemblyView:

    • Target Paths: src/ui/views/disassembly/DisassemblyAnalysis.cpp, src/ui/views/disassembly/DisassemblyView.{hpp,cpp}, src/ui/views/disassembly/DisassemblyViewActions.cpp, tests/ui/test_ui_debugger.cpp.
    • Evidence: docs/screenshots/cfg_decompiler_split.png.
    • Remediation: Expanded CFG QGraphicsScene bottom-right sceneRect padding by 144px (120 + 24) horizontally and 114px (90 + 24) vertically to clear the minimap footprint, and added a checkable Minimap (#cutterMinimapToggleBtn) toggle button in the Disassembly header bar.
  • CommandPaletteDialog Symbols tab descender clipping:

    • Target Paths: src/ui/dialogs/search/CommandPaletteDialog.{hpp,cpp}, tests/ui/test_ui_docks_dialogs.cpp.
    • Evidence: docs/screenshots/v088_search_everywhere.png.
    • Remediation: Replaced the fixed 22px max-height clamp on scope tabs with std::max(28, fontMetrics().height() + 10) updated via updateScopeTabHeights() on reloadStyle(), QEvent::FontChange, and QEvent::StyleChange, with headless regression coverage in tests/ui/test_ui_docks_dialogs.cpp.
  • PreferencesDialog scroll boundary lacks visual separation above OK / Cancel / Apply footer:

    • Target Paths: src/ui/dialogs/preferences/PreferencesDialog.cpp, src/ui/dialogs/preferences/PreferencesDialogChrome.cpp, tests/ui/test_ui_docks_dialogs.cpp.
    • Evidence: docs/screenshots/preferences_slurm_autodetect.png.
    • Remediation: Styled QDialogButtonBox#preferencesFooter with a theme-aware 1px solid top border (pal.borderHex) and balanced padding, added clean vertical QScrollArea margins (4px top, 8px bottom), and added headless regression coverage in tests/ui/test_ui_docks_dialogs.cpp.
  • Keyboard focus traversal gaps (7 Qt::NoFocus usages across src/ui/):

    • Target Paths: src/ui/dialogs/search/CommandPaletteDialog.cpp, src/ui/dialogs/preferences/ShortcutItemDelegate.cpp, src/ui/widgets/console/GdbConsoleWidget.cpp, src/core/managers/ThemePalettes.cpp, tests/ui/test_ui_docks_dialogs.cpp.
    • Remediation: Restored Qt::TabFocus on interactive CommandPaletteDialog header buttons and KeySequenceRecorderWidget's clear button, documented non-focus-stealing Qt::NoFocus on read-only preview/autocomplete popups, and added theme-aware :focus indicator borders across light and dark overlays.

4.3 Opportunity Findings (3 Completed | 1 Open)

  • New Project onboarding, template scaffolding, & Ctrl+Shift+N split-pane UX:

    • Target Paths: src/core/project/ProjectScaffolder*.{hpp,cpp}, src/ui/dialogs/project/ProjectWizard*.{hpp,cpp}, src/ui/mainwindow/MainWindowWorkspace.cpp, src/core/managers/ShortcutManager.cpp.
    • Remediation: Replaced the blank two-page QWizard and unused NewProjectDialog duplicate with a single-screen split-pane ProjectWizard backed by ProjectScaffolder (MPI C++23, MPI C17, MPI + OpenMP Hybrid, Fortran MPI, Import Existing, Existing Binary / Slurm), added live <BaseLocation>/<ProjectName> synthesis, inline validation, collapsible MPI topology options, Ctrl+Shift+N (file.new_project), and clean post-create editor/explorer onboarding without premature GDB launch aborts.
  • Progressive disclosure (Hick's Law) in ArrayPlotDialog and PointerGraphDialog:

    • Target Paths: src/ui/dialogs/plotter/ArrayPlotDialog.cpp, src/ui/dialogs/graph/PointerGraphDialog.cpp.
    • Remediation: Move infrequent export/layout actions into overflow menus.
  • Reduced-motion preference (appearance/reduced_motion):

    • Target Paths: src/ui/dialogs/preferences/AppearanceSettingsPage.{hpp,cpp}, src/ui/dialogs/preferences/PreferencesDialog.cpp, src/ui/mainwindow/MainWindowPerspectives.cpp, src/core/managers/ConfigManager.{hpp,cpp}.
    • Remediation: Added ConfigManager::reducedMotion() / setReducedMotion(bool) persisted under appearance/reduced_motion, exposed Reduce motion (disable smooth scrolling and fade transitions) in Preferences -> Appearance, and wired MainWindow::propagateThemeToAllWidgets() to disable dock animations, tree animations, and Qt UI fade effects when enabled.
  • Localization & text expansion readiness:

    • Target Paths: src/ui/**/*.cpp.
    • Remediation: Replaced hardcoded setFixedWidth() / setFixedSize() caps on text-labeled buttons, labels, and combo boxes with setMinimumWidth() + sizeHint() padding and wrapped 372 user-visible QStringLiteral labels across 48 UI files in tr() / QObject::tr().

4.4 Desktop Accessibility & UX Checklist (qt-ui-design §5)

  • Motion: No excessive (> 400 ms) animations; reduced-motion toggle (appearance/reduced_motion) implemented in Preferences -> Appearance.
  • Typography: Migrated all inline QSS and workstation overlay font sizes across src/ui/ and ThemePalettes.cpp from hardcoded px rules to OS-scalable pt units (0 px QSS font rules remaining in src/ui/).
  • Keyboard: Interactive controls support Tab traversal (Qt::TabFocus / Qt::StrongFocus), Search Everywhere / Esc work consistently, and theme-aware :focus rings are styled globally across light and dark overlays.
  • Colour: Critical light-theme inline ghost, MpiDiagnosticsWidget contrast/clipping, and all inline widget QSS #hex literals across src/ui/ are resolved via ThemeManager::paletteForTheme(); custom QPainter canvas and syntax-highlighter QColor literals remain to be reviewed in Section 3.
  • Localisation: ArrayPlotDialog Row 3 clipping is resolved, text-labeled button fixed widths are replaced with setMinimumWidth() + sizeHint(), and user-visible QStringLiteral UI labels across src/ui/ are wrapped in tr() / QObject::tr().
  • AI features: N/A (GridLock has no in-app generative AI UI).

5. v0.12.0–v0.14.0 Hardening & Delivery Verification (6 Completed | 0 Open)

  • DEBUG perspective automatic Source + Assembly split & PC synchronization:
    • Target Paths: src/ui/mainwindow/MainWindowPerspectives.cpp, src/ui/views/disassembly/DisassemblyView.cpp.
    • Resolution: Switching to DEBUG (Alt+2) opens side-by-side Source and Disassembly panels synchronized to the focused rank's current PC without manual dock rearrangement.
  • Floating "popup" plugin dialog window chrome, draggable header bar & close button geometry:
    • Target Paths: src/ui/mainwindow/MainWindowPluginSurfaces.cpp, tests/ui/test_ui_plugin_playground.cpp.
    • Resolution: Styled every floating Qt::Tool plugin popup with a theme-aware draggable #floatingPanelHeaderBar (10, 4, 10, 4 margins, 8 px spacing), expanding #floatingPanelTitleLabel, and fixed 24x24 #floatingPanelCloseButton with zero right-edge glyph clipping across Wayland and X11.
  • GDB/MI async token stripping & structured register/memory payload extraction:
    • Target Paths: src/core/plugins/debugger/DebuggerExtensionRegistry.cpp, plugins/gridlock_lua/LuaBindingsDbgUi.cpp, tests/core/test_lua_plugin_host.cpp.
    • Resolution: Stripped leading numeric MI tokens (<token>^done,...) before delivering send_mi_async callbacks, added unescaped res.value, res.begin, res.contents, and res.memory table extraction for -data-evaluate-expression and -data-read-memory-bytes, and exposed gl.dbg.read_register and gl.dbg.read_memory.
  • 2D Canvas click/keyboard dispatch & gl.api.defer_fn timer lifecycle:
    • Target Paths: src/core/plugins/ui_surfaces/PluginCanvasWidget.cpp, plugins/gridlock_lua/LuaBindingsCanvas.cpp, plugins/gridlock_lua/LuaBindingsCore.cpp.
    • Resolution: Dispatched stationary left-clicks (< 4 px) as Lua { x, y, row, col, button, panel_id } tables, added Qt::StrongFocus + canvas_set_key_handler / gl.ui.canvas_on_key with auto-focus on floating popup open, and wired gl.api.defer_fn / gl.core.defer_fn with watchdog protection and automatic owner-scoped cancellation on plugin/playground unload.
  • x86/x86-64 & ARMv8/AArch64 assembly syntax highlighting & .deb / MkDocs release pipelines:
    • Target Paths: src/services/editor/TreeSitterService.{hpp,cpp}, scripts/build_deb.sh, scripts/prepare_mkdocs_from_wiki.py, tests/scripts/.
    • Resolution: Added theme-aware Intel/AT&T x86 and ARMv8/AArch64 assembly highlighting (syntax_highlighting_tests + TreeSitterService), Debian .deb packaging with dpkg-shlibdeps + .sha256 verification, and zero-warning strict MkDocs Pages publishing.
  • 59/59 Headless Meson test coverage + Python tests/scripts/ suite:
    • Resolution: Expanded the automated headless verification suite to 59/59 Meson test suites (QT_QPA_PLATFORM=offscreen meson test -C builddir --print-errorlogs) plus python3 -m unittest discover -s tests/scripts -v with zero compiler warnings and zero failures.

Clone this wiki locally