Private
Public Access
0
0
Commit Graph

2910 Commits

Author SHA1 Message Date
ed 144127009c update readme splash 2026-06-10 20:33:48 -04:00
ed 886df61051 docs(rag): correct the 'Removed fields' note (claim ChunkingConfig was wrong)
The previous note in guide_rag.md §RAGConfig Schema said:
  'ast_chunking_enabled lives in ChunkingConfig (not in RAGConfig)'

This was a documentation lie. Verified by grep:
- 'class ChunkingConfig' returns 0 matches in src/
- 'ast_chunking_enabled' returns 0 matches anywhere in src/
- The 5 fields (ast_chunking_enabled, auto_index_on_load,
  auto_sync_interval_seconds, vector_store_backend, vector_store_path)
  were never in the real RAGConfig. They were fictional.

Rewrite the note to be honest: 'the old doc was fictional; the
real RAGConfig has 5 fields; the other 5 fields never existed'.
Clarify that top_k is a real runtime parameter (on
RAGEngine.search()) not a config field.
2026-06-10 20:32:11 -04:00
ed 2b0e17ef0c conductor(track): add docs_sync_test_era_20260610 plan.md and spec.md
These were authored at track start but missed by the final-state
commit. They are the brief 1-2 page design intent and executable
plan for the docs sync track. The closing report at
docs/reports/docs_sync_test_era_20260610.md summarizes the actual
17-commit execution.
2026-06-10 20:25:32 -04:00
ed da240577f9 conductor(track): close docs_sync_test_era_20260610
- state.toml: status active->completed, all 25 tasks marked complete
  with commit SHAs, all 4 phases checkpointed
- metadata.json: status active->shipped, 17-commit list, all 9
  verification criteria flipped to DONE
2026-06-10 20:24:31 -04:00
ed aa7cdce844 docs(report): docs_sync_test_era_20260610 — closing report
17-commit summary of the test-era docs sync track. Covers:
- Phase 1: 11 doc drift fixes (10 atomic commits)
- Phase 2: 4-track end-state cleanup (archive, state.toml, metadata.json)
- Phase 3: 4 lessons placed in durable locations
- Verification: 4 audit scripts, path checks, cross-link spot-check
- Out of scope items deferred to next agent

Result: the next Tier 2 engaging qwen_llama_grok has pristine
context to read. Closing the docs_sync_test_era_20260610 track.
2026-06-10 20:23:00 -04:00
ed 72b237457e docs(guidelines): add Testing Requirements section with 4 standards
- Structural Testing Contract (mirrors workflow.md)
- Isolated-Pass Verification Fallacy (Lesson 1, with link to the
  test_infrastructure_hardening_batch_green_20260610 incident report
  that motivated the rule)
- Audit Scripts as CI Gates (4 scripts: check_test_toml_paths,
  audit_main_thread_imports, audit_weak_types, audit_no_models_config_io)
- Skip Markers Are Documentation, Not Avoidance (workflow.md policy)
2026-06-10 20:20:58 -04:00
ed 965e015709 docs(workflow): add 3 test-hell lessons to Known Pitfalls + Live_gui Test Fragility
Known Pitfalls (new subsection):
- HARD BAN: git checkout -- <file>, git restore, git reset
  (per AGENTS.md Critical Anti-Patterns; destroyed user in-progress
  edits twice on 2026-06-07; concrete 2026-06-10 incident:
  mma_tier_usage_reset_fix regression)

Live_gui Test Fragility (2 new subsections):
- Anti-pattern: push_event + time.sleep(N) + assert is a race.
  Fix: poll-until-state-visible with bounded retries. 5+ tests
  affected in 2026-06-10 batch-green wave.
- Async setters need poll-for-state. mma_state_update and rag_*
  setters dispatch to _pending_gui_tasks queue; the setter returns
  before the GUI render loop processes the task. Assert immediately
  = race. Fix: poll via get_value with bounded retry.
2026-06-10 20:19:54 -04:00
ed 01ea22fc4a docs(styleguide): add chroma_cache.md — chroma DB path and cleanup pattern
Lesson 5 from the 4-day test-hell saga. The chroma cache lives at
tests/artifacts/.slop_cache/chroma_<collection>/, NOT at the per-run
live_gui_workspace_<timestamp>/ subdir. The trailing-slash bug in
Path(active_project_path).parent places the cache one level higher
than expected.

RAG tests must pre-clean the cache to avoid persistent state from
prior batched runs. Documents the cleanup pattern (shutil.rmtree with
ignore_errors=True), the auto-recovery mechanism (_validate_collection_dim),
and 3 anti-patterns (assuming per-run, not cleaning, asserting on
first chunk in batched context).
2026-06-10 20:18:09 -04:00
ed f0b7c8b7d6 conductor(index): add Test Infrastructure Hardening to Recently Shipped
New entry at the top of the Recently Shipped list, linking to the
archive/ folder. Includes:
- 314/314 green across all 11 tier batches
- FR1-FR5 summary
- 3 lineage tracks also archived
- The 4 unblocked tracks
- Link to the closing batch-green report
2026-06-10 20:16:17 -04:00
ed 3945fe37fe conductor(tracks): archive test_infrastructure_hardening_20260609 in tracks.md
- Remove row 1 from Active Tracks table
- Update rows 2-5, 17: test_infrastructure_hardening_20260609 -> '(merged)'
- Mark test_infrastructure_hardening as [COMPLETE 2026-06-10] [archived]
- Update link to use archive/ instead of tracks/
- Add closing note: 314/314 tests green, lineage tracks also archived
2026-06-10 20:15:18 -04:00
ed 5d2624526b conductor(archive): move 4 test-hell lineage tracks to archive/
- workspace_path_finalize_20260609 -> archive/ (precursor track)
- test_infrastructure_hardening_20260609 -> archive/ (main 8-phase track)
- mma_tier_usage_reset_fix_20260610 -> archive/ (4 controller bug fixes)
- rag_phase4_sync_fix_20260610 -> archive/ (RAG dim-mismatch + rag_config reset)

The archive/ directory already existed (71+ archived tracks from
earlier phases). The 4 tracks' state.toml + metadata.json were already
closed in the prior commit. This just relocates the folders to match
the convention referenced in tracks.md.
2026-06-10 20:12:50 -04:00
ed 1ea38ad16b conductor(track): close 4 test-hell lineage tracks (state + metadata)
- test_infrastructure_hardening_20260609: status active->completed,
  last_updated 2026-06-09->2026-06-10, t7_*/t8_* tasks marked complete
  with commit SHAs (84edb200, 719fe9a, cb525519)
- mma_tier_usage_reset_fix_20260610: status spec->shipped
- rag_phase4_sync_fix_20260610: status spec->shipped
- workspace_path_finalize_20260609: status active->completed,
  current_phase 1->complete, all tasks marked complete
  (c725270b, 93ec2809), verification flags flipped to true
2026-06-10 20:09:01 -04:00
ed 237f572592 docs(app_controller): replace fictional __init__ + register_hooks with real flow
The previous doc showed:
- A fictional AppState dataclass (does not exist)
- A fictional __init__ that creates manager objects in __init__
  (managers are lazy via __getattr__, created in _load_active_project)
- A fictional register_hooks(app) method (real flow is _init_actions
  called from init_state populates _predefined_callbacks)
- A fictional enable_test_hooks parameter (real signature is
  defer_warmup: bool = False, log_to_stderr: Optional[bool] = None;
  --enable-test-hooks is parsed by sloppy.py for HookServer, not here)

The new doc describes the real init flow (timeline anchors, 12 locks,
GUI health state, io_pool, warmup manager, flags) and points to the
actual line numbers in src/app_controller.py.
2026-06-10 20:07:08 -04:00
ed 5fa8a10ebf docs(testing): critical live_gui_workspace path fix + 8 new sections
CRITICAL fix:
- live_gui_workspace path: tmp_path_factory (banned) ->
  tests/artifacts/live_gui_workspace_<timestamp> (per-run timestamp)
  (per conductor/code_styleguides/workspace_paths.md)

