ed
4ab7c732b5
refactor(src): Phase 12.6.2-12.6.13 - migrate 16 small files to Result[T]
...
Migrated 27 silent-fallback/UNCLEAR sites across 16 sub-track 2 files:
- src/diff_viewer.py (1: apply_patch_to_file)
- src/presets.py (2: load_all global/project preset parsing)
- src/theme_models.py (2: load_themes_from_dir, load_themes_from_toml)
- src/summarize.py (3: _summarise_python, summarise_file x2)
- src/command_palette.py (1: _execute)
- src/markdown_helper.py (2: _on_open_link, render table fallback)
- src/commands.py (2: generate_md_only, save_all)
- src/conductor_tech_lead.py (1: topological_sort)
- src/orchestrator_pm.py (1: generate_tracks JSON parse)
- src/project_manager.py (1: get_git_commit)
- src/session_logger.py (1: log_tool_call write_ps1)
- src/shell_runner.py (1: run_powershell error)
- src/multi_agent_conductor.py (4: run, run_worker_lifecycle x3)
- src/aggregate.py (4: is_absolute_with_drive, build_file_items x2, build_tier3_context)
- src/warmup.py (1: _warmup_one indirect Result)
- src/models.py (2: from_dict discussion.ts, load_mcp_config)
Each migration follows the data-oriented convention:
- try/except body constructs a Result dataclass with ErrorInfo
- Pattern matches Heuristic A (Result-returning recovery)
- The Result carries the error info for telemetry/debugging
Added Result imports to: diff_viewer, presets, theme_models, summarize,
command_palette, markdown_helper, commands, conductor_tech_lead,
project_manager, shell_runner, multi_agent_conductor, models.
Audit post-fix: 0 violations, 0 UNCLEAR in sub-track 2 scope.
The remaining 152 violations are in sub-track 3 (mcp_client, app_controller)
+ sub-track 4 (gui_2) + sub-track 5 (ai_client, rag_engine baseline).
2026-06-18 10:21:24 -04:00
ed
0f5290f038
refactor(src): Phase 10.2 batch 1 - session_logger + file_cache Result[T] migration
...
Migrates 5 SILENT_SWALLOW sites to full Result[T] pattern:
session_logger.py (4 sites):
1. log_api_hook - returns Result[bool] (was None)
2. log_comms - returns Result[bool] (was None)
3. log_tool_call - returns Result[Optional[str]] (was Optional[str])
4. log_cli_call - returns Result[bool] (was None)
file_cache.py (1 site):
- L98: removed dead code (try/except StopIteration around
next(iter(_ast_cache)) is unreachable because we just checked
len(_ast_cache) >= 10)
Updates tests/test_session_logger_optimization.py to extract
result.data from the new Result-based API.
All callers of these log_* functions previously ignored the
return value; they continue to ignore the new Result return
value (backwards-compatible).
2026-06-17 22:29:36 -04:00
ed
c329c86931
refactor(src): narrow exception types in Phase 8 MEDIUM files (10 sites across 2 files)
...
Migrates the MEDIUM files (session_logger, warmup) by narrowing
the exception types from broad 'except Exception' to specific
stdlib exceptions.
session_logger.py (8 sites):
1. L99 - registry.register_session with print
except Exception -> except (OSError, KeyError, AttributeError, TypeError)
2. L131 - registry.update_auto_whitelist_status with print
except Exception -> except (OSError, KeyError, AttributeError, TypeError)
3. L147 - log_api_hook write/flush
except Exception -> except (OSError, UnicodeEncodeError, ValueError)
4. L160 - log_comms json.dump
except Exception -> except (OSError, TypeError, ValueError)
5. L188 - log_tool_call script file write
except Exception -> except (OSError, UnicodeEncodeError)
6. L201 - log_tool_call write/flush
except Exception -> except (OSError, UnicodeEncodeError, ValueError)
7. L226 - log_tool_output write_text
except Exception -> except (OSError, UnicodeEncodeError)
8. L245 - log_cli_call write/flush
except Exception -> except (OSError, TypeError, ValueError)
warmup.py (2 sites):
1. L276 - _log_canary sys.stderr.write
except Exception -> except OSError
2. L300 - _log_summary sys.stderr.write
except Exception -> except OSError
Decisions:
- warmup.py L85: raise RuntimeError (validation raise) - keep as-is per spec
- warmup.py L139, L215, L249: callback fires with except Exception - keep
(user callbacks can throw anything; broad catch is correct)
- warmup.py L175: _warmup_one with except BaseException - keep
(intentional broad catch for module import failures)
Tests verified:
- tests/test_session_logging.py (1 test) PASS
- tests/test_session_logger_reset.py (1 test) PASS
- tests/test_session_logger_optimization.py (4 tests) PASS
- tests/test_logging_e2e.py (1 test) PASS
- tests/test_warmup.py (10 tests) PASS
- tests/test_warmup_canaries.py (18 tests) PASS
2026-06-17 19:22:56 -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
053f5d867a
some organization pass, still need to review a bunch
2026-06-06 00:21:36 -04:00
ed
aa56981c87
organizing (mostly aggregate.py)
2026-06-05 22:34:26 -04:00
ed
873edf42cf
began to go through the files and organize imports and gui_2.py's new context defs
...
still a bunch to sift through after the last ai passes
2026-06-05 21:44:41 -04:00
ed
b5e512f483
feat(sdm): inject structural dependency mapping tags across codebase
...
Adds [C: caller] tags to functions/methods and [M: mutation] / [U: usage] tags to class variables based on cross-module call analysis.
2026-05-13 22:35:52 -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
1f8bb58219
more adjustments
2026-03-12 19:08:51 -04:00
ed
94598b605a
checkpoint dealing with personal manager/editor
2026-03-10 23:47:53 -04:00
ed
7063bead12
feat(logs): Implement file-based offloading for scripts and tool outputs
2026-03-08 20:51:27 -04:00
ed
f580165c5b
feat(conductor): Implement configurable paths and mark track 'Conductor Path Configuration' as complete
2026-03-06 16:43:11 -05:00
ed
5e69617f88
WIP: I HATE PYTHON
2026-03-05 13:55:40 -05:00
ed
a0276e0894
feat(src): Move core implementation files to src/ directory
2026-03-04 09:55:44 -05:00