Private
Public Access
0
0
Commit Graph

2765 Commits

Author SHA1 Message Date
ed 54e46ee815 docs(todo): note regression discovered and fixed in test_context_sim_live 2026-06-08 12:35:24 -04:00
ed 4548726a2b conductor(tracks): restructure - chronological by phase + status groupings + active queue table 2026-06-08 12:26:56 -04:00
ed e0a3eb8c05 fix(app_controller): regression in test_context_sim_live from clearing active_project_path
Task 2 (_handle_reset_session reset) introduced a regression: setting self.active_project_path to empty caused an infinite re-switch loop in _do_project_switch because _flush_to_project writes to active_project_path (raises OSError on empty path), and the finally block re-submitted the failed switch on every iteration. Result: test_context_sim_live saw switching-to status for 5+ seconds and MD-only generation was blocked.

Fix: keep self.active_project_path as-is in _handle_reset_session. Only reset self.project (to a fresh default_project dict) and self.project_paths (to empty list). The stale project state issue is solved by replacing the project dict; the active_project_path stays valid for _flush_to_project.

- src/app_controller.py: refined _handle_reset_session project reset
- tests/test_handle_reset_session_clears_project.py: updated contract test to assert active_project_path is preserved
2026-06-08 12:24:10 -04:00
ed 40d61bf3d8 docs(todo): mark Tasks 1+2 as SHIPPED for test_full_live_workflow fix 2026-06-08 10:15:54 -04:00
ed 6ecb31ea0a feat(app_controller): reset project state in _handle_reset_session
Stale project state from prior live_gui tests (shared session-scoped
subprocess) was leaking into subsequent tests, causing the
test_full_live_workflow race condition: 'Project not switched' errors
when self.project still claimed to be a different project.

The fix: _handle_reset_session now mirrors the default-project branch
of __init__ (lines 1743-1745), creating a fresh default project dict,
clearing active_project_path and project_paths, and reinitializing
the workspace manager.

- src/app_controller.py: 6 new lines in _handle_reset_session
- tests/test_handle_reset_session_clears_project.py: 3 tests
  (active_project_path, project_paths, self.project)
2026-06-08 10:13:07 -04:00
ed abb3856525 feat(api_hooks): add /api/project_switch_status endpoint for deterministic test signaling
Adds a new endpoint that exposes the project-switch state machine so tests
can poll for completion instead of guessing with timeouts.

- AppController: track _project_switch_error on failure paths
- src/api_hooks.py: GET /api/project_switch_status returns
  {in_progress, pending_path, active_path, error}
- src/api_hook_client.py: get_project_switch_status() helper
- tests/test_api_hooks_project_switch.py: 3 unit tests for client + endpoint
  shape, 1 live_gui test for the default-idle case
