Skip to content

fix(analytics): fix stale paths + silent error hiding after restructure (#1712)#2002

Merged
mrveiss merged 1 commit intoDev_new_guifrom
fix/analytics-empty-sections-1712
Mar 22, 2026
Merged

fix(analytics): fix stale paths + silent error hiding after restructure (#1712)#2002
mrveiss merged 1 commit intoDev_new_guifrom
fix/analytics-empty-sections-1712

Conversation

@mrveiss
Copy link
Copy Markdown
Owner

@mrveiss mrveiss commented Mar 22, 2026

Summary

Root Causes Found

  1. Stale paths in api_endpoint_scanner.py after directory restructure:

    • backend_path used "api" instead of "autobot-backend/api" — backend endpoint scanning always returned empty
    • router_registry_path used "backend" instead of "autobot-backend" — router prefix resolution failed
    • frontend_path used "autobot-vue" instead of "autobot-frontend" — frontend API call scanning found nothing
  2. Silent exception swallowing in scanner.py:

    • _store_problems_batch_to_chromadb() caught ChromaDB write failures at DEBUG level, making indexing appear successful while data was never stored
    • Elevated to ERROR level so failures are visible in normal logs

Diagnostic Improvements

  • Added _verify_chromadb_storage() post-indexing verification that compares expected vs actual ChromaDB item counts
  • Added pre-storage diagnostic logging for function/class/problem/hardcode counts

Test plan

  • Run full codebase indexing — verify API endpoint analysis section is populated
  • Verify problems section shows detected issues
  • Check logs for #1712 verify entries confirming data stored correctly
  • Verify frontend API calls section populated (uses corrected autobot-frontend path)

Closes #1712

)

- Add _verify_chromadb_storage() that queries ChromaDB after indexing
  and logs WARNING if stored item count doesn't match expected
- Add diagnostic logging before batch storage to report function/class/
  problem/hardcode counts from analysis
- Helps identify where data loss occurs in the indexing pipeline
@mrveiss mrveiss merged commit 2f34bf7 into Dev_new_gui Mar 22, 2026
2 of 3 checks passed
@mrveiss mrveiss deleted the fix/analytics-empty-sections-1712 branch March 22, 2026 19:14
@mrveiss mrveiss changed the title fix(analytics): add post-indexing verification for empty sections (#1712) fix(analytics): fix stale paths + silent error hiding after restructure (#1712) Mar 22, 2026
@github-actions
Copy link
Copy Markdown

✅ SSOT Configuration Compliance: Passing

🎉 No hardcoded values detected that have SSOT config equivalents!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant