Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
c56b51b
chore: backend code quality and refactoring
krapfj23 Apr 16, 2026
7bfefb8
chore: update project and frontend configuration
krapfj23 Apr 16, 2026
57eda74
test: update existing tests for current API surface
krapfj23 Apr 16, 2026
1743231
test: add backend integration test suite
krapfj23 Apr 16, 2026
5a7966a
test: rewrite cognee e2e as proper pytest test
krapfj23 Apr 16, 2026
49d153a
ci: add backend test workflow to GitHub Actions
krapfj23 Apr 16, 2026
5ee3550
docs: add CLAUDE.md project documentation
krapfj23 Apr 16, 2026
4729d9e
feat: enhance knowledge graph with node details, highlighting, search…
krapfj23 Apr 16, 2026
7566c78
feat: add SHA-256 content hash deduplication for uploads
krapfj23 Apr 16, 2026
26fc788
docs: rewrite README as developer onboarding guide
krapfj23 Apr 16, 2026
7330003
refactor: remove legacy classification, migration, and search services
krapfj23 Apr 17, 2026
4e7eb77
fix: use correct Cognee search types and show document filename in se…
krapfj23 Apr 17, 2026
72e66a6
style: apply ruff and prettier formatting fixes
krapfj23 Apr 17, 2026
e5d9720
feat: per-dataset insights and entities from Cognee relational store
krapfj23 Apr 17, 2026
a76a87f
chore(deps): patch security vulnerabilities in frontend + backend
krapfj23 Apr 17, 2026
df8773f
Merge remote-tracking branch 'origin/main' into dedup-readme-and-impr…
krapfj23 Apr 17, 2026
03edb16
fix: handle None result from supabase maybe_single() calls
krapfj23 Apr 17, 2026
285988d
final fixes
krapfj23 Apr 22, 2026
f9d2e12
Merge branch 'main' into dedup-readme-and-improvements
krapfj23 Apr 22, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion backend/app/services/document_metadata_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,9 @@ async def get_document(doc_id: str) -> dict | None:
.maybe_single()
.execute()
)
return _normalize(result.data) if result.data else None
if result is None or not getattr(result, "data", None):
return None
return _normalize(result.data)


async def update_document_stage(doc_id: str, stage: str) -> None:
Expand Down
19 changes: 19 additions & 0 deletions backend/app/services/document_pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,12 @@
_VALID_DOC_TYPES = {"RFQ", "PO", "CFG", "Client CSV", "Sales CSV"}
_COGNEE_TIMEOUT = int(os.getenv("COGNEE_TIMEOUT_SECONDS", "300"))

# Serialize run_pipeline() across concurrent uploads so we don't burst
# past Gemini's per-minute embedding cap. One doc fully completes (or
# fails) before the next pipeline starts. Upload response still returns
# immediately; docs queue as status="processing".
_PIPELINE_LOCK = asyncio.Lock()


# ---------------------------------------------------------------------------
# Helpers
Expand Down Expand Up @@ -108,7 +114,20 @@ async def run_pipeline(
Progress stages written to DB:
uploading β†’ ingesting β†’ building_graph β†’ analyzing
β†’ extracting_insights β†’ completed (or failed)

Serialized via `_PIPELINE_LOCK`: if several uploads arrive at once,
each pipeline waits for the prior one to finish. Upload response still
returns immediately β€” docs queue as status="processing".
"""
async with _PIPELINE_LOCK:
await _run_pipeline_locked(file_path, doc_id, original_filename)


async def _run_pipeline_locked(
file_path: Path,
doc_id: str,
original_filename: str,
) -> None:
sb = await get_async_supabase()

async def _update(**fields) -> None:
Expand Down
Binary file removed backend/cortex_local.db
Binary file not shown.
Binary file removed backend/cortex_local.db-shm
Binary file not shown.
Empty file removed backend/cortex_local.db-wal
Empty file.
Loading