2026-06-08 09:55:36 -04:00
ed c531cebe03 conductor(plan): review pass — fix cross-references, add NOT_READY + with_errors + Lottes/Valigo, split §3.4 into 8 sub-tasks 2026-06-08 09:38:27 -04:00
ed 8248a49f1e docs(todo): simple todo list for fixing test_full_live_workflow race 2026-06-08 09:25:18 -04:00
ed 08ee7547be docs(reports): root cause report for test_full_live_workflow race condition 2026-06-08 09:24:14 -04:00
ed 64823493c0 conductor(closeout): ship test_batching_refactor_20260606 with CLOSEOUT.md and follow-up recommendation 2026-06-08 08:36:22 -04:00
ed 488ae04459 fix(run_tests_batched): detect batch failure from output when proc.returncode is wrong 2026-06-08 02:03:50 -04:00
ed 5c6eb620a1 fix(run_tests_batched): colorize non-xdist format (tests/... STATUS), filter 'Error during log pruning' noise 2026-06-08 01:54:56 -04:00
ed 272b7841ae fix(run_tests_batched): filter xdist scheduling queue output (test paths without status prefix) 2026-06-08 01:51:07 -04:00
ed a2d16541d0 fix(run_tests_batched): keep pytest's full -v output, only filter LogPruner/win errors, colorize per-test status 2026-06-08 01:49:39 -04:00
ed 21cb57b31d fix(run_tests_batched): graceful xdist fallback, live progress streaming, ANSI colors, absolute default paths 2026-06-08 01:28:53 -04:00
ed fb6b4bd3eb conductor(tracks): mark test_batching_refactor_20260606 as completed 2026-06-08 01:18:20 -04:00
ed 50bd894f8d conductor(archive): ship test_batching_refactor_20260606 to archive 2026-06-08 01:16:58 -04:00
ed 50f26f0d5c chore: delete legacy run_tests_batched.py (was preserved for one cycle) 2026-06-08 01:15:12 -04:00
ed ac7e638b23 chore: gitignore tests/.test_durations.json (developer-local cache) 2026-06-08 01:14:51 -04:00
ed 9eac02ddcb feat(tests): populate test_categories.toml with cross-cutting entries 2026-06-08 01:14:12 -04:00
ed 796eec0058 conductor(plan): mark Phases 2,3 complete in test_batching_refactor_20260606 2026-06-08 01:09:02 -04:00
ed 5252b6d782 docs(testing): document new run_tests_batched.py in Running Tests section 2026-06-08 01:00:50 -04:00
ed e6ad2ecda2 chore: preserve old run_tests_batched.py as .legacy for one cycle 2026-06-08 00:59:49 -04:00
ed 2c3a0512f2 feat(run_tests_batched): full CLI with --tiers, --durations, actual pytest execution 2026-06-08 00:58:53 -04:00
ed 7610c9c1dc conductor(plan): mark Phase 1 complete in test_batching_refactor_20260606 2026-06-08 00:53:59 -04:00
ed 57285d048b feat(run_tests_batched): add --plan and --audit modes (Phase 1 stub) 2026-06-08 00:50:37 -04:00
ed 29ac64adc6 test(conftest): register tests.pytest_collection_order as pytest plugin 2026-06-08 00:49:11 -04:00
ed f240504f0e feat(collection_order): implement opt-in per-test sort via conftest hook 2026-06-08 00:47:21 -04:00
ed 6287005ad1 test(collection_order): add red tests for opt-in sort_items_by_order 2026-06-08 00:47:03 -04:00
ed e07036ad5d feat(batcher): implement Batch dataclass and plan() function 2026-06-08 00:46:12 -04:00
ed 246f293c56 test(batcher): add red tests for plan() function 2026-06-08 00:41:20 -04:00
ed 9c5ad3fb8d config 2026-06-08 00:40:33 -04:00
ed f778ef509e feat(categorizer): implement load_registry, merge_registry, categorize_all 2026-06-08 00:33:21 -04:00
ed 2b56ab3c5c conductor(track): initialize test_batching_post_refactor_polish_20260607 spec/plan/state 2026-06-08 00:27:32 -04:00
ed 828050ae4f test(categorizer): add red tests for registry merge and full classification 2026-06-08 00:27:04 -04:00
ed 9e5fed56a5 feat(categorizer): implement subsystem/speed/batch_group inference 2026-06-08 00:22:22 -04:00
ed 7aaac7d586 test(categorizer): add red tests for subsystem/speed/batch_group inference 2026-06-08 00:21:03 -04:00
ed b2e8cce9f6 feat(categorizer): implement auto_classify using AST scan (no regex) 2026-06-08 00:19:43 -04:00
ed fb54737f45 test(categorizer): add red tests for auto_classify fixture_class rules 2026-06-08 00:16:18 -04:00
ed dd48c095b8 refactor(tests): move test_categorizer library from scripts/ to tests/ 2026-06-08 00:15:19 -04:00
ed 4d6464324f feat(scripts): add CategoryRecord data model for test categorization 2026-06-08 00:11:22 -04:00
ed 746dde8286 push latest related to default layout 2026-06-07 23:50:24 -04:00
ed 2db1436130 TEST LAYOUT 2026-06-07 23:33:13 -04:00
ed 818537b3dd feat(gui): Add layout staleness diagnostic on startup
Adds a one-shot `_diag_layout_state` method that runs in `_post_init`
and prints three lines to stderr:

1. `[GUI] show_windows entries: N, visible by default: M` — how many
   windows are defined vs. visible with no layout file.
2. `[GUI] visible-by-default windows: ...` — the names of windows
   that will appear on a fresh launch.
3. `[GUI] WARNING: layout has N stale window name(s) that no longer
   exist: ...` — when the on-disk manualslop_layout.ini references
   window names that the current code has dropped (Projects/Files/
   Screenshots/Provider/Discussion History/etc. — all replaced by
   the hub pattern in earlier refactors).

This addresses the user's observation that:
- "the diagnostics panel still only shows itself"
- "I see a flicker as if the layout got reset but cannot retain
  permanence"

Both symptoms are caused by the repo-root manualslop_layout.ini
referencing pre-hub-refactor window names that HelloImGui silently
drops on load. The diagnostic surfaces the root cause in the test
log so the user can see exactly which stale names are present,
without having to manually diff the .ini file.