8 new sections under 'Per-test Subprocess Resilience':
1. _reset_clean_baseline autouse fixture (mma_tier_usage +
   rag_config=default RAGConfig(), not None)
2. Watchdog and Hang Bounding (signal-based, 900s smart + 900s
   unconditional, replaces removed 30s daemon-thread)
3. Chroma Cache Path (tests/artifacts/.slop_cache/, parent-trailing-slash
   bug, pre-cleanup pattern in test_rag_phase4_final_verify)
4. xdist Worker Coordination (O_EXCL file lock, PYTEST_XDIST_WORKER,
   owner/client roles, stale lock demotion)
5. Required Test Dependencies Gate (sentence-transformers,
   uv sync --extra local-rag fix)
6. MMA and RAG State in reset_session() (5 buckets: mma_tier_usage
   pre-populated, rag_config fresh RAGConfig() not None)
7. _LiveGuiHandle __getitem__ (handle[0] / handle[1])

Expand 'Audit Script' -> 'Audit Scripts' (4 scripts total):
- check_test_toml_paths.py (existing)
- audit_main_thread_imports.py (startup_speedup)
- audit_weak_types.py (data_structure_strengthening)
- audit_no_models_config_io.py (config_state_owner styleguide)
2026-06-10 20:05:16 -04:00
ed 2e12b266e4 docs(mcp_client+ai_client): correct tool counts (15->18, 45->46)
- Total tool count: 45 -> 46 (per src/models.py:AGENT_TOOL_NAMES)
- Python AST tools: 15 -> 18 (3 structural mutators added:
  py_remove_def, py_add_def, py_move_def, py_region_wrap)
- py_get_symbol_info is fictional; replaced with the 4 actual
  structural mutator tools
- Cross-link from guide_ai_client.md updated
2026-06-10 20:02:01 -04:00
ed 07c1ed4928 docs(ai_client+api_hooks): lazy-loading + warmup endpoints (startup_speedup)
guide_ai_client.md:
- Add 'Module-Level Imports' section explaining that the 5 provider SDKs
  are NOT imported at module level; they're obtained via
  src.module_loader._require_warmed() after the WarmupManager loads them
  in the background. (Per startup_speedup_20260606: import src.ai_client
  went from ~1800ms to ~161ms.)

guide_api_hooks.md:
- Add 4 warmup endpoints to the endpoints table:
  /api/warmup_status, /api/warmup_wait?timeout=N,
  /api/warmup_canaries, /api/startup_timeline
- Add 'Warmup API' section with client methods + external script pattern
  (use get_warmup_wait() instead of time.sleep() race)
2026-06-10 20:00:37 -04:00
ed ca48d33d16 docs(simulations): update live_gui fixture signature to _LiveGuiHandle
The live_gui fixture in tests/conftest.py:467 now yields a _LiveGuiHandle
object (not a tuple). The handle exposes:
- .process, .gui_script, .workspace (Path to per-run workspace)
- .is_alive(), .ensure_alive(), .respawn_count
- __iter__ and __getitem__ for backward-compatible tuple unpacking

Also document the xdist O_EXCL file-lock coordination pattern and the
PYTEST_XDIST_WORKER env var owner/client role split.
2026-06-10 19:53:44 -04:00
ed c501035609 docs(gui_2): __getattr__ hasattr-guard + startup architecture section
Critical fix:
- Update __getattr__ code example to show the current bcdc26d0 version
  (with hasattr guard); old example showed the silent-None bug version

New section 'Startup Architecture (Lazy Imports, Profiler, Refresh Rate)':
- _LazyModule proxies (np, filedialog, Tk, win32gui, win32con)
- _FiledialogStub for headless/tkinter-less envs
- startup_profiler + render_warmup_status_indicator (defer_warmup=True)
- Native _detect_refresh_rate_win32 (ctypes.EnumDisplaySettingsW)
- immapp.run try/except error handling (native 0xc0000005 graceful degrade)
2026-06-10 19:52:11 -04:00
ed 5aa19e59e7 docs(rag): sync with src/rag_engine.py (collection attr, chroma path, dim validation)
Critical fixes:
- Chroma path: .rag/chroma/ -> .slop_cache/chroma_<collection_name>/
- self.vector_store -> self.client (PersistentClient) + self.collection (Collection)
- vector_store_backend -> vector_store.provider (nested VectorStoreConfig)
- RAGConfig schema: removed fictional fields (ast_chunking_enabled,
  vector_store_backend, vector_store_path, auto_index_on_load,
  auto_sync_interval_seconds, top_k); added VectorStoreConfig nested

