mirror of
https://github.com/coleam00/Archon.git
synced 2025-12-24 02:39:17 -05:00
debug: add comprehensive logging to diagnose URL resolution issue
Add detailed logging to see: - Raw source record from database - Extracted source_metadata - URL resolution process This will help identify why original_url exists in UI metadata but isn't being used in the transformation logic. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -352,6 +352,9 @@ class KnowledgeItemService:
|
||||
"""
|
||||
source_metadata = source.get("metadata", {})
|
||||
source_id = source["source_id"]
|
||||
|
||||
# Debug: log the raw source record to see what we're getting from the database
|
||||
safe_logfire_info(f"Raw source record for {source_id}: {source}")
|
||||
|
||||
# Get first page URL
|
||||
first_page_url = await self._get_first_page_url(source_id)
|
||||
@@ -362,8 +365,9 @@ class KnowledgeItemService:
|
||||
# Get code examples
|
||||
code_examples = await self._get_code_examples(source_id)
|
||||
|
||||
# Log URL resolution for debugging
|
||||
# Log URL resolution for debugging - include full metadata for debugging
|
||||
original_url = source_metadata.get("original_url")
|
||||
safe_logfire_info(f"URL resolution for {source_id}: source_metadata={source_metadata}")
|
||||
safe_logfire_info(f"URL resolution for {source_id}: original_url={original_url}, first_page_url={first_page_url}")
|
||||
|
||||
# More robust URL resolution with fallback chain
|
||||
|
||||
Reference in New Issue
Block a user