Last Updated: 2026-04-16
Status: 🚧 In Progress
- ✅ Added 8 tests for RAG quality warning logic in
test_pattern_fix_logic.py - ✅ Tests warning when answer ≥ 0.90 but RAG metrics < 0.7
- ✅ All 28 pattern fix logic tests passing
- ✅ All 33 ticket evaluation tests passing
- ✅ Special evaluation for tickets without
expected_urls - ✅ Uses
answer_correctness >= 0.90directly (not composite score) - ✅ Skip tag for passing no-doc tickets
- ✅ HIGH priority flag for failing no-doc tickets
- ✅ Added
restart_okp_mcp()after branch creation - ✅ Fixed
run_retrieval_optimization()to callfast_retrieval_loop() - ✅ Ensures code changes take effect in running container
- ✅ Skip retrieval optimization when
ticket_id = None - ✅ Graceful handling with informative message
- ✅ Pattern fix loop no longer crashes in full-pattern mode
Error encountered:
TypeError: OkpMcpAgent.fast_retrieval_loop() missing 2 required positional arguments: 'query' and 'expected_urls'
Status: ✅ FIXED - Added graceful skip for full-pattern mode
Issue: Full-pattern mode sets ticket_id = None, but retrieval optimization needs query/expected_urls
Solution Applied: Skip retrieval optimization in full-pattern mode with informative message
-
High Variance Detected
⚠️ INTERMITTENT ISSUE DETECTED - High variance in: • custom:answer_correctness (std=0.246) • ragas:faithfulness (std=0.379)- Problem is NOT consistent across runs
- May be temporal validity issue
- Could be flaky evaluation
-
"NO EXPECTED URLS FOUND IN CONFIG"
- Coming from
okp_mcp_agent.py:3363 - Different from no-doc ticket handling
- Triggers when
expected_responseexists butexpected_urlsis empty - May indicate config issue or pattern YAML problem
- Coming from
-
Documentation Gap vs No-Doc Confusion
- Need to clarify distinction:
- No-doc ticket: Turn has NO
expected_urlsfield (intentional, no docs exist) - Documentation gap: YAML has
expected_urlsbut Solr returns 0 docs (missing from index)
- No-doc ticket: Turn has NO
- Need to clarify distinction:
-
Test the full-pattern mode fix
- Run
./runners/fix.sh BOOTLOADER_GRUB_ISSUESagain - Verify it skips retrieval optimization gracefully
- Check if it completes without errors
- Run
-
Investigate the "NO EXPECTED URLS" message
- Check if BOOTLOADER_GRUB_ISSUES tickets actually have
expected_urls - Determine if this is a real gap or config issue
- May need to run in single-ticket mode instead
- Check if BOOTLOADER_GRUB_ISSUES tickets actually have
-
Handle high variance
- Review stability assessment logic
- Consider if 3 runs is sufficient
- May need to flag for manual review vs auto-fix
-
Get first successful pattern fix
- Pick a single ticket with clear retrieval issue
- Run in single-ticket mode (not full-pattern)
- Verify container restart → code change → improvement cycle
-
Validate the fix loop end-to-end
- Baseline → Optimization → Validation → Commit
- Ensure git branches work correctly
- Verify diagnostics are saved
-
Test on 5-10 tickets
- Build confidence in the system
- Identify edge cases
- Collect iteration history data
- Pattern database (see
research/MOE_PATTERN_DATABASE.md)- Implement after fix loop is stable
- Need 20-30 successful fixes to build patterns
- Benchmark different expert architectures
src/heal/core/ticket_evaluation.py # Added is_no_doc handling
tests/test_ticket_evaluation.py # Tests for ticket evaluation
tests/test_pattern_fix_logic.py # 28 tests including RAG warnings
src/heal/runners/run_pattern_fix_poc.py # Fixed full-pattern mode
src/heal/core/fix_pattern_database.py # Created (for future use)
docs/PATTERN_DATABASE_INTEGRATION.md # Integration guide
research/MOE_PATTERN_DATABASE.md # Research idea captured
.gitignore # Added research/
- ✅ 28/28 tests in
test_pattern_fix_logic.py - ✅ 33/33 tests in
test_ticket_evaluation.py - ✅ 149/150 overall tests (1 pre-existing failure unrelated to our changes)
- ✅ Linting clean
- ✅ Code formatted
- Full-pattern mode skips retrieval optimization - Can't optimize multiple tickets at once
- No-doc tickets use direct answer_correctness >= 0.90 - Not penalized for missing context metrics
- Research ideas moved to private
research/directory - Stay focused on core fixes - Pattern database deferred to after fix loop works - Don't over-engineer before validating basics
-
What's the right approach for full-pattern mode?
- Option A: Skip optimization, just test
- Option B: Iterate through tickets individually
- Option C: Only support single-ticket mode
-
How to handle high variance in metrics?
- Increase stability runs (3 → 5)?
- Flag for manual review?
- Accept variance and work with averages?
-
Should we focus on single-ticket mode first?
- Simpler, fewer edge cases
- Can validate the core loop
- Add full-pattern mode later
Focus: Get ONE ticket fixed end-to-end. Everything else is secondary.