Private
Public Access
0
0
Commit Graph

23 Commits

Author SHA1 Message Date
ed 7bcb5a8c07 refactor(config): Route all config I/O through AppController
Eliminates 22 call sites that bypassed the AppController state owner
and read/wrote config.toml directly. AppController is now the single
source of truth for self.config; gui_2.py, commands.py, etc. go
through controller.save_config() / controller.load_config().

Production changes:
- src/models.py: rename load_config -> _load_config_from_disk,
  save_config -> _save_config_to_disk (private I/O primitives)
- src/app_controller.py: add public load_config()/save_config() methods
  that own the state. Update 3 internal call sites and 3 ConductorEngine
  call sites to pass max_workers from self.config
- src/multi_agent_conductor.py: ConductorEngine.__init__ now takes
  max_workers as a parameter (caller responsibility, not I/O primitive)
- src/external_editor.py: get_default_launcher() takes config as a
  parameter; gui_2.py:1311,4776 pass app.config
- src/gui_2.py: 17 sites of models.save_config(X.config) replaced with
  X.save_config() (delegates via __getattr__ to controller)
- src/commands.py: save_all() uses app.save_config()

Test changes (route through controller, not I/O primitive):
- tests/conftest.py: mock_app and app_instance fixtures now patch
  AppController.load_config/save_config instead of models I/O primitives
- 18 other test files: patches renamed from models._save_config_to_disk
  to AppController.save_config (and same for load_config)
- tests/test_app_controller_mcp.py: use SLOP_CONFIG env var instead of
  patching removed CONFIG_PATH module constant
- tests/test_parallel_execution.py: pass max_workers=2 explicitly to
  ConductorEngine (caller no longer reads config)
- tests/test_gui_paths.py: add save_config=MagicMock() to MockApp;
  assert on controller method, not I/O primitive
- tests/test_models_no_top_level_tomli_w.py: still calls private
  _save_config_to_disk directly (the only allowed exception; tests
  the lazy-load behavior of the primitive itself)

New files:
- scripts/audit_no_models_config_io.py: enforces the rule (--strict,
  --json modes; AST-based docstring detection to avoid false positives)
- conductor/code_styleguides/config_state_owner.md: documents the rule

Verification:
- 67 targeted tests pass
- scripts/audit_no_models_config_io.py --strict returns 0

This is the architectural cleanup that surfaced during the
audit_architectural_cheats_20260607 review. Closes the smoke-gun
CONFIG_PATH module constant (already done in 0c7ebf22) AND the
free-function models.load_config/save_config smell.

[conductor(checkpoint): config-iO-refactor-20260607]
2026-06-07 19:54:17 -04:00
ed 8c06c1767b refactor(sdm): Global pass with refined 'External Only' SDM tags. Pruned redundant internal references and fixed indentation logic in injector. Verified full project compilation. 2026-05-09 15:00:35 -04:00
ed 8bc6eae101 wip: fixing more path resolution in tests 2026-03-12 19:28:21 -04:00
ed 1fb6ebc4d0 idk why these weren't committed 2026-03-06 12:48:02 -05:00
ed fca57841c6 WIP: PAIN2 2026-03-05 14:43:45 -05:00
ed e81843b11b WIP: PYTHON 2026-03-05 14:07:04 -05:00
ed 5e69617f88 WIP: I HATE PYTHON 2026-03-05 13:55:40 -05:00
ed c102392320 feat(src): Resolve imports and create sloppy.py entry point 2026-03-04 10:01:55 -05:00
ed fe2114a2e0 feat(types): Complete strict static analysis and typing track 2026-03-04 09:46:02 -05:00
ed 1be6193ee0 chore(tests): Final stabilization of test suite and full isolation of live_gui artifacts 2026-03-04 01:05:56 -05:00
ed b9686392d7 chore: apply ruff auto-fixes and remove dead AST scripts 2026-03-02 13:26:20 -05:00
ed 0b5552fa01 test(suite): update all tests for streaming/locking architecture and mock parity 2026-03-02 10:15:41 -05:00
ed f5e43c7987 refactor(tests): Add strict type hints to sixth batch of test files 2026-02-28 19:25:54 -05:00
ed 60396f03f8 refactor(types): auto -> None sweep across entire codebase
Applied 236 return type annotations to functions with no return values
across 100+ files (core modules, tests, scripts, simulations).
Added Phase 4 to python_style_refactor track for remaining 597 items
(untyped params, vars, and functions with return values).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-28 11:16:56 -05:00
ed d36632c21a checkpoint: massive refactor 2026-02-28 09:06:45 -05:00
ed ea84168ada checkpoint post gui2_parity 2026-02-24 22:02:06 -05:00
ed 6677a6e55b conductor(checkpoint): Checkpoint end of Phase 2: Test Suite Migration 2026-02-23 15:56:46 -05:00
ed 4628813363 fix(conductor): Apply review suggestions for track 'gui_performance_20260223' 2026-02-23 15:36:03 -05:00
ed dc64493f42 fix(conductor): Apply review suggestions for track 'Add full api/hooks so that gemini cli can test, interact, and manipulate the state of the gui & program backend for automated testing.' 2026-02-23 12:38:29 -05:00
ed 5f9bc193cb feat(api): Add GUI state manipulation hooks with thread-safe queueing 2026-02-23 12:21:18 -05:00
ed d9d056c80d feat(api): Add project and session state manipulation hooks 2026-02-23 12:17:32 -05:00
ed 44c2585f95 feat(api): Add lightweight HTTP server for API hooks 2026-02-23 12:11:01 -05:00
ed 1306163446 feat(api): Add CLI flag and env var to enable test hooks 2026-02-23 12:06:53 -05:00