fix: harden background sync_source lifecycle#75
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
요약
sync_source를 immediate-return background launcher 계약으로 고정하고get_sync_status()polling 흐름에 맞춰 문서와 retained tests를 정렬했습니다.running에 고착되지 않도록 job lifecycle을 정리하고, stale cancelled cache가 newer authoritative SQLite job을 이기지 못하도록 direct handoff를 좁혔습니다.리뷰 포인트
IngestionService.sync_source()는 blocking path를 유지하고, public MCPsync_source만start_sync_source()launcher를 사용합니다.sync_source는 blocking fallback 대신 명시적 error를 반환합니다.검증
uv run pytest tests/api/test_tools_contract.py tests/contracts/test_public_mcp_contracts.py -quv 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 -quv run pytest tests/scripts/test_demo_public_flow.py -q./scripts/verify_functional_e2e.shgit diff --check