# Import Ground Truth for ContextCraft
#
# Hand-traced map of internal imports across the codebase.
# Format: source_file -> target_file : imported_names : edge_type : confidence
#
# This file is the expected output of resolver.py when run against
# ContextCraft's own indexed codebase. Used by tests/test_graph.py.
#
# Generated by manually reading every `from contextcraft.*` import line.
# Date: 2026-05-17

# ─── config.py ───────────────────────────────────────────────────────
# No internal imports (only pydantic_settings)

# ─── models.py ───────────────────────────────────────────────────────
# No internal imports (only stdlib + pydantic)

# ─── db/connection.py ────────────────────────────────────────────────
db/connection.py -> config.py : settings : imports : 1.0

# ─── db/chunks_repo.py ──────────────────────────────────────────────
db/chunks_repo.py -> db/connection.py : get_pool : imports : 1.0
db/chunks_repo.py -> models.py : ChunkType,CodeChunk,CommitInfo,Language,Repository : imports : 1.0

# ─── embeddings/base.py ─────────────────────────────────────────────
# No internal imports (only abc)

# ─── embeddings/openai.py ───────────────────────────────────────────
embeddings/openai.py -> config.py : settings : imports : 1.0
embeddings/openai.py -> embeddings/base.py : BaseEmbedder : imports : 1.0
# inherits: OpenAIEmbedder(BaseEmbedder)
embeddings/openai.py -> embeddings/base.py : BaseEmbedder : inherits : 1.0

# ─── embeddings/ollama.py ───────────────────────────────────────────
embeddings/ollama.py -> embeddings/base.py : BaseEmbedder : imports : 1.0
# inherits: OllamaEmbedder(BaseEmbedder)
embeddings/ollama.py -> embeddings/base.py : BaseEmbedder : inherits : 1.0

# ─── git/blame.py ───────────────────────────────────────────────────
# No internal imports (only stdlib)

# ─── git/history.py ─────────────────────────────────────────────────
git/history.py -> models.py : CommitInfo : imports : 1.0

# ─── llm/base.py ────────────────────────────────────────────────────
# No internal imports (only abc + collections.abc)

# ─── llm/openai.py ──────────────────────────────────────────────────
llm/openai.py -> config.py : settings : imports : 1.0
llm/openai.py -> llm/base.py : BaseLLM : imports : 1.0
# inherits: OpenAILLM(BaseLLM)
llm/openai.py -> llm/base.py : BaseLLM : inherits : 1.0

# ─── llm/anthropic.py ───────────────────────────────────────────────
llm/anthropic.py -> config.py : settings : imports : 1.0
llm/anthropic.py -> llm/base.py : BaseLLM : imports : 1.0
# inherits: AnthropicLLM(BaseLLM)
llm/anthropic.py -> llm/base.py : BaseLLM : inherits : 1.0

# ─── parser/ast_parser.py ───────────────────────────────────────────
parser/ast_parser.py -> models.py : EXTENSION_LANGUAGE_MAP,LANGUAGE_GRAMMAR_MAP,ChunkType,CodeChunk,Language : imports : 1.0

# ─── reranker/base.py ───────────────────────────────────────────────
reranker/base.py -> models.py : SearchResult : imports : 1.0

# ─── reranker/cohere.py ─────────────────────────────────────────────
reranker/cohere.py -> config.py : settings : imports : 1.0
reranker/cohere.py -> models.py : SearchResult : imports : 1.0
reranker/cohere.py -> reranker/base.py : BaseReranker : imports : 1.0
# inherits: CohereReranker(BaseReranker)
reranker/cohere.py -> reranker/base.py : BaseReranker : inherits : 1.0

# ─── reranker/__init__.py (re-exports) ──────────────────────────────
# These are re-exports — anyone importing from contextcraft.reranker
# gets routed to the actual module. Confidence=0.5 for re-export edges.
reranker/__init__.py -> reranker/base.py : BaseReranker : imports : 0.5
reranker/__init__.py -> reranker/cohere.py : CohereReranker : imports : 0.5

# ─── search/vector_search.py ────────────────────────────────────────
search/vector_search.py -> db/chunks_repo.py : _row_to_chunk : imports : 1.0
search/vector_search.py -> db/connection.py : get_pool : imports : 1.0
search/vector_search.py -> models.py : CodeChunk : imports : 1.0

# ─── search/bm25_search.py ──────────────────────────────────────────
search/bm25_search.py -> db/chunks_repo.py : _row_to_chunk : imports : 1.0
search/bm25_search.py -> db/connection.py : get_pool : imports : 1.0
search/bm25_search.py -> models.py : CodeChunk : imports : 1.0

# ─── search/hybrid.py ───────────────────────────────────────────────
search/hybrid.py -> db/chunks_repo.py : _row_to_chunk : imports : 1.0
search/hybrid.py -> db/connection.py : get_pool : imports : 1.0
search/hybrid.py -> models.py : SearchResult : imports : 1.0

# ─── search/context_builder.py ──────────────────────────────────────
search/context_builder.py -> config.py : settings : imports : 1.0
search/context_builder.py -> models.py : SearchResult : imports : 1.0

# ─── cli/main.py ────────────────────────────────────────────────────
cli/main.py -> config.py : settings : imports : 1.0
cli/main.py -> db/chunks_repo.py : chunks_repo : imports : 1.0
cli/main.py -> db/connection.py : close_pool,run_migrations : imports : 1.0
cli/main.py -> embeddings/openai.py : OpenAIEmbedder : imports : 1.0
cli/main.py -> git/blame.py : get_chunk_blame,get_file_blame : imports : 1.0
cli/main.py -> git/history.py : get_file_history : imports : 1.0
cli/main.py -> llm/base.py : BaseLLM : imports : 1.0
cli/main.py -> models.py : CodeChunk,Language : imports : 1.0
cli/main.py -> parser/ast_parser.py : detect_language,parse_file : imports : 1.0
cli/main.py -> search/context_builder.py : build_context,format_sources : imports : 1.0
cli/main.py -> search/hybrid.py : hybrid_search : imports : 1.0

# ─── api/main.py ────────────────────────────────────────────────────
api/main.py -> config.py : settings : imports : 1.0
api/main.py -> db/chunks_repo.py : chunks_repo : imports : 1.0
api/main.py -> db/connection.py : close_pool,run_migrations : imports : 1.0
api/main.py -> embeddings/openai.py : OpenAIEmbedder : imports : 1.0
api/main.py -> search/context_builder.py : build_context,format_sources : imports : 1.0
api/main.py -> search/hybrid.py : hybrid_search : imports : 1.0

# ─── SUMMARY ────────────────────────────────────────────────────────
# Total expected edges: 47
# - imports edges: 41 (confidence=1.0: 39, confidence=0.5: 2)
# - inherits edges: 6 (all confidence=1.0)
# Unresolved (skipped): 0 star imports, 0 conditional, 0 dynamic
# Re-exports: 2 (reranker/__init__.py)
