Private
Public Access
0
0
Commit Graph

2959 Commits

Author SHA1 Message Date
ed 45d316a0bd conductor(plan): mark t2.6-t2.10 complete (t2.7 cancelled: no template); advance to t2.11 2026-06-11 01:34:25 -04:00
ed ab6b53fa8b feat(qwen): add qwen to PROVIDERS; add 7 Qwen pricing entries to cost_tracker
Side concerns for Phase 2:

1. PROVIDERS: src/models.py:56 now includes 'qwen' alongside the existing
   5 vendors. The other 4 references to PROVIDERS in src/gui_2.py and
   src/app_controller.py import from this centralized list, so this
   one edit propagates everywhere. State task t2.8 was scoped to
   'gui_2.py and app_controller.py' but the actual change is at the
   centralized registry, per the project's single-source-of-truth
   pattern (per src/models.py module docstring and the Phase 5 audit
   script audit_no_models_config_io.py which enforces that PROVIDERS
   lives in models.py).

2. cost_tracker.py: added 7 regex pricing entries for the Qwen models
   shipped in Phase 1's vendor_capabilities.py:
   - qwen-turbo: 0.05 / 0.10
   - qwen-plus: 0.40 / 1.20
   - qwen-max: 2.00 / 6.00
   - qwen-long: 0.07 / 0.28
   - qwen-vl-plus: 0.21 / 0.63
   - qwen-vl-max: 0.50 / 1.50
   - qwen-audio: 0.10 / 0.30
   (all per 1M tokens, USD; matches the structure of existing entries)

   Spot check: estimate_cost('qwen-max', 1000, 500) = 0.005 (= 0.002 + 0.003)