New sections:
- Dimension Mismatch Protection: documents _validate_collection_dim
  and why it exists (silent corruption from provider switches)
- Path resolution resilience: index_file() CWD fallback for batched tests
2026-06-10 19:50:35 -04:00
ed f973fb275f docs(workspace_profiles): fix WorkspaceProfile schema (ini_content, show_windows, panel_states)
The 2026-06-05 live_gui_fragility_fixes refactor replaced the old 7-field
WorkspaceProfile (docking_layout: bytes, window_visibility, theme,
theme_fx_enabled, captured_at, description) with a 4-field model:
ini_content: str, show_windows, panel_states. tomli_w rejects bytes,
so the ini_content is now a plain ImGui ini string, not base64.

- Update Data Model class example + field table
- Update Serialization section + TOML example
- Update Profile Activation + Capturing Current State steps
- Update Layout Stability note (binary blob -> raw ini string)
- Replace 'Theme FX State is Global' limitation with 'Theme is Not Captured'
2026-06-10 19:46:46 -04:00
ed 7f58f980c6 docs(readme): fix WorkspaceProfile description + gui_2 line refs
- WorkspaceProfile entry: docking_layout bytes -> 4-field model description
- guide_gui_2 entry: _capture_workspace_profile line 601-606 -> 813-841
- Add: __getattr__ ui_ attrs fix, lazy imports, warmup, refresh rate
2026-06-10 19:43:59 -04:00
ed d82153c058 docs(models): sync WorkspaceProfile dataclass to 4-field model
Match the actual src/models.py WorkspaceProfile:
- name: str
- ini_content: str
- show_windows: Dict[str, bool]
- panel_states: Dict[str, Any]

