# SecInterp - Maintenance & Release Log ## [2026-10-11] RELEASE TRAIN UNBLOCK & v3.10.0 PUBLISHED - **Changes**: Fixed `scheduled-release.yml` for main↔branch tooling drift — `.agent` is a submodule on `main` but a directory on the train branches (clean it before checkout), and the offline-help build needs `main`'s `conf.py` + `help_index.rst`, not just `build_docs.sh`. Published **v3.10.0** (interactive preview legend / side panel). - **Metrics/Impact**: Scheduled publishing works again (dry-run `38151593980` success, publish `38151877186` success). `v3.10.0` live and *Latest*: `sec_interp.3.10.0.zip` (**2.27 MiB**, 14-language offline manual). Next: v3.11.0 (2026-10-18); then the final train→`main` merge (not `--ff-only`). ## [2026-10-11] QGIS MCP INTEGRATION (VENDORED FORK + `qgis_driver` SUBAGENT) - **Changes**: Vendored a fork of `nkarasiak/qgis-mcp` (v0.15.1) under `tools/qgis_mcp/` and extended it with a `secinterp` tool group (six commands: status/open/preview/ready/results/export) that drives the SecInterp dialog over MCP. Default port moved to **9877**; added a **`qgis_driver`** subagent (MCP enabled only there, disabled globally), a `/smoke-qgis4` workflow, and packaging/analysis exclusions for `tools/`. - **Metrics/Impact**: A live QGIS 4 smoke (open → preview → assert → results → export) is now **programmatic** instead of manual, closing the mock↔real-QGIS gap. Fork suite **429 passed / 2 skipped**; verified end-to-end on QGIS 4.2.1. No plugin-runtime impact (dev-only tooling). ## [2026-09-12] PHASE CLOSURE v3.7.0 (I18N QUALITY GATE, UX & QT6/QGIS 4 ENUM MIGRATION) - **Achievements**: Two releases (v3.7.0 / v3.7.1). AST i18n hygiene gate (0 violations), 9 dialog titles wrapped in `self.tr()`, 79 analyzer flags triaged to 72 false positives. 114 flat enums migrated to scoped form for QGIS 4 (pyqgis4-checker 0 errors). Collapsible preview controls. Security patch (Bandit B110). ZIP reduced 25MB → 3.3MB. - **Reference**: [Phase Closure Document](../maintenance/phase_closure_v3.7.0.md) - **Metrics**: 620 tests Green, Maintainability 99.9/100, Security 100/100, CC <= 10, i18n AST Gate PASS. ## [2026-05-18] PHASE CLOSURE v3.6.0 (NEXT-GEN STABILITY & SPATIAL OPTIMIZATION) - **Achievements**: Extreme stability and full compatibility with QGIS 4.x/Qt6. Spatial performance optimization via QgsSpatialIndex, achieving sub-second query times. 100% translation coverage and 572 successful tests. - **Reference**: [Phase Closure Document](../maintenance/phase_closure_v3.6.0.md) - **Metrics**: 572 tests Green, Code Maintainability 94.2/100, Type Hint Params 97.3%, CC <= 10. ## [2026-04-28] PHASE CLOSURE v3.5.0 (OPERATIONAL EXCELLENCE & AGENTIC AUTONOMY) - **Achievements**: Modernization of the development cycle with the Gen 6 Agent framework, memory pruning automation, and observability metrics. Strict quality gate (CC <= 10) and 100% docstrings. - **Reference**: [Phase Closure Document](../maintenance/phase_closure_v3.5.0.md) - **Metrics**: 620 tests Green, Code Maintainability 94.1/100, Docstring Coverage 100.0%. ## [2026-03-29] PHASE CLOSURE v3.4.0 (INTEGRATION & TRANSLATION) - **Achievements**: Achieved 100% translation coverage in 13 languages and 620 successful tests in Docker. Comprehensive testing for vector structural integration. - **Reference**: [Phase Closure Document](../maintenance/phase_closure_v3.4.0.md) - **Metrics**: 620 tests Green, Code Maintainability 100.0/100, Type Hint Params 96.0%. ## [2026-03-14] PHASE CLOSURE v3.3.0 (STABILITY & QGIS 4.x) - **Achievements**: Industrial resource stability, 100% QGIS 4.x Readiness, and 607 successful tests. - **Reference**: [Phase Closure Document](../maintenance/phase_closure_v3.3.0.md) | [Refactoring Analysis](../maintenance/analysis_v3.3.0_refactoring.md) - **Metrics**: 607 tests Green, 100% API compliance, 91% GUI Coverage. ## [2026-03-03] PHASE START v3.3.0 (STRICT QUALITY) - **Changes**: Phase initialization, implementation plan v3.3.0 creation, and environment sync. - **Metrics/Impact**: Established 450 tests baseline. Targeted return type hints (44.9%) and i18n (895 gaps). ## [2026-03-01] TESTING EXPANSION & DaC AUTOMATION - **Changes**: Massive test expansion (450 OK) and automation of `TESTING_STATUS.md`. - **Metrics/Impact**: Increased coverage in critical areas (GUI Tasks, Core). Trajectory engine stabilization. ## [2026-02-28] REFACTOR LAYER RESOLUTION & UX FEEDBACK - **Changes**: Implemented `LayerResolver` with cache, unified validations in `ProjectValidator`, and progress feedback in UI. - **Metrics/Impact**: 229 tests executed successfully. Optimized layer access and improved user perception of performance. ## [2026-02-25] STABILIZATION HOTFIXES (DRILLHOLES & RENDERING) - **Changes**: Fixed DI mismatch (`ProfileController`), index error in empty drillholes (`TrajectoryEngine`), and subscription error in rendering (`PreviewLayerFactory`). - **Metrics/Impact**: 100% stability restored for Phase 3. Drillhole rendering functional with polymorphism. ## [2026-02-18] I18N ASIA EXPANSION & INFRASTRUCTURE AUDIT - **Changes**: Localization to Hindi and Indonesian. Technical audit of `qgis-manage` with modernization roadmap. - **Metrics/Impact**: 100% translation coverage in new languages. Established roadmap to resolve resource compilation technical debt. ## [2026-02-18] DEEP TRANSLATION (USER GUIDE) - **Changes**: Completed user guide localization in 7 priority languages. Fixed catalog integrity in Italian and Portuguese. - **Metrics/Impact**: 100% coverage in tutorial sections. Established SSoT principle for master data. ## [2026-02-17] PLUGIN RELEASE v3.0.1 - **Changes**: Plugin officially published to the QGIS Repository. Fixed critical crash in `GeometryEngine` and restoration of old layers. - **Metrics/Impact**: First community release. 320 tests verified against real API. ## [2026-02-16] AGENTIC CONTINUITY (SESSION MANAGEMENT) - **Changes**: Restored state from previous sessions. Optimized long session handling. - **Metrics/Impact**: Context restored. Prepared for v3.0.1 hotfixes. ## [2026-02-16] PLUGIN RELEASE v3.0.0 — MULTILINGUAL & INTEGRATION - **Changes**: Official release with 10 complete translations, new `SettingsPage`, native integration with `QgsTask`. - **Metrics/Impact**: 361 tests Green. Quality Score 83.5. Deployment to QGIS Python Plugins. ## [2026-02-15] PLUGIN RELEASE v3.0.0 - **Changes**: Full `.qgisignore` integration. Final i18n validations. New Settings UI. - **Metrics/Impact**: 361 tests Green. ## [2026-02-14] BUILD SYSTEM & I18N REFINEMENT - **Changes**: Fixed `qgis-manage` linking and unicode conflicts. Applied `make compile` with 13 languages. - **Metrics/Impact**: 316 tests Green. 13 locales verified. ## [2026-02-12] INTERNATIONALIZATION (i18n) & QGIS 4 PREPARATION - **Changes**: Automatic extraction of 1451 translatable strings (13 languages). Migration to `qgis.PyQt` for QGIS 4.x. - **Metrics/Impact**: 317 tests Green. Master data engine fully operational. 507 metadata fields synchronized. ## [2026-02-03] STABILIZATION v2.9.0 - **Changes**: Fixed `GeologyService` DI and `TrajectoryEngine` index error. Migrated to `unittest` exclusively. Stabilized 255 tests. - **Metrics/Impact**: 100% regression tests Green. ## [2026-02-02] RIGOROUS TESTING & QGIS STANDARDS - **Changes**: QGIS Compliance Analysis. Whitelisted plugins for real API integration. 245/245 unit tests passing. - **Metrics/Impact**: 100% pass rate. Deep fixes in mock infrastructure. ## [2026-02-01] ADVANCED TESTING & QGIS INTEGRATION - **Changes**: Implemented `QgsCoordinateReferenceSystem` integration tests. 10 new headless QGIS tests. - **Metrics/Impact**: 171 tests Green in mock environment, 37 native QGIS tests stable. ## [2026-01-31] UNIT TESTING & QGIS COMPLIANCE - **Changes**: Created `BaseIntegrationTest` class. 27 new tests for `GeologyService`, `StructureService`, `ExportService`. - **Metrics/Impact**: 155 unit tests + 37 native QGIS tests Green. ## [2026-01-30] GUI MODULE TESTING - **Changes**: Test suite for GUI modules (`PreviewRenderer`, `LODCalculator`, `PreviewParamHasher`). - **Metrics/Impact**: 155 unit tests Green. GUI-related mock coverage increased. ## [2026-01-29] CORE MODULE TESTING - **Changes**: 62 tests for Core module (`DrillholeService`, `TrajectoryEngine`, `PreviewService`). - **Metrics/Impact**: 135 unit tests Green. Core coverage at highest historical level. ## [2026-01-28] SOLID REFACTORING & MOCK STABILIZATION - **Changes**: Deep refactoring of `main_dialog` applying SOLID principles. `preview_task_orchestrator.py` extraction. - **Metrics/Impact**: 169 unit tests Green. Mock environment 100% stable for headless testing. ## [2026-01-24] GUI TESTING EXPANSION - **Changes**: 38 tests for `main_dialog_validation.py`, `legend_renderer`, and `lod_calculator`. - **Metrics/Impact**: 106 unit tests Green. ## [2026-01-18] PHASE v2.7.0 COMPLETION (OPERATIONAL EXCELLENCE) - **Changes**: Formal closure of validation/documentation phase. Modular architecture validated. - **Reference**: phase_closure_v2.7.0.md - **Metrics/Impact**: 73 unit tests Green. Technical debt under control. ## [2026-01-13] MAJOR ARCHITECTURAL REFACTORING - **Changes**: Fragmentation of `SecInterpDialog` into specialized managers. Modularization of `core/utils/`. - **Metrics/Impact**: 52 unit tests Green. Cyclomatic complexity reduced by 60%. ## [2026-01-09] QA MILESTONE v2.6.1 - **Changes**: Full stabilization of test suite. Mock pollution resolved in `QListWidget` tests. - **Metrics/Impact**: 312 tests Green. ## [2026-01-04] QUALITY & DOCKERIZATION - **Changes**: Complete dockerization of the test environment. Consolidated `make docker-test` integration. - **Metrics/Impact**: Containerized environment with 45% improved execution times. ## [2026-01-02] EXPANSION PHASE - **Changes**: Implementation of drillhole 3D services. GUI testing expansion with native mocks. - **Metrics/Impact**: 86 unit tests Green. ## [2025-12-28] ARCHITECTURAL REFINEMENT - **Changes**: Extraction of `DrillholeService`, `Controllers`, and `utils` modules. Validation framework unification. - **Metrics/Impact**: 23 unit tests Green. ## [2025-12-26] STRUCTURAL FOUNDATION - **Changes**: Solid foundation for drillhole implementations. Establishment of architectural dependencies. - **Metrics/Impact**: 21 unit tests Green. ## [2025-12-25] ARCHITECTURAL RESTRUCTURING - **Changes**: Reorganized `core/` and `gui/`. Implemented preview caching system. - **Metrics/Impact**: 12 unit tests Green. ## [2025-12-23] MASSIVE ARCHITECTURAL REFACTORING - **Changes**: Complete restructuring of codebase into modular packages (`core/`, `gui/`, `exporters/`). - **Metrics/Impact**: 0 tests, phase focused on structural integrity. --- ## 📊 Cumulative Development Summary ### Key Quantitative Milestones - **Full Testing**: From 0 to 361+ stable unit tests. - **Dockerization**: Complete test environment with 100% reproducibility. - **Internationalization**: 14 languages supported with automated maintenance. - **Architectural Decoupling**: Clean separation between QGIS API and business logic. ### Major Architectural Contributions #### [2.8.0] - 2026-01-19 to 2026-01-20 - **Data Integrity & Core**: - **3-Level Validation**: Hierarchical system (Type/Logic/Domain) ensuring data safety across all layers. - **Centralized Logging**: Refactored `logger_config.py` for hierarchical propagation. - **Enhanced 3D Export**: - Implemented high-fidelity 3D output for drillhole traces and geological intervals (PolygonZ/LineStringZ). ### [2.7.0] - (Planning) 2026-01-09 - **Infrastructure Planning**: - **Native Validation**: Transition to `dataclasses` based models (replacing Pydantic proposal). - **External Sphinx**: Strategy for out-of-repo documentation build and repository HTML cleanup. - **Docker Consolidation**: Planned `make docker-test` integration. - **Enhanced 3D Export**: - Design for Original and Projected 3D exports for Drillhole Traces and Intervals. - Planned UI integration in Settings/Advanced. ### [2.6.1] - 2026-01-09 - **Stabilization**: - **Test Suite**: Resolved major mock pollution issues and finalized 312 stable tests. - **Mock Infrastructure**: Implemented explicit `MockQListWidget` for stable GUI inheritance. - **Internationalization**: - Translated Measure tool results and default interpretation naming. ### [2.6.0] - 2026-01-05 - **Quality Assurance**: - **Native Integration Tests**: Implementation of `BaseIntegrationTest` for headless QGIS execution. - **Workflow Validation**: New automated tests for Interpretation, Measurement, and 3D Export using real QGIS API. - **Docker Integration**: - Full containerization of the test environment for CI/CD readiness. - Automated dependency management via `uv` within Docker. - Optimized build workflows with `.dockerignore` and permission handling. - **Performance**: - **Benchmarks Suite**: Implementation of performance tests for Geometry and Exports using `unittest`. - **SLA Verification**: Established baseline metrics for critical operations (Shapefile Write < 5s, Projection < 0.1s). - **Architecture & Refactoring (2026-01-08)**: - **Async Evolution**: Refactored threading model to use `QgsTask` for background geology generation, improving stability and preventing UI freezes. - **Exporter Modularization**: Deep refactoring of all vector exporters (`shp`, `drillhole`, `profile`, `interpretation_3d`) to reduce complexity (mccabe < 7) and improve modularity. - **Quality & Debt Cleanup**: Significant improvement in type hint coverage (Params: 62.1% -> 76.4%) and documentation style across core services, tools, and UI pages. - **Workflow Security**: Implemented `conventional-pre-commit` and restored `COMMIT_GUIDELINES.md` to guarantee high-quality, parsable commits. - **Test Stability**: Enhanced mocking infrastructure for asynchronous tasks and QGIS ecosystem components. ### [2.5.0] - 2026-01-03 - **Major Features**: - **3D Export**: Interpretation export as real 3D Shapefiles (PolygonZ). - **Settings Hub**: New sidebar page for plugin configuration management. - **Documentation**: User Guide fully integrated with screenshots. - **Critical Fixes (Hotfixes)**: - **Attribute Inheritance**: Resolved regression in drillhole processing (tuple handling) and `GeologySegment` polymorphism. - **Serialization**: Fixed `QVariant` JSON serialization error. - **Workflow Optimization**: - **Context Awareness**: Enhanced `.agent/workflows/` (start/close) to mandate context analysis and logging, ensuring continuity. - **Data Persistence**: Overhauled `DialogSettingsManager` for robust restoration with multi-scope support (`SecInterp`/`SecInterpUI`) and layer name fallback. - **Stability & QA**: - Enabled project-wide Ruff rules (`F401`, `F841`, `I001`). - Implemented proactive auto-save on Preview and Dialog Accept. - Resolved critical `AttributeError` in validation logic and Geology Rendering. - Forced disk synchronization for configs (`sync()`). - **Test Infrastructure**: Enhanced `MockQgsProject` and `MockQWidget` to support persistence and modern Qt patterns. ### [2.2.0] - 2025-12-22 - **Documentation Globalization**: 100% of documentation (including Architecture) translated to English. - **Build Optimization**: Slimmed final ZIP package and removed redundant source code views from help. - **Architectural Evolution**: Moved main `SecInterp` class to `sec_interp_plugin.py`. - **Validation Refactor**: Modularized `core/validation/` package. - **GUI Decoupling**: Fragmented `SecInterpDialog` into specialized managers. - **LOD Optimization**: Implemented adaptive Level of Detail for previews. ### [2.1.0] - 2025-12-17 - **Feature**: Snap-Enabled Measurement Tool. - **Fix**: Resolved Snapping configuration attribute errors. ### [2.0.0] - 2025-12-14 - **Feature**: Full Drillhole Integration (Projection & Intervals). - **Export**: Added drillhole trace and interval Shapefile exporters. ### [1.1.0] - 2025-12-12 - **Performance**: Asynchronous parallel processing for geology. - **Feature**: Adaptive Sampling and Measurement Tool. --- ## 📁 Historical Refactoring Notes For detailed information on past major refactoring sessions, refer to the following summaries: > > **Refactoring 2025-12-21**: Significant reduction of `main_dialog.py` size (from 1k to ~300 lines) by moving logic to managers and core services. > > See `docs/docsec/archive/` for original walkthroughs if deep historical context is needed. ### [Phase Closure v3.0.0] - RELEASE & INTERNATIONALIZATION - **Date**: 2026-02-14 - **Focus**: Internationalization (i18n), Modular Services, Release Optimization. - **Outcome**: 8 Languages Supported, Package Size Reduced 99.6% (218KB), 361 Tests Passing. - **Key Infra**: `.qgisignore`, GitHub Actions Security Scan (100/100). - **Reference**: [Phase Closure Document](phase_closure_v3.0.0.md) ### [Phase Closure v2.7.0] - REFACTOR & STABILIZATION - **Date**: 2026-01-18 - **Focus**: Validation Architecture, Docker Infrastructure, Sphinx Docs. - **Outcome**: 361 Tests Passing, 100% Mock Stability. - **Reference**: [Phase Closure Document](phase_closure_v2.7.0.md)