Skip to content

fix: harden background sync_source lifecycle#75

Merged
eunaverse merged 3 commits into
mainfrom
feature/fix-notion-cancel-sync-stuck
Jun 15, 2026
Merged

fix: harden background sync_source lifecycle#75
eunaverse merged 3 commits into
mainfrom
feature/fix-notion-cancel-sync-stuck

Conversation

@eunaverse

Copy link
Copy Markdown
Owner

요약

  • public MCP sync_source를 immediate-return background launcher 계약으로 고정하고 get_sync_status() polling 흐름에 맞춰 문서와 retained tests를 정렬했습니다.
  • cancelled background sync가 client timeout 뒤 running에 고착되지 않도록 job lifecycle을 정리하고, stale cancelled cache가 newer authoritative SQLite job을 이기지 못하도록 direct handoff를 좁혔습니다.
  • demo/E2E/API/contract coverage를 확장해 callback-first cancel race, foreign retry override, launcher 미지원 시 no-fallback error 경로까지 고정했습니다.

리뷰 포인트

  • internal IngestionService.sync_source()는 blocking path를 유지하고, public MCP sync_sourcestart_sync_source() launcher를 사용합니다.
  • cancelled local background handoff는 동일 cancelled job이 여전히 latest authoritative SQLite job일 때만 direct caller에 한 번 surface됩니다.
  • background launcher가 없으면 public MCP sync_source는 blocking fallback 대신 명시적 error를 반환합니다.
  • 관련 이슈 없음

검증

  • uv run pytest tests/api/test_tools_contract.py tests/contracts/test_public_mcp_contracts.py -q
  • uv run pytest tests/indexing/test_ingestion_service.py tests/api/test_tools_contract.py tests/contracts/test_public_mcp_contracts.py tests/e2e/test_contextwiki_flow.py -q
  • uv run pytest tests/scripts/test_demo_public_flow.py -q
  • ./scripts/verify_functional_e2e.sh
  • git diff --check

@eunaverse eunaverse merged commit 782707f into main Jun 15, 2026
1 check passed
@eunaverse eunaverse deleted the feature/fix-notion-cancel-sync-stuck branch June 15, 2026 09:11
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