Remove fictional fields (scope, auto_switch_triggers, description).
Remove non-existent LayoutPreset class (was a 2026-06-05 casualty).
2026-06-10 19:43:58 -04:00
ed 252905546e docs(report): test infrastructure hardening - batch goes green 2026-06-10 2026-06-10 18:08:26 -04:00
ed f51bfdcd05 fix(rag): remove INVESTIGATE diagnostic logging 2026-06-10 17:37:03 -04:00
ed 5a9b8d6891 fix(test+rag): clean chroma cache pre-test + add INVESTIGATE stderr for RAG init 2026-06-10 17:20:57 -04:00
ed a3abe49ca9 fix(test): poll for mma_state_update 'simulating' to land in test_gui_ux_event_routing 2026-06-10 15:45:44 -04:00
ed 2c924fe6df test(infra): poll-for-event race fixes + watchdog timeout bump + spec update 2026-06-10 15:14:35 -04:00
ed 563e609505 fix(test): poll for push_event to land in test_visual_mma_components 2026-06-10 15:13:25 -04:00
ed 8f7de45aca fix(rag): robust test polling for entry race + stress test timing tolerance 2026-06-10 14:43:27 -04:00
ed 80697e221a conductor(checkpoint): RAG phase 4 sync fix + test assertion fix - track complete 2026-06-10 13:55:06 -04:00
ed 15ffc3a34f fix(rag): make test assertion accept either file's content (robust to chroma ordering) 2026-06-10 13:53:52 -04:00
ed 2ad0d6a3f0 conductor(plan): Update RAG sync fix track state - sync works, retrieval assertion is separate 2026-06-10 13:29:18 -04:00
ed dc90c54161 fix(rag): reset rag_config to default RAGConfig() (not None) in _handle_reset_session 2026-06-10 13:15:36 -04:00
ed 989b2e6835 conductor(plan): New track for RAG phase 4 sync fix 2026-06-10 12:45:56 -04:00
ed 1772fa8fc2 conductor(checkpoint): Final Phase 2 complete - FR1+FR2 re-applied, sim test passes in batch 2026-06-10 12:13:16 -04:00
ed d945cb7432 fix(controller): re-apply FR1+FR2 (mma_tier_usage pre-population + _flush_to_project defensive d.get) 2026-06-10 11:55:22 -04:00
ed 14a329c1a9 conductor(plan): Adjust track after catastrophic git checkout - FR1+FR2 reverted, FR3+FR4 were no-ops 2026-06-10 11:45:56 -04:00
ed 4660b8c874 fix(sim): defensive .setdefault('paths', []) in test_context_sim_live 2026-06-10 11:33:15 -04:00
ed c729f8adaf conductor(plan): Update spec/plan for Phase 2 (live_gui sim test fragility) 2026-06-10 10:12:09 -04:00
ed e788512d93 conductor(plan): Mark mma_tier_usage_reset_fix_20260610 as complete 2026-06-10 09:59:26 -04:00
ed 428aa18948 conductor(checkpoint): Checkpoint end of Phase 1 (4 FRs + 4 regression tests) 2026-06-10 09:56:21 -04:00
ed b96d709efb test(reset): regression for 3 pre-existing controller bugs 2026-06-10 09:16:46 -04:00
ed 4284ec6eba fix(controller): remove 'persona_manager' from _LAZY_MANAGER_DEFAULTS 2026-06-10 09:03:12 -04:00
ed bc4651d1e4 fix(controller): re-add self.context_preset_manager init (lost in 72f8f466) 2026-06-10 08:56:35 -04:00
ed 1919aa8a32 fix(controller): _flush_to_project defensive against missing 'model' key 2026-06-10 08:48:57 -04:00
ed d80c94b973 fix(controller): pre-populate mma_tier_usage on reset (restore _flush_to_project contract) 2026-06-10 08:46:54 -04:00
ed f5021360f1 wip: pre-mma-tier-usage-reset-fix (preserve inherited working tree) 2026-06-10 08:43:18 -04:00
ed d304af5d22 sigh 2026-06-10 08:34:46 -04:00
ed 72f8f466fe fix(sim+api): proper wait loops, project switch endpoint, drop stale check
Three real fixes for the sim test + the live_gui coordination layer:

1. /api/project_switch_status endpoint in src/app_controller.py.
   The wait helper had been calling this endpoint but it did not exist;
   the helper always received a 404, fell back to {in_progress: False},
   and returned immediately even when a switch was in flight. Added the
   endpoint that reads _project_switch_in_progress, active_project_path,
   and _project_switch_error from the controller.

2. simulation/sim_base.py: replace time.sleep(2.0)/time.sleep(1.5) in
   the setup() with wait_io_pool_idle and wait_for_project_switch so
   the test does not click btn_md_only while a project switch is in
   flight. Also added the wait calls to sim_context.py for the same
   reason.

3. src/app_controller.py _handle_md_only: removed the is_project_stale()
   early-return. The stale state is a transient window during which the
   previous code dropped the click on the floor with a misleading
   'stale ui' status. The MD generation worker is safe to run from any
   project state; the action handler now always proceeds.

4. tests/test_extended_sims.py: set current_model to 'gemini-cli' so
   _do_generate does not raise KeyError('model') when the test
   overrides provider to gemini_cli.

KNOWN ISSUE: test_context_sim_live still fails with status
'switching to: temp_livecontextsim' after a 60s wait. The click
appears to be re-triggering a project switch via the GUI's render
loop. Root cause investigation deferred; the sim is async and the
test path is fragile.
2026-06-10 00:31:22 -04:00
ed 33d02bb11f fix(test): drop rmtree race in live_gui workspace creation
The session-scoped live_gui fixture deleted the shared workspace
before recreating it, which raced with the per-worker lock acquisition
and produced FileNotFoundError on .live_gui_owner.lock in xdist.
The per-run timestamped name (tests/artifacts/live_gui_workspace_<ts>/)
already provides enough isolation between pytest invocations, so the
rmtree is unnecessary. Use mkdir(exist_ok=True) only.
2026-06-09 23:31:09 -04:00