3. SKIPPED t2.7 (credentials template): no credentials_template.toml
   exists in the project. The only credentials file is the active
   credentials.toml which the user maintains directly with their own
   API keys. The plan's assumption of a template file does not match
   the project's actual structure. Documented in the commit log
   rather than modifying the user's actual credentials.toml with a
   placeholder key (which would be inconsistent with the rest of
   that file's pattern of real keys). When the user obtains a
   DashScope API key, they can add a [qwen] section directly.

4. t2.9 (Qwen models in capability registry) was completed in Phase 1's
   initial population of 22 entries (commit 6be04bc). The 8 qwen
   entries (1 wildcard + 7 specific models) are in src/vendor_capabilities.py.

Verification: 30/30 tests pass in batch
(test_qwen_provider, test_minimax_provider, test_ai_client_no_top_level_sdk_imports,
test_vendor_capabilities, test_openai_compatible, test_cost_tracker)
2026-06-11 01:30:38 -04:00
ed de5e106234 fix(qwen): align with dashscope 1.25.21 API; remove InvalidApiKey monkey-patch 2026-06-11 01:26:53 -04:00
ed b75f60c3fe feat(ai): Add Qwen provider support to ai_client 2026-06-11 01:20:35 -04:00
ed bc2cce1612 feat(ai): Add Qwen adapter for DashScope provider 2026-06-11 01:20:19 -04:00
ed 6858dba3f5 remove unused files 2026-06-11 01:02:02 -04:00
ed 3940eb36ac conductor(plan): mark t2.1-t2.5 complete; advance to t2.6 (Green) 2026-06-11 00:53:58 -04:00
ed 060f471cb9 test(qwen): red phase for Qwen via DashScope (5 failing tests)
5 failing tests in tests/test_qwen_provider.py that establish the
core behaviors of the new Qwen (DashScope) provider:

1. test_send_qwen_routes_to_dashscope: _send_qwen calls _ensure_qwen_client
   and _dashscope_call, returns the text from the DashScope response
2. test_qwen_vision_vl_model_accepts_image: when file_items contains an
   image, the messages passed to _dashscope_call include the image ref
3. test_qwen_tool_format_translation: build_dashscope_tools converts
   OpenAI-shaped tool dicts to DashScope shape (name/description/parameters
   flat structure, not wrapped in function:)
4. test_qwen_error_classification: classify_dashscope_error maps
   dashscope.common.error.InvalidApiKey -> ProviderError(kind='auth',
   provider='qwen')
5. test_list_qwen_models_returns_hardcoded_registry: _list_qwen_models
   returns the 7 Qwen models registered in src/vendor_capabilities.py

The autouse _reset_qwen_state fixture uses hasattr() so it is a no-op
when _qwen_client / _qwen_history do not exist (yet); this keeps the
fixture working in the Red phase.

All 5 tests fail:
- Tests 1, 2: AttributeError: src.ai_client has no _ensure_qwen_client /
  _send_qwen / _dashscope_call
- Tests 3, 4: ModuleNotFoundError: No module named src.qwen_adapter
- Test 5: ImportError: cannot import name _list_qwen_models

Test signature adapted to match the real _send_minimax signature at
src/ai_client.py:2143-2148 (10 params, no enable_tools / rag_engine)
rather than the plan's 12-param signature.

Next: Green phase - implement src/qwen_adapter.py + src/ai_client.py
state + _ensure_qwen_client + _send_qwen + _list_qwen_models.
2026-06-11 00:53:10 -04:00
ed d5373e8f94 conductor(plan): mark t1.12 + phase_1 complete; advance to phase 2 2026-06-11 00:48:14 -04:00
ed 03da130780 conductor(checkpoint): Phase 1 complete - capability matrix framework + shared helper
Phase 1 of qwen_llama_grok_integration_20260606 ships two new modules and
one new dependency, all under TDD discipline (12 tasks, 4 atomic commits,
3+6 failing-then-passing tests).

Modules shipped:
- src/vendor_capabilities.py (55 lines): VendorCapabilities frozen dataclass
  with 12 fields, module-level _REGISTRY dict keyed by (vendor, model),
  register() / get_capabilities() (with vendor '*' wildcard fallback) /
  list_models_for_vendor() functions, 22 initial registry entries
  (1 minimax, 4 grok, 9 llama, 8 qwen; plan's typo of minimax/grok-2-latest
  omitted).
- src/openai_compatible.py (144 lines): NormalizedResponse frozen dataclass,
  OpenAICompatibleRequest dataclass, send_openai_compatible() dispatch,
  _send_blocking + _send_streaming helpers, _classify_openai_compatible_error
  error classifier (RateLimitError->rate_limit, AuthenticationError->auth,
  etc.). Fixed plan's MagicMock_noop forward-reference code smell.

Tests shipped (all passing):
- tests/test_vendor_capabilities.py (40 lines, 3 tests)
- tests/test_openai_compatible.py (88 lines, 6 tests)
- Total: 9 new tests, 0 regressions

Dependency added:
- pyproject.toml: dashscope>=1.14.0,<2.0.0 (installed: 1.25.21)

Verification:
- 24/24 tests pass in batch (test_minimax_provider, test_ai_client_no_top_level_sdk_imports,
  test_vendor_capabilities, test_openai_compatible)
- 4 audit scripts pass with no new violations:
  - scripts/audit_main_thread_imports.py: OK
  - scripts/audit_weak_types.py: OK
  - scripts/check_test_toml_paths.py: OK
  - scripts/audit_no_models_config_io.py: OK
- src/ai_client.py: NOT modified (Phase 4 will refactor _send_minimax)
- src/openai_compatible.py and src/vendor_capabilities.py are importable
  with no side effects beyond registry population
- No threading.Thread calls introduced (per project invariant)
- Module-level imports in new files are stdlib + openai (already-used SDK)
  + a function-level import of ProviderError from src.ai_client inside
  the error classifier (avoids circular import risk)
2026-06-11 00:46:41 -04:00
ed 67782198b6 conductor(plan): mark t1.11 (dashscope dep) complete; advance to t1.12 2026-06-11 00:46:18 -04:00
ed f4186f1061 chore(deps): add dashscope>=1.14.0,<2.0.0 for Qwen support 2026-06-11 00:44:08 -04:00
ed f07e616c38 conductor(plan): mark t1.5-t1.10 complete; advance to t1.11 2026-06-11 00:41:11 -04:00
ed d7d7d5cef9 feat(openai_compatible): implement shared send helper with streaming/tool/vision/error
Green phase: src/openai_compatible.py now exists and all 6 Red-phase
tests in tests/test_openai_compatible.py pass.

Implementation (144 lines, 1-space indent, no comments):

Data structures:
- NormalizedResponse: frozen dataclass with text, tool_calls,
  usage_input_tokens, usage_output_tokens, usage_cache_read_tokens,
  usage_cache_creation_tokens, raw_response
- OpenAICompatibleRequest: regular dataclass with messages, model,
  temperature=0.0, top_p=1.0, max_tokens=8192, tools=None,
  tool_choice='auto', stream=False, stream_callback=None

Algorithms:
- send_openai_compatible(client, request, *, capabilities) -> NormalizedResponse
  Dispatches to _send_blocking or _send_streaming based on request.stream.
  Catches openai.OpenAIError and re-raises as classified ProviderError.
- _send_blocking: extracts message text + tool_calls, converts tool_calls
  to dicts via _to_dict_tool_call, reads usage.prompt_tokens /
  usage.completion_tokens (with int() coercion for MagicMock test compat).
- _send_streaming: iterates chunks, accumulates text parts, aggregates
  tool_calls by index, fires stream_callback per text delta, reads
  chunk.usage for final token counts.
- _classify_openai_compatible_error: maps RateLimitError -> 'rate_limit',
  AuthenticationError/PermissionDeniedError -> 'auth', APIConnectionError
  -> 'network', APIStatusError with 402/429/401-403/500-504 -> 'balance'/
  'rate_limit'/'auth'/'network', BadRequestError -> 'quota', fallback
  'unknown'. All use provider='openai_compatible'.

Fixed plan's code smell: removed the 'MagicMock_noop' forward-reference
class (defined after first use) and replaced with the cleaner Pythonic
pattern 'int(getattr(usage, prompt_tokens, 0) or 0)'. Real OpenAI SDK
always sets usage on responses; the defensive fallback was noise.

Function-level import of ProviderError inside _classify_openai_compatible_error
avoids any circular import risk.
2026-06-11 00:39:58 -04:00
ed b53fe39d79 test(openai_compatible): red phase for shared send helper (6 failing tests)
6 failing tests in tests/test_openai_compatible.py that establish the
core behaviors of the new send_openai_compatible() shared helper:

1. test_send_non_streaming_returns_normalized_response: blocking call
   returns text, empty tool_calls, and correct usage token counts
2. test_send_streaming_aggregates_chunks: streaming call aggregates
   deltas into final text and fires stream_callback per chunk
3. test_tool_call_detection_in_response: tool_calls from the response
   are converted to dicts with id/type/function/arguments fields
4. test_vision_multimodal_message: messages with multimodal content
   (text + image_url) are passed through unchanged to the client
5. test_error_classification_429_to_rate_limit: RateLimitError from
   openai SDK is caught and re-raised as ProviderError(kind='rate_limit')
6. test_normalized_response_is_frozen_dataclass: NormalizedResponse is
   a frozen dataclass (FrozenInstanceError on attribute assignment)

All 6 tests fail with ModuleNotFoundError: No module named
'src.openai_compatible' (confirmed via pytest). The implementation file
will be created in the next commit (Green phase).

ProviderError confirmed importable from src.ai_client (no stub needed).
2026-06-11 00:35:13 -04:00
ed 6f11e7da14 conductor(plan): mark t1.1-t1.4 complete; advance to phase 1 in_progress 2026-06-11 00:31:57 -04:00
ed 6be04bc4f0 feat(vendor_capabilities): implement registry with initial 22-entry population
Green phase: src/vendor_capabilities.py now exists and all 3 Red-phase
tests in tests/test_vendor_capabilities.py pass.

Implementation:
- VendorCapabilities frozen dataclass with 12 fields (vendor, model, vision,
  tool_calling, caching, streaming, model_discovery, context_window,
  cost_tracking, cost_input_per_mtok, cost_output_per_mtok, notes)
- Module-level _REGISTRY dict keyed by (vendor, model)
- register() inserts/overwrites entries
- get_capabilities() returns specific entry if present, else vendor '*'
  default, else raises KeyError with 'No capabilities registered' message
- list_models_for_vendor() returns sorted model names for a vendor
  (excludes '*' wildcard)

Initial population (22 entries at module load):
- 1 minimax wildcard (cost: 0.20/0.20 per Mtok)
- 4 grok (1 wildcard + 3 models; grok-2-vision has vision=True)
- 9 llama (1 wildcard + 8 models; 11b/90b vision variants have vision=True)
- 8 qwen (1 wildcard + 7 models; qwen-vl-plus/max have vision=True;
  qwen-audio has notes='Text-only in v1; audio input deferred')

The plan's Task 1.3 listed 22 entries but included one impossible entry
(vendor='minimax', model='grok-2-latest'). Omitted; 21 entries shipped.

Test fix: test_fallback_to_vendor_default previously used model name
'llama-3.3-70b-specdec' which IS in the registry, so the specific entry
was returned (with default cost_tracking=True), not the wildcard. Fixed
by changing to 'llama-3.3-future-unregistered' (not in registry, so
fallback fires correctly).
2026-06-11 00:30:52 -04:00
ed 6fb6f8653c test(vendor_capabilities): red phase for registry lookup, fallback, unknown vendor
3 failing tests in tests/test_vendor_capabilities.py that establish the
core behaviors of the new VendorCapability matrix:

1. test_registry_lookup_known_model: registering and looking up a specific
   (vendor, model) entry returns the registered entry
2. test_fallback_to_vendor_default: looking up an unregistered model returns
   the vendor's '*' default entry
3. test_unknown_vendor_raises: looking up a vendor with no entries raises
   KeyError with a 'No capabilities registered' message

All 3 tests fail with ModuleNotFoundError: No module named
'src.vendor_capabilities' (confirmed via pytest). The implementation file
will be created in the next commit (Green phase).

The autouse _clean_registry fixture snapshots src.vendor_capabilities._REGISTRY
before each test and restores it after, providing test isolation for the
module-level state.
2026-06-11 00:19:00 -04:00
ed cd2557bc4a config stable 2026-06-11 00:16:22 -04:00
ed 2fa5a14620 docs(report): append Final Report section to docs_sync closing report
Final report for the continuation session that started after the original 25-commit run closed. Covers:

Stats:
- 17 atomic continuation commits (db5ab0d9 -> 7d6dbbd3) plus 03056a4f for the closure summary itself
- 14 unique doc files modified
- 0 source files modified (continuation was docs-only)
- 11 source files read in full; ~20 outlined
- ~250 + lines, ~190 - lines across the doc edits

What was done (14 drift clusters with detailed before/after):
- guide_hot_reload.md: example registration + trigger_key claim
- guide_app_controller.md: filename typo + fictional hot_reload() method
- guide_gui_2.md: line 155 -> 285; reload() -> reload_all()
- guide_nerv_theme.md: 5 wrong hex values; render_nerv_fx fiction; [nerv] config fiction; 0.5 Hz -> 3.18 Hz; 1.5s pulse -> no decay
- guide_shaders_and_window.md: 3 fictional [nerv] config refs
- guide_command_palette.md: 11 -> 33 commands
- guide_mma.md: 5 algorithm drift points (has_cycle iterative, topological_sort Kahn's, tick no-promote, ConductorEngine.__init__ signature)
- guide_beads.md: dispatch line range
- guide_multi_agent_conductor.md: wholesale rewrite of pre-refactor architecture
- guide_tools.md: run_powershell signature (add patch_callback)
- guide_context_curation.md: FuzzyAnchor docstring (replace 'anchor_lines' with real field names)
- guide_simulations.md: CodeOutliner doc (add [ImGui Scope], return-type suffix, count guard)
- Readme.md: 3 line-level drift (45->46 MCP, 32->33 commands, shell_runner patch_callback)
- docs/Readme.md: file tree (24->27 guides with full alphabetical list)
- conductor/index.md: 23 -> 27 guides count

Drift patterns (6, refined from the 4 in the original handoff):
1. Thread counts
2. Line numbers
3. Removed-class claims
4. Schema fields
5. NEW: Architecture rotations (the most common in this continuation)
6. NEW: Hard-coded constants described as config keys

Bucket coverage status (final):
- A (theme) DONE
- B (logging) Partial - cost_tracker and log_pruner audited; no specific doc drift
- C (commands/palette) DONE
- D (file utilities) DONE - run_powershell + CodeOutliner + FuzzyAnchor
- E (runtime/imgui) DONE
- F (MMA orchestrator) DONE
- G (beads/vendor) Partial - beads_client read, vendor_state read, dispatch line ref fixed
- H/I done in original 25-commit run

Mixed-in user files caveat (49ac008a):
- 2 user-authored files swept in from the prior_session_sepia_20260610 track
- User aware and chose to leave the commit as-is
- Theme-track agent should treat those files as owned by that track

Verbiage lesson:
- 'fictional' is a value judgment, not a technical description
- Use 'predates the refactor' / 'stale' / 'no longer matches the source' instead
- Applied in 2 user-facing doc cleanups (guide_app_controller.md:59, guide_rag.md:322)

Recommendations for the theme-track agent:
- Read guide_themes.md:87 before touching the theme system
- Do NOT touch the guide_nerv_theme.md and guide_shaders_and_window.md updates from this session (re-verified against source)
- The theme_2.py:111 comment confirms the per-frame create-and-discard FX pattern
- Run all 4 audit scripts before committing any source code change
- The markdown_table.py spec is older than the source - check both
- The _lang_map reference in the older spec is a pre-refactor claim

Open follow-ups (none blocking):
- B/G finalization
- markdown_helper.py and markdown_table.py source verification (left for theme track)
- Test count verification (322 may drift)
- Doc freshness signal
2026-06-11 00:02:34 -04:00
ed 7d6dbbd371 docs(conductor/index): fix guide count (23->27), update last-refresh date and add docs_sync_test_era_20260610 reference 2026-06-10 23:58:20 -04:00
ed d0dec98a18 docs(readme): refresh file tree + summary table (27 guides with full alphabetical list, 45+1=46 MCP tools, 33 commands, shell_runner with patch_callback, 322 test files) 2026-06-10 23:57:47 -04:00
ed 758f5c861e docs(readme): fix 3 line-level drift in src/ table (45->46 MCP tools, 32->33 commands, add patch_callback to shell_runner) 2026-06-10 23:56:37 -04:00
ed 824f5e9bae docs(simulations): expand CodeOutliner doc (add get_outline dispatcher, [ImGui Scope] case, return-type suffix, count overflow guard) 2026-06-10 23:47:28 -04:00
ed de9107db4f docs(readme): fix tool count in guide_tools summary (26->46 with breakdown) + add patch_callback to shell runner description 2026-06-10 23:46:26 -04:00
ed 99eb434f60 docs(curation): correct FuzzyAnchor docstring (add get_context helper, replace 'anchor_lines' with actual field names) 2026-06-10 23:45:37 -04:00
ed aa4ec2ed08 docs(tools): fix run_powershell signature (add patch_callback + correct Popen kwargs + qa_callback also fires on stderr-only) 2026-06-10 23:45:02 -04:00
ed 03056a4f4c docs(report): append continuation summary to docs_sync closing report
12 atomic commits added after the original 25-commit run closed:

  6 small drift fixes (db5ab0d9..28172135)
    - guide_hot_reload.md: example registration + trigger_key claim
    - guide_app_controller.md: src/hot_reload.py -> src/hot_reloader.py + hot_reload() method
    - guide_gui_2.md: line 155 -> 285; reload() -> reload_all()
    - guide_nerv_theme.md: 5 wrong hex values, stale apply_nerv body, stale
      render_nerv_fx example, [nerv] config that was never wired, 0.5 Hz vs
      actual 3.18 Hz flicker
    - guide_shaders_and_window.md: 3 fictional [nerv] config refs
    - guide_app_controller.md:68: self-referential io_pool docstring claim

  1 mid-size fix (81e88241)
    - guide_command_palette.md: command count 11 -> 33 (full source-derived
      Action column for every @registry.register decorator in src/commands.py)

  2 MMA rewrites (57143b7a, 394987f8, a49e5ffb, e0368174)
    - guide_mma.md: has_cycle recursive -> iterative; topological_sort DFS ->
      Kahn's; tick auto-promotion claim; ConductorEngine.__init__ missing
      max_workers param
    - guide_beads.md: bd_ tool dispatch line range
    - guide_multi_agent_conductor.md: rewrote the TrackDAG and
      ExecutionEngine/ConductorEngine/WorkerPool/mma_exec sections; the prior
      doc predated the conductor_engine refactor and described a different
      architecture (MultiAgentConductor class that doesn't exist, ExecutionMode
      enum that doesn't exist, _dispatch_loop background thread that doesn't
      exist, ThreadPoolExecutor-backed WorkerPool that is actually a
      dict[str, Thread] + lock + semaphore)

  2 verbiage cleanups
    - replaced 'fictional' with neutral phrasing ('predates the refactor' /
      'stale') in 2 places where the prior session had used it in user-facing
      doc text. Going forward doc-drift commits use neutral language;
      'fictional' was a value judgment on the doc and its author, not a
      technical description.

Bucket coverage after continuation: A (theme), C (commands/palette), E
(runtime/imgui), F (MMA orchestrator) fully covered. B (logging) and G
(beads/vendor) partial. H/I (mcp_client/ai_client deep) done in original
25-commit run. Still untouched: D (8 file utilities), shaders.py / bg
shader.py, summary_cache.py.

Caveat for next agent (theme track): commit 49ac008a accidentally swept in
2 user-authored files from the parallel prior_session_sepia_20260610 work
(conductor/tracks/prior_session_sepia_20260610/plan.md and
docs/superpowers/plans/2026-06-10-prior-session-sepia.md). The user is
aware and chose to leave them in that commit. The next agent should treat
those files as owned by the prior_session_sepia_20260610 track and not
modify them from the theme-track context.
2026-06-10 23:41:32 -04:00
ed 49ac008a87 docs: replace 2 'fictional' usages with neutral phrasing (predates the refactor / was stale) 2026-06-10 23:34:33 -04:00
ed e03681741a docs(mma-conductor): rewrite ExecutionEngine/ConductorEngine/WorkerPool/mma_exec sections to match current src/multi_agent_conductor.py (predates the conductor_engine refactor) 2026-06-10 23:31:43 -04:00
ed a49e5ffb16 docs(mma-conductor): replace fictional TrackDAG section with actual src/dag_engine.py API 2026-06-10 23:30:04 -04:00
ed 394987f8b3 docs(beads): fix dispatch line ref (1474-1494 -> 1453-1473; add tool-schema block 2224-2268) 2026-06-10 23:29:18 -04:00
ed 57143b7ab2 docs(mma): fix 5 drift points (has_cycle iterative/DFS->iterative, topological_sort DFS->Kahn, tick auto-promotion, ConductorEngine.__init__ signature+max_workers) 2026-06-10 23:27:46 -04:00
ed 81e8824170 docs(command_palette): fix command count (11->33) and expand table with actual source-derived actions 2026-06-10 23:22:06 -04:00
ed 28172135f2 docs(app_controller): remove stale io_pool docstring claim (fixed in 2972d235) 2026-06-10 23:19:11 -04:00
ed 8d0eb917d9 docs(shaders): fix 3 [nerv] config refs (fx_enabled, scanline_alpha) 2026-06-10 23:18:38 -04:00
ed 7aa484649f docs(nerv_theme): fix 4 drift clusters (color table, render_nerv_fx fiction, [nerv] config, apply_nerv body) 2026-06-10 23:14:21 -04:00
ed e1287a4cf4 conductor(plan): prior_session_sepia_20260610 spec + design + metadata
New track for prior-session sepia tint:
- 3 new theme slots (prior_session_bg, prior_session_tint, prior_session_amount)
- per-palette state dict mirroring _brightness/_contrast/_gamma
- apply_prior_tint helper (float-only math per user requirement)
- 6 prior-session render sites wrapped (2 bubble_vendor swaps + 4 tint wraps)
- Theme Settings panel slider with persistence

Code-block tonemap fix is OUT OF SCOPE (upstream imgui_bundle 1.92.5
API only exposes 4-value PaletteId enum, no per-instance struct).
See spec §1.1.1 and design doc 'Honest constraint' section.
2026-06-10 23:00:29 -04:00
ed 498c3478fa docs(gui_2): fix 3 hot_reload refs (line 155->285, reload->reload_all, _render_* wrappers) 2026-06-10 22:56:47 -04:00
ed 1c104abde2 docs(app_controller): fix 3 hot_reload refs (filename + fictional method) 2026-06-10 22:56:05 -04:00
ed db5ab0d906 docs(hot_reload): fix 2 stale claims (example registration + trigger_key) 2026-06-10 22:54:58 -04:00
ed f1f0e553f8 docs(report): append handoff section to docs_sync closing report
Adds a 'Handoff: Remaining Drifted Docs' section listing:
- 4 already-fixed stale refs found proactively outside the original
  4-commits scope (Readme, 2 reports, guide_tools, 2 source docstrings)
- 9 categories of remaining work (A through I) with file lists, LOC,
  and which docs reference each bucket
- A recommended 3-track decomposition that fits each category in
  one agent context frame
- The 4 most-common drift patterns I encountered (thread counts,
  line numbers, removed-class claims, schema fields)

The next agent can pick up directly from this section without
re-doing the audit I already completed.
2026-06-10 22:32:22 -04:00
ed ea4d3781a6 docs: fix 4 stale refs (4-thread->8, dispatch line 1341->1322, 7->11 locks)
Caught these when re-verifying the 4 commits from docs_sync_test_era_20260610.
Not in my track originally (per the prior 'no track boundary' correction),
but they're stale data and easy to fix in one commit:

- docs/Readme.md:41: '4-thread ... 7 lock-protected regions' -> '8-thread
  io_pool ... 11 lock-protected regions' (bumped 4->8 in 4a338486
  on 2026-06-06; 11 locks counted in __init__ at app_controller.py:778-1212)

- docs/reports/session_synthesis_20260608.md:121: same fix, plus a
  note that this report predates the bump

- docs/reports/workflow_markdown_audit_20260608.md:40: same fix
  (the audit report was correct AT TIME OF WRITE but is now stale)

- docs/guide_tools.md:57: 'mcp_client.py:1341' -> 'mcp_client.py:1322'
  (the dispatch function's actual line)

Left unchanged:
- docs/reports/COMPACTION_DIGEST_20260607.md:45 mentions '4 workers are
  stuck' in a specific historical context (2026-06-07 hang investigation
  pre-bump). That '4' was true at the time and is part of the historical
  record; flagging in commit message not text.
2026-06-10 21:25:56 -04:00
ed c730ff8298 docs(mcp_client): correct tool count (45 MCP + 1 shell = 46 total)
The previous header said 'MCP Tools (46 tools)' which was technically
correct only if counting the full AGENT_TOOL_NAMES list. But this
module actually defines only 45 tools in MCP_TOOL_SPECS. The 46th
is run_powershell, which is handled by src/shell_runner.py.

Updated the header to be honest about the split: 45 MCP tools in
this module + 1 shell tool in shell_runner.py = 46 total. Added
a forward reference to guide_tools.md for run_powershell.
2026-06-10 21:04:23 -04:00
ed 9f89511743 fix(session_logger): correct stale file layout in module docstring
The top-of-file docstring claimed 'logs/sessions/comms_<ts>.log' with
<ts> as a filename prefix. Actual: per-session subdir
'logs/sessions/<session_id>/' with plain filenames (comms.log,
toolcalls.log, apihooks.log, clicalls.log). The <ts>/session_id
is the PARENT DIR, not a filename prefix.

Per commit 73e1a36d (per-session subdirs), the per-session
directory is the unit of isolation. apihooks.log is a fourth
log file the old docstring omitted entirely.

Also added the new files (apihooks.log, outputs/ subdir) and
clarified the scripts/generated/ dual-write pattern.
2026-06-10 20:59:10 -04:00
ed 2972d235a3 fix(io_pool): correct stale docstring (4 threads -> 8 threads)
Per IO_POOL_MAX_WORKERS = 8 (set in commit 4a338486 on 2026-06-06
to relieve contention during batched sims), the pool actually has
8 workers, not 4. The docstring was stale. Also added the SHAs
of the 4->8 bump for traceability.
2026-06-10 20:50:55 -04:00
ed bb1aa3e03c docs: fix 3 more unverified claims (4-thread->8, 12 locks->11, _search_mcp real)
Re-audit after reading the actual full file contents:

1. guide_app_controller.md (the __init__ walkthrough):
   - '4-thread ThreadPoolExecutor' -> '8-thread' per IO_POOL_MAX_WORKERS = 8
     in src/io_pool.py:20 (bumped from 4 in commit 4a338486; the io_pool.py
     module docstring is also stale and says '4 worker threads' - flagged
     for a separate fix).
   - '12 locks' -> '11 locks + 5 non-lock state fields' (re-counted the
     threading.Lock() and the _rag_sync_*/_project_switch_* fields).

2. guide_app_controller.md (the closing line):
   - '12 locks' -> removed; explained the 434-line __init__ body
     composition (locks + state fields + settable_fields + gui_task_handlers).

3. guide_rag.md (Future Work section):
   - 'The _search_mcp method is a placeholder for this' -> WRONG.
     _search_mcp (src/rag_engine.py:322) IS a real implementation that
     calls mcp_client.async_dispatch when vector_store.provider == 'mcp'.
     Rewrote the future-work item to describe the actual mechanism.

4. docs/reports/docs_sync_test_era_20260610.md (the closing report):
   - Same 4-thread->8 and 12-locks->11 corrections propagated.

The structural facts (WorkspaceProfile/RAGConfig/VectorStoreConfig field
lists, method existence, _init_actions/_load_active_project line
numbers, _LiveGuiHandle existence, etc.) were all correct. The
counting/threading-pool claims I cited from memory were the ones
that needed re-verification.
2026-06-10 20:49:20 -04:00
ed 994ded3598 conductor(tracks): consolidate Phase 6+ chronology (3 recently completed + 4 in plan)
The Phase 6+ section had two duplicate '### Active' headers, which
made the chronology confusing. The user (paraphrased): preserve the
chronology of project progress, don't need full detail, follow the
previous restructure's lightweight pattern.

Changes:
- Add '### Recently Completed (2026-06-06 to 2026-06-10)' subsection
  containing the 3 closed tracks (startup_speedup, test_batching_refactor,
  test_infrastructure_hardening) with lightweight entries: per-phase
  commit SHAs only, 1-line summary, link to spec/plan/state folder.
  Trimmed the verbose per-sub-track commentary that was in the old
  startup_speedup entry (the per-sub-track bullets for warmup, status
  indicator, audit violations, post-shipping fixes are in the
  archive's spec/plan, not the tracks.md).
- Remove the duplicate '### Active' header.
- Update section intro to reflect '3 recently completed, 4 in plan'
  (was '2 already completed, 3 in plan').
- test_infrastructure_hardening entry now has phase commit SHAs
  (5df22fa8, 67d0211e, 006bb114, b8fcd9d6, 33d5cac, 7b87bbf5,
  84edb200, 719fe9a) instead of just the closing-report link.

Chronology is now visible at a glance; per-track full detail is
in the linked archive/ folder.
2026-06-10 20:42:00 -04:00
ed 3e0c7702ad docs(workspace_profiles+app_controller): fix 3 unverified claims surfaced by re-audit
Honest report: when re-verifying the 4 commits the user asked about
(d82153c0, f973fb27, 5aa19e59, 237f5725), I found 3 docs claims I
made WITHOUT actually reading the code:

1. f973fb27 guide_workspace_profiles.md activation step 4:
   Claimed 'App._apply_panel_states'. This method does not exist.
   Actual: App._apply_workspace_profile(profile) iterates
   profile.panel_states.items() and setattr on App. See
   src/gui_2.py:844-848.

2. 237f5725 guide_app_controller.md Manager objects paragraph:
   Claimed 'App._post_init at src/gui_2.py:3995'. Actual line: 492
   (off by ~3500 lines; the file was refactored during
   startup_speedup and many earlier-line methods were deleted).

3. 237f5725 guide_app_controller.md closing paragraph:
   Claimed 'AppController.__init__ at src/app_controller.py:778-836'.
   Actual range: 778-1212 (the method body is much longer than I
   assumed; the trailing 800-1212 is locks/io_pool/warmup/manager
   wiring). Note added to explain the long range.

Fixes the wrong claims with line numbers I re-verified via AST.

The structural claims (data structure fields, line numbers of
_validate_collection_dim, _init_vector_store, _LiveGuiHandle,
etc.) WERE all verified and are correct.
2026-06-10 20:40:14 -04:00
ed 144127009c update readme splash 2026-06-10 20:33:48 -04:00