Last Updated: 2026-01-11
Status: 2/10 Complete
| Priority | PR # | Title | Status | Owner | Completion Date |
|---|---|---|---|---|---|
| P0 🔴 | #1 | Fix Plotting Crash | ✅ DONE | AI Agent | 2026-01-11 |
| P0 🔴 | #2 | Add Yahoo Integration Test | ✅ DONE | AI Agent | 2026-01-11 |
| P1 🟠 | #3 | Remove Dead Cache Code | ⏳ TODO | - | - |
| P1 🟠 | #4 | Add Cache Corruption Handling | ⏳ TODO | - | - |
| P1 🟠 | #5 | Improve Crumb Mechanism | ⏳ TODO | - | - |
| P2 🟡 | #6 | Add Session Reuse | ⏳ TODO | - | - |
| P2 🟡 | #7 | Vectorize V2 Signal | ⏳ TODO | - | - |
| P2 🟡 | #8 | Add Smoke Test | ⏳ TODO | - | - |
| P3 🟢 | #9 | Unify Plotting API | ⏳ TODO | - | - |
| P3 🟢 | #10 | Add Edge Case Tests | ⏳ TODO | - | - |
Legend:
⏳ TODO | 🚧 IN PROGRESS | ✅ DONE | ❌ BLOCKED
-
Status: ✅ DONE
-
Actual Time: 1 hour
-
Completed: 2026-01-11
-
Dependencies: None
-
Risk: LOW
-
Files Modified:
src/plotting.py- Added Series/str dual input supporttests/test_plotting.py- Created 7 comprehensive testsscripts/test_plotting.py- Enhanced to test both modesscripts/pr1_synthetic_demo.py- New end-to-end verification
-
Acceptance: ✅ All 46 tests pass (pytest tests/ -v)
-
Notes:
Implemented Option A from PHASE3_PLAN.md: - Updated plot_equity_curve() to accept pd.Series | str - Renamed parameters to match calling code (output_file vs out_path) - Added isinstance() type checking - Created comprehensive test suite (7 tests) - Verified backward compatibility (CSV path still works) - Created synthetic demo for network-independent testing Commit: de00c91 "fix: accept Series or str in plot_equity_curve()" Test Guide: TESTING_PR1.md
-
Status: ✅ DONE
-
Actual Time: 1 hour
-
Completed: 2026-01-11
-
Dependencies: None
-
Risk: LOW
-
Files Modified:
tests/test_yahoo.py- Added TestYahooIntegration class with 3 tests
-
Tests Added: 3 new integration tests (49 total now)
-
Acceptance: ✅ All tests pass, 100% offline
-
Notes:
Added 3 comprehensive integration tests: 1. test_fetch_yahoo_data_full_flow - Full flow with mocked network 2. test_fetch_yahoo_data_incremental_update - Cache merge testing 3. test_fetch_yahoo_data_with_cache_disabled - Cache bypass testing All tests use mocked urlopen calls - no real network requests. Validates cache strategy works correctly to minimize 429 errors. Test Guide: TESTING_PR2.md -
Files:
tests/test_yahoo.py -
Acceptance:
pytest tests/test_yahoo.py::TestYahooIntegration -vpasses offline -
Notes:
[Agent work notes here]
- Status: ⏳ TODO
- Estimated Time: 1 hour
- Dependencies: PR #2 (to ensure coverage)
- Risk: LOW
- Files:
src/yahoo.py,tests/test_yahoo.py - Acceptance:
grep -r "_load_from_cache" src/ tests/returns empty - Notes:
[Agent work notes here]
- Status: ⏳ TODO
- Estimated Time: 1 hour
- Dependencies: PR #3 (clean code first)
- Risk: LOW
- Files:
src/yahoo.py - Acceptance: Corrupt cache triggers warning and recovery
- Notes:
[Agent work notes here]
- Status: ⏳ TODO
- Estimated Time: 2 hours
- Dependencies: PR #2 (need integration tests)
- Risk: MEDIUM
- Files:
src/yahoo.py - Acceptance: 10/10 successful fetches in loop
- Notes:
[Agent work notes here]
- Status: ⏳ TODO
- Estimated Time: 2 hours
- Dependencies: PR #5 (need stable fetch first)
- Risk: MEDIUM
- Files:
src/yahoo.py,scripts/demo_latest.py - Acceptance: Single TCP connection for ES+SPY fetch
- Notes:
[Agent work notes here]
- Status: ⏳ TODO
- Estimated Time: 2 hours
- Dependencies: None (independent)
- Risk: LOW
- Files:
src/signal.py,tests/test_signal.py - Acceptance: 10k bars complete <1 sec, matches old implementation
- Notes:
[Agent work notes here]
- Status: ⏳ TODO
- Estimated Time: 1 hour
- Dependencies: PR #1 (need working demo)
- Risk: LOW
- Files:
tests/test_integration.py(new) - Acceptance: Mocked demo runs <5 sec offline
- Notes:
[Agent work notes here]
- Status: ⏳ TODO
- Estimated Time: 1 hour
- Dependencies: PR #1 (builds on fix)
- Risk: LOW
- Files:
src/plotting.py - Acceptance: Both
plot_equity_curve(Series)andplot_equity_curve(csv_path)work - Notes:
[Agent work notes here]
- Status: ⏳ TODO
- Estimated Time: 2 hours
- Dependencies: None (independent)
- Risk: LOW
- Files:
tests/test_signal.py - Acceptance: 8 edge case tests pass
- Notes:
[Agent work notes here]
Before marking Phase 3 as COMPLETE:
- All 10 PRs have status ✅ DONE
- Full test suite passes:
pytest tests/ -v - Demo runs successfully:
python scripts/demo_latest.py --lookback 365 - No dead code remains:
grep -r "TODO\|FIXME\|XXX" src/ - All plots generate:
ls results/*.png - Cache system works:
ls data/*_persistent.csv - Documentation updated: AI_CONTEXT.md reflects current state
- No flaky tests: Run test suite 5x, all pass
- Code review complete: No AI slop, clean, professional
Agent: Initial
Tasks:
- ✅ Audited entire codebase vs documentation
- ✅ Identified 10 critical issues
- ✅ Created Phase 3 execution plan
- ✅ Prepared agent task templates
- ✅ Updated AI_CONTEXT.md with accurate info
Findings:
- Plotting completely broken (signature mismatch)
- No end-to-end integration tests
- ~60 lines of dead cache code
- V2 signal 10-100x slower than necessary
- No error handling for corrupt caches
Next Steps:
- Execute PR #1 (Fix Plotting) - CRITICAL for demo
- Execute PR #2 (Integration Tests) - Foundation for testing
Agent: [Name/ID]
Date: [YYYY-MM-DD]
Tasks:
- Task 1
- Task 2
Issues Encountered:
[Details]
Resolution:
[How resolved]
- ❌ Demo crashes at plotting step
⚠️ 0 integration tests with mocked network⚠️ ~60 lines of dead code (25% of yahoo.py)⚠️ V2 signal: 2.5 seconds for 1000 bars⚠️ No cache corruption handling⚠️ 2 HTTP connections per ticker fetch
- ✅ Demo runs end-to-end without errors
- ✅ 100% offline testability
- ✅ 0 lines of dead code
- ✅ V2 signal: <0.1 seconds for 1000 bars
- ✅ Robust cache error handling with logging
- ✅ 1 HTTP connection per demo run (session reuse)
[Add notes here as work progresses]
Example:
- PR #1: Chose Option A (update plotting.py) because it's more flexible
- PR #3: Found additional dead code in _get_cache_dir(), removed it too
- PR #7: Vectorized version 50x faster, not just 10x as estimated