2.7 KiB
2.7 KiB
Note
Status: Historical snapshot. Current refactor results and validated baseline are tracked in
CHANGELOG.md(updated 2026-04-07).
Post-Audit Fixes Implementation Plan (2026-02-13)
Objective
Address the insufficiencies identified in VLM_PROJECT_AUDIT_REPORT.md:
- Transactional Integrity: Introduce simple transaction logging for file operations.
- Deep State Integration: Ensure
vlm planrespects "ignored" files instate.json. - Performance Optimization: Use
ProcessPoolExecutorfor parallelffprobescanning. - Intelligence/Skill Updates: Add risk warnings and developer test recipes.
Tasks
T1: Transaction Logging & Atomic State Updates
- File:
src/vlm/transaction.py(New),src/vlm/executor.py - Action:
- Implement
TransactionLogto save operation "intents" totransaction.json. - Modify
ExecutionEngine.execute_planto write intents before start and mark completions. - Integrate
StateManagerto update file status toexecutedorquarantinedimmediately after the filesystem move.
- Implement
- Verification: Run execution and crash/interrupt it, verify
transaction.jsonstate.
T2: Deep State Integration in Planner
- File:
src/vlm/planner.py,src/vlm/commands/plan.py - Action:
- Update
generate_planto filter files based onstate.json. - If a file is marked as
ignored, the plan should generate ano-opwith reason "User marked as ignored in state".
- Update
- Verification: Mark a file as ignored using
vlm state, runvlm plan, checkplan.json.
T3: Scanner Performance Upgrade
- File:
src/vlm/scanner.py - Action:
- Replace
ThreadPoolExecutorwithProcessPoolExecutorinscan_library. - Ensure
_create_video_fileand its dependencies are picklable.
- Replace
- Verification: Run
vlm scanon a large library, verify metadata is still correctly extracted.
T4: Skill & Instruction Enhancements
- File:
skills/vlm-expert/SKILL.md,skills/vlm-library-workflow/SKILL.md - Action:
- Add Risk Warning: "If quarantine operations > 20% of total, require secondary confirmation."
- Add Developer Recipes: "How to run specific test suites for verification."
- Verification: Check if Agent mentions risk warnings in high-volume plans.
Execution Schedule
- [x] T2 (Planner integration) - Completed.
- [!] T3 (Scanner upgrade) - Attempted with ProcessPoolExecutor but deferred due to pickling issues in tests (mocks are not picklable). Reverted to ThreadPoolExecutor.
- [x] T1 (Transactional engine) - Completed. Integrated TransactionLog and StateManager into ExecutionEngine.
- [x] T4 (Skill updates) - Completed. Added risk warnings and developer recipes.