fix(discovery): empty repo poll을 incremental fresh로 처리#54
Conversation
refs가 없는 repo는 successful discovery poll에서 스캔할 commit이 없으므로 incremental health를 advance한다. 이 처리로 empty/no-HEAD repo가 초기 배포 직후 계속 stale breach로 남는 상황을 방지한다. 검증: uv run ruff check src/security_scanner/runtime/incremental_discovery.py tests/test_incremental_discovery.py && uv run pytest tests/test_incremental_discovery.py -q && uv run pytest -q && uv run python -m governance.autopilot_gate --base origin/main Co-Authored-By: Codex GPT-5 <noreply@openai.com>
There was a problem hiding this comment.
Code Review
This pull request updates the incremental discovery process to advance the repository health status even when no new references are found, along with adding a corresponding test case. The reviewer recommended calling request.store.advance_repo_health directly instead of using getattr to dynamically check for the method, as it is a required part of the IncrementalScanStore protocol and dynamic checking could silently mask incomplete store implementations.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
What
Why
Validation
uv run ruff check src/security_scanner/runtime/incremental_discovery.py tests/test_incremental_discovery.pyuv run pytest tests/test_incremental_discovery.py -quv run pytest -quv run python -m governance.autopilot_gate --base origin/main