Rot Elimination Plans: Systematic Codebase Cleanup#59
Draft
Conversation
8 plans for systematic codebase cleanup: - Centralized styling (PyQt) - Config merging elimination (Orchestrator) - psygnal migration (ObjectState callbacks) - Python source serializer (pickle_to_python) - Streaming backend unification - Step executor extraction - Streaming message protocol - Dimension abstraction (Fiji viewer)
Learn moreAll Green is an AI agent that automatically: ✅ Addresses code review comments ✅ Fixes failing CI checks ✅ Resolves merge conflicts |
- plan_02_step_executor_extraction: Removed over-engineered 'ExecutionPhase' abstraction. The 647 lines are REAL complexity that moves to StepExecutor, not phases. Honest about what gets deleted vs moved. - plan_01_psygnal_migration: Added complete caller enumeration (11 callers). Surgical scope: only object_state.py and its callers. Qt signals stay as-is. - plan_01_centralized_styling: Acknowledged Qt stylesheet limitations. Added object name convention for variant styling. Honest about dynamic styling that must stay. - 00_MASTER_PLAN.md: Added dependency graph, execution order, testing strategy, and risk mitigation. Wave 1 (independent), Wave 2 (streaming), Wave 3 (compiler - highest risk).
Each plan now has explicit guardrails to prevent agents from falling back to 'competent' solutions: - psygnal: No wrapper methods, no adapter classes, no fallbacks - executor: No per-step subclasses, no process() wrappers, no phases - styling: No StyleManager singletons, no helper methods - config merging: No merge helpers, no fallback merging - streaming backend: No abstract methods, no override behavior - streaming protocol: No fallback parsing, no .get() defaults - dimensions: No 6-param wrappers, no per-dimension helpers - serializer: No old function wrappers, no context-specific registries - compiler: No Dict[str,Any], no mutable plans, no per-step phases All antipatterns show ❌ WRONG code with explanation of why it's wrong.
- No temporary compatibility shims - No parallel implementations 'for safety' - No batching multiple plans into one PR - No feature flags for gradual rollout - No 'clean up later' TODOs - No tests for deprecated behavior Principle: Every PR makes codebase strictly simpler. If line count goes up, you're doing it wrong.
- Use test_main[disk-ImageXpress-3d-multiprocessing-direct-none-none] - Unit tests run in terminal, not saved to files - Manual testing by user for streaming/UI
- Split object_state.py (2507 lines) into: - object_state_registry.py (1182 lines): ObjectStateRegistry singleton - object_state.py (1350 lines): FieldProxy + ObjectState - Updated all 22 import statements across pyqt_gui - Fixed indentation issues from sed replacement in 4 files - Verified OpenHCS runs successfully
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.

Rot Elimination Plans: Systematic Codebase Cleanup
Overview
9 plans to eliminate ~3500 lines of rot. No wrappers. No backwards compatibility.
Dependency Graph
Plan Summaries
plan_01_psygnal_migrationplan_01_centralized_stylingplan_01_eliminate_config_mergingplan_01_python_source_serializerplan_03_dimension_abstractionplan_01_streaming_backend_unificationplan_02_streaming_message_protocolplan_01_generic_compiler_specplan_02_step_executor_extractionKey Principles
Testing Strategy
Files
plans/rot_elimination/00_MASTER_PLAN.md— Dependency graph, execution order, testing strategyplans/rot_elimination/plan_*.md— Individual plans with cleanup sections