Verified: log appears in `logs/sloppy_py_test.log` on the next
live_gui test run, including the 11 default-visible windows and
the staleness check.
2026-06-07 22:36:19 -04:00
ed 7a4f71e78b test(fix): Don't copy stale repo-root layout to live_gui workspace
The repo-root manualslop_layout.ini references pre-hub-refactor
window names that no longer exist in the current code
(Projects/Files/Screenshots/Provider/System Prompts/etc.).
HelloImGui silently drops unknown windows when loading the
layout, causing "missing panels" in live_gui tests and in the
user's interactive session.

The previous "Preserve GUI layout for tests" block copied the
stale repo-root layout into the live_gui workspace, infecting
every live_gui test session with stale state.

Fix: skip the copy. HelloImui will generate a fresh layout in
the test workspace on shutdown, which then lives in the
session-scoped workspace and is cleaned up at teardown.

The repo-root manualslop_layout.ini is still TRACKED (I did
not delete it; that's the user's call). They can:
- Delete it manually, or
- Run the existing "Reset Layout" command from the Command Palette
  (which deletes both repo-root and live_gui_workspace paths and
  forces HelloImGui to regenerate with the current window catalog).

Verified: 6/6 targeted tests pass.
2026-06-07 21:27:29 -04:00
ed 94cfb1b5ff test(fix): Update tests to route config through AppController/env var
Four test files had patches/monkeypatches that referenced the
removed src.models.load_config or src.models.CONFIG_PATH module
constant. These all stem from the config I/O refactor (commit
7bcb5a8c) that renamed load_config/save_config to private I/O
primitives.

- tests/test_external_editor_gui.py: 2 sites changed from
  monkeypatch.setattr(models_module, 'load_config', ...) to
  monkeypatch.setattr('src.app_controller.AppController.load_config', ...)
- tests/test_external_mcp_e2e.py: CONFIG_PATH monkeypatch changed
  to SLOP_CONFIG env var (the only supported override path)
- tests/test_log_management_ui.py: same CONFIG_PATH -> SLOP_CONFIG fix
- tests/test_gen_send_empty_context.py: _StubController now receives
  ui_selected_context_files and _pending_generation_action from the
  app_instance BEFORE being assigned as controller (App.__getattr__
  delegates to controller, so attrs must be on the stub first)

Also: deleted tests/artifacts/manualslop_layout.ini (gitignored
stale file from March 4 referencing pre-refactor window names like
"Projects"/"Files"/"Screenshots" that no longer exist in the code).
Repo-root manualslop_layout.ini still references the same old
window names; user should run the existing "Reset Layout" command
(or delete it manually) to regenerate with the current window
catalog (Context Hub / AI Settings Hub / Discussion Hub / etc.).

Verified: 13 targeted tests pass:
- test_external_editor_gui.py (5/5)
- test_external_mcp_e2e.py (1/1)
- test_log_management_ui.py (2/2)
- test_gen_send_empty_context.py (5/5)
2026-06-07 21:21:38 -04:00
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 5a1767e1d7 grammar 2026-06-07 18:17:26 -04:00
ed bcca069c3b t2 report 2026-06-07 18:08:04 -04:00
ed 0c7ebf2267 fix(models): remove module-level CONFIG_PATH; re-resolve on every call
ROOT CAUSE: src/models.py had `CONFIG_PATH = get_config_path()`
at module level. Every test that imported `src.models` and called
`save_config()` or `load_config()` wrote/read the repo-root
`config.toml` via this cached constant. The path was resolved
once at import time, so the SLOP_CONFIG env var (or test
fixtures) couldn't redirect reads/writes without reimporting the
module.

This silently corrupted the user's config.toml on every test
run. The diff between runs showed: 'config.toml changed in
working copy' — caused by tests, not the user.

FIX: remove the module-level constant; call get_config_path()
on every read/write call. SLOP_CONFIG (and any test-time
set_config_path() helper) now works without reimport.

Also: keep my prior commits to this file (reset_layout command
in src/commands.py; the RUN_MMA_INTEGRATION skipif in
test_mma_step_mode_sim.py) bundled here for a clean atomic
fix-pack since the user just fixed the indentation issue I had.

Verified: src.models imports cleanly; load_config/save_config
work as expected. Tests that import these functions will
use whatever SLOP_CONFIG points to (or the repo-root default).
2026-06-07 17:57:36 -04:00