diff --git a/conductor/tracks/result_migration_small_files_20260617/metadata.json b/conductor/tracks/result_migration_small_files_20260617/metadata.json new file mode 100644 index 00000000..1fa88ab6 --- /dev/null +++ b/conductor/tracks/result_migration_small_files_20260617/metadata.json @@ -0,0 +1,103 @@ +{ + "id": "result_migration_small_files_20260617", + "title": "Result Migration Sub-Track 2 (Small Files + Audit-Script Bug Fixes)", + "type": "refactor + audit-script maintenance", + "status": "active", + "priority": "A", + "created": "2026-06-17", + "owner": "tier2-tech-lead", + "parent_umbrella": "result_migration_20260616", + "sub_track_of_5": 2, + "spec": "conductor/tracks/result_migration_small_files_20260617/spec.md", + "plan": "conductor/tracks/result_migration_small_files_20260617/plan.md", + "scope": { + "files_affected": 38, + "files_audit_script": 1, + "files_migrated": 37, + "small_files": 35, + "medium_files": 2, + "sites_to_migrate": 76, + "violation_sites": 62, + "suspicious_sites": 10, + "unclear_sites": 4, + "unclear_sites_outside_review_scope": 4, + "audit_script_lines_changed": "~60 (3 bug fixes; one per commit)", + "audit_script_heuristics_added": "0-2 (conditional on the 4 UNCLEAR patterns)", + "report_lines": "~200-300 (per-site decisions for 4 UNCLEAR + per-file summary + audit-script fix summary)" + }, + "depends_on": [ + "result_migration_20260616 (umbrella)", + "result_migration_review_pass_20260617 (shipped 2026-06-17; provides the per-site decisions and the 3 audit-script bug documentation)" + ], + "blocks": [ + "result_migration_app_controller_ (the controller migration depends on the audit being correct; sub-track 2 fixes the 3 audit bugs)", + "result_migration_gui_2_ (the GUI migration depends on the controller; transitively depends on the audit fixes)" + ], + "tshirt_size": "L", + "test_summary": { + "new_tests": "9-12 (6-9 for the 3 audit-script bug fixes + 0-3 for any new heuristics + N for the migrations)", + "modified_tests": 0, + "test_pass_count_target": "1288 + 4 + 10 (review-pass tests) + 9-12 (audit bug fix tests) + N (migration tests) = 1311 + N" + }, + "verification_criteria": [ + "scripts/audit_exception_handling.py has the 3 documented bugs fixed (visit_Try walker, render_json filter, render_json truncation)", + "Re-running the audit post-Phase-1: src/rag_engine.py:31 is in the findings; per-file list is complete; per-file list is not truncated to top 15", + "The 4 UNCLEAR sites in SMALL files are classified (compliant or migration-target); decisions recorded in the report", + "All 37 files (35 SMALL + 2 MEDIUM) are migrated to the convention", + "Re-running the audit post-Phase-9: 0 migration-target sites in the 37-file scope", + "Full test pass count: all 11 test tiers PASS", + "Atomic commits per batch: spec, plan, metadata, state, 3 audit-script fix commits, 4 UNCLEAR classification commits, 35 SMALL migration commits (5-7 files per commit), 2 MEDIUM migration commits, completion commits" + ], + "out_of_scope": [ + "Migrating the 3 BASELINE files (mcp_client, ai_client, rag_engine) - sub-track 5", + "Migrating src/gui_2.py or src/app_controller.py - sub-tracks 4 and 3", + "The send_result -> send mass rename - separate work after this phase", + "Refactoring the audit script's overall architecture - Phase 1 fixes 3 specific bugs only", + "Adding new Result patterns to areas that don't have any - this track migrates EXISTING sites only" + ], + "risks": [ + { + "id": "R1", + "description": "Fixing visit_Try surfaces new migration-target sites in the 37 files (raises in non-last except handlers)", + "mitigation": "Phase 1 verification (Task 1.4.1) counts the new findings; per-batch scope adjusts" + }, + { + "id": "R2", + "description": "The 4 UNCLEAR sites turn out to be non-trivial migrations (>5 lines each)", + "mitigation": "Phase 2 classifies first; if any are >10 lines, they get their own commit in Phase 7" + }, + { + "id": "R3", + "description": "Audit-script fixes introduce regressions in the 10 existing heuristic tests", + "mitigation": "TDD workflow; each fix is verified in isolation before the next" + }, + { + "id": "R4", + "description": "Migration breaks behavior in a way the test suite doesn't catch", + "mitigation": "Task 9.2 catches regressions; for non-tier-tested files, manual smoke-testing is added" + }, + { + "id": "R5", + "description": "Batched-commit pattern (5-7 files per commit) is too coarse for some files", + "mitigation": "Batch plan can be adjusted per-file; umbrella spec is guidance, not rigid" + }, + { + "id": "R6", + "description": "The MEDIUM files (session_logger, warmup) have complex migrations that don't fit the Result pattern", + "mitigation": "Per the styleguide, some sites are legitimately BOUNDARY_*; those stay as-is; decision is documented" + } + ], + "estimated_effort": { + "method": "Scope + T-shirt size (per conductor/workflow.md section Tier 1 Track Initialization Rules). NO day estimates. The user / Tier 2 agent decides the actual pacing.", + "scope": "37 files (35 SMALL + 2 MEDIUM); 76 sites; 3 audit-script bug fixes; ~200-300 lines of report", + "tshirt_size": "L" + }, + "deferred_to_followup_tracks": [ + { + "id": "result_migration_subsequent_subtracks", + "title": "Result Migration Sub-Tracks 3-5", + "description": "After this sub-track ships, sub-tracks 3 (app_controller), 4 (gui_2), and 5 (baseline_cleanup) pick up the migration work. Sub-track 3 and 4 depend on the audit being correct (Phase 1 of this sub-track fixes the 3 bugs).", + "track_status": "blocked by this sub-track" + } + ] +} diff --git a/conductor/tracks/result_migration_small_files_20260617/state.toml b/conductor/tracks/result_migration_small_files_20260617/state.toml new file mode 100644 index 00000000..9b2bb4fa --- /dev/null +++ b/conductor/tracks/result_migration_small_files_20260617/state.toml @@ -0,0 +1,141 @@ +# Track state for result_migration_small_files_20260617 +# Updated by Tier 2 Tech Lead as tasks complete + +[meta] +track_id = "result_migration_small_files_20260617" +name = "Result Migration Sub-Track 2 (Small Files + Audit-Script Bug Fixes)" +status = "active" +current_phase = 0 # 0 = pre-Phase 1; 1..N = in Phase N; "complete" if all phases done +last_updated = "2026-06-17" + +[parent] +umbrella = "result_migration_20260616" +sub_track_of_5 = 2 + +[blocked_by] +result_migration_20260616 = "umbrella specced" +result_migration_review_pass_20260617 = "shipped 2026-06-17; provides the per-site decisions and the 3 audit-script bug documentation" + +[blocks] +# Sub-tracks 3-4 depend on the audit being correct (Phase 1 of this sub-track fixes the 3 bugs) +result_migration_app_controller = "blocked; needs the audit bug fixes" +result_migration_gui_2 = "blocked; needs the audit bug fixes (transitively via app_controller)" + +[phases] +phase_1 = { status = "pending", checkpointsha = "", name = "Audit-Script Bug Fixes (3 bugs, TDD)" } +phase_2 = { status = "pending", checkpointsha = "", name = "Classify 4 UNCLEAR Sites in SMALL" } +phase_3 = { status = "pending", checkpointsha = "", name = "Migrate Phase 3 Batch: Logging + Tracking (7 files)" } +phase_4 = { status = "pending", checkpointsha = "", name = "Migrate Phase 4 Batch: Config + Preset (6 files)" } +phase_5 = { status = "pending", checkpointsha = "", name = "Migrate Phase 5 Batch: UI + Theme + Tooling (7 files)" } +phase_6 = { status = "pending", checkpointsha = "", name = "Migrate Phase 6 Batch: Provider + Adapter + Orchestration (7 files)" } +phase_7 = { status = "pending", checkpointsha = "", name = "Migrate Phase 7 Batch: Infrastructure + Hook + Utility (8 files)" } +phase_8 = { status = "pending", checkpointsha = "", name = "Migrate MEDIUM files (session_logger, warmup)" } +phase_9 = { status = "pending", checkpointsha = "", name = "Verification (audit re-run + test pass count + report + completion)" } + +[tasks] +# Phase 1: Audit-Script Bug Fixes +t1_1_1 = { status = "pending", commit_sha = "", description = "Write failing test for visit_Try walker bug" } +t1_1_2 = { status = "pending", commit_sha = "", description = "Fix visit_Try walker (scripts/audit_exception_handling.py:759-784)" } +t1_1_3 = { status = "pending", commit_sha = "", description = "Verify visit_Try fix doesn't break existing tests" } +t1_2_1 = { status = "pending", commit_sha = "", description = "Write failing test for render_json compliant-finding filter" } +t1_2_2 = { status = "pending", commit_sha = "", description = "Fix render_json filter (scripts/audit_exception_handling.py:884, 889, 958)" } +t1_2_3 = { status = "pending", commit_sha = "", description = "Verify render_json filter fix doesn't break existing tests" } +t1_3_1 = { status = "pending", commit_sha = "", description = "Write failing test for render_json no-truncation behavior" } +t1_3_2 = { status = "pending", commit_sha = "", description = "Fix render_json truncation (scripts/audit_exception_handling.py:958, 1058)" } +t1_3_3 = { status = "pending", commit_sha = "", description = "Verify render_json truncation fix doesn't break existing tests" } +t1_4_1 = { status = "pending", commit_sha = "", description = "Run full audit post-Phase-1; verify all 3 bug fixes" } +t1_4_2 = { status = "pending", commit_sha = "", description = "Run full test suite post-Phase-1" } + +# Phase 2: Classify 4 UNCLEAR Sites +t2_1_1 = { status = "pending", commit_sha = "", description = "Classify src/outline_tool.py UNCLEAR site" } +t2_1_2 = { status = "pending", commit_sha = "", description = "Classify src/summarize.py UNCLEAR site" } +t2_1_3 = { status = "pending", commit_sha = "", description = "Classify src/conductor_tech_lead.py UNCLEAR site" } +t2_1_4 = { status = "pending", commit_sha = "", description = "Classify src/openai_compatible.py UNCLEAR site" } +t2_1_5 = { status = "pending", commit_sha = "", description = "Update audit heuristics if patterns emerge (conditional)" } + +# Phase 3: Logging + Tracking batch +t3_1 = { status = "pending", commit_sha = "", description = "Migrate src/summary_cache.py (4 sites)" } +t3_2 = { status = "pending", commit_sha = "", description = "Audit decision: src/log_pruner.py (2 compliant; 0 migration)" } +t3_3 = { status = "pending", commit_sha = "", description = "Migrate src/log_registry.py (2 sites)" } +t3_4 = { status = "pending", commit_sha = "", description = "Audit decision: src/performance_monitor.py (1 compliant; 0 migration)" } +t3_5 = { status = "pending", commit_sha = "", description = "Migrate src/startup_profiler.py (1 site)" } +t3_6 = { status = "pending", commit_sha = "", description = "Migrate src/project_manager.py (5 sites)" } +t3_7 = { status = "pending", commit_sha = "", description = "Audit decision: src/paths.py (3 compliant; 0 migration)" } + +# Phase 4: Config + Preset batch +t4_1 = { status = "pending", commit_sha = "", description = "Migrate src/presets.py (2 sites)" } +t4_2 = { status = "pending", commit_sha = "", description = "Audit decision: src/personas.py (3 compliant; 0 migration)" } +t4_3 = { status = "pending", commit_sha = "", description = "Audit decision: src/tool_presets.py (3 compliant; 0 migration)" } +t4_4 = { status = "pending", commit_sha = "", description = "Migrate src/context_presets.py (1 site)" } +t4_5 = { status = "pending", commit_sha = "", description = "Migrate src/vendor_capabilities.py (1 site)" } +t4_6 = { status = "pending", commit_sha = "", description = "Audit decision: src/workspace_manager.py (3 compliant; 0 migration)" } + +# Phase 5: UI + Theme + Tooling batch +t5_1 = { status = "pending", commit_sha = "", description = "Migrate src/command_palette.py (1 site)" } +t5_2 = { status = "pending", commit_sha = "", description = "Migrate src/commands.py (3 sites)" } +t5_3 = { status = "pending", commit_sha = "", description = "Migrate src/diff_viewer.py (1 site)" } +t5_4 = { status = "pending", commit_sha = "", description = "Migrate src/external_editor.py (3 sites, 2 OPTIONAL_RETURN)" } +t5_5 = { status = "pending", commit_sha = "", description = "Migrate src/theme_2.py (1 site)" } +t5_6 = { status = "pending", commit_sha = "", description = "Migrate src/theme_models.py (1 migration + 9 compliant)" } +t5_7 = { status = "pending", commit_sha = "", description = "Migrate src/markdown_helper.py (2 sites)" } + +# Phase 6: Provider + Adapter + Orchestration batch +t6_1 = { status = "pending", commit_sha = "", description = "Migrate src/gemini_cli_adapter.py (2 sites)" } +t6_2 = { status = "pending", commit_sha = "", description = "Migrate src/openai_compatible.py (1 UNCLEAR from Phase 2)" } +t6_3 = { status = "pending", commit_sha = "", description = "Migrate src/aggregate.py (4 sites)" } +t6_4 = { status = "pending", commit_sha = "", description = "Migrate src/conductor_tech_lead.py (1 UNCLEAR from Phase 2)" } +t6_5 = { status = "pending", commit_sha = "", description = "Migrate src/dag_engine.py (1 site)" } +t6_6 = { status = "pending", commit_sha = "", description = "Migrate src/multi_agent_conductor.py (4 sites)" } +t6_7 = { status = "pending", commit_sha = "", description = "Migrate src/models.py (3 sites; 2 compliant stay as-is)" } + +# Phase 7: Infrastructure + Hook + Utility batch +t7_1 = { status = "pending", commit_sha = "", description = "Migrate src/api_hook_client.py (2 sites)" } +t7_2 = { status = "pending", commit_sha = "", description = "Migrate src/api_hooks.py (5 sites)" } +t7_3 = { status = "pending", commit_sha = "", description = "Migrate src/file_cache.py (2 sites)" } +t7_4 = { status = "pending", commit_sha = "", description = "Migrate src/hot_reloader.py (1 site)" } +t7_5 = { status = "pending", commit_sha = "", description = "Migrate src/orchestrator_pm.py (2 sites)" } +t7_6 = { status = "pending", commit_sha = "", description = "Migrate src/outline_tool.py (3 sites, includes 1 UNCLEAR from Phase 2)" } +t7_7 = { status = "pending", commit_sha = "", description = "Migrate src/shell_runner.py (2 sites)" } +t7_8 = { status = "pending", commit_sha = "", description = "Migrate src/summarize.py (2 sites, includes 1 UNCLEAR from Phase 2)" } + +# Phase 8: MEDIUM files +t8_1 = { status = "pending", commit_sha = "", description = "Migrate src/session_logger.py (8 sites)" } +t8_2 = { status = "pending", commit_sha = "", description = "Migrate src/warmup.py (6 sites; L85 validation raise stays as-is)" } + +# Phase 9: Verification +t9_1 = { status = "pending", commit_sha = "", description = "Run audit post-migration; verify 0 migration-target sites in 37-file scope" } +t9_2 = { status = "pending", commit_sha = "", description = "Run full test suite; verify all 11 tiers PASS" } +t9_3 = { status = "pending", commit_sha = "", description = "Write docs/reports/RESULT_MIGRATION_SMALL_FILES_20260617.md" } +t9_4 = { status = "pending", commit_sha = "", description = "Update umbrella spec (result_migration_20260616) with sub-track 2 shipped" } +t9_5 = { status = "pending", commit_sha = "", description = "Mark the track as completed (metadata + state + tracks.md)" } +t9_6 = { status = "pending", commit_sha = "", description = "Write docs/reports/TRACK_COMPLETION_result_migration_small_files_20260617.md" } + +[verification] +phase_1_audit_fixes_complete = false +phase_2_unclear_classification_complete = false +phase_3_logging_batch_complete = false +phase_4_config_batch_complete = false +phase_5_ui_batch_complete = false +phase_6_provider_batch_complete = false +phase_7_infra_batch_complete = false +phase_8_medium_files_complete = false +phase_9_verification_complete = false +report_exists = false +umbrella_spec_updated = false +audit_post_migration_zero_migration_target = false +test_pass_count_unchanged = false +metadata_json_status_completed = false + +[scope_metrics] +files_target = 37 +files_migrated = 0 +files_audit_decision_only = 0 +sites_target = 76 +sites_migrated = 0 +sites_compliant_no_migration = 0 +unclear_sites_target = 4 +unclear_sites_compliant = 0 +unclear_sites_migration_target = 0 +audit_bugs_fixed = 0 +audit_heuristics_added = 0 +new_tests_added = 0