Skip to content

fix(worker): baseline job을 full-history scan으로 처리#52

Merged
pureliture merged 1 commit into
mainfrom
codex/personal-prod-baseline-worker
Jun 21, 2026
Merged

fix(worker): baseline job을 full-history scan으로 처리#52
pureliture merged 1 commit into
mainfrom
codex/personal-prod-baseline-worker

Conversation

@pureliture

Copy link
Copy Markdown
Contributor

What

  • baseline queue job을 gitleaks full-history scan으로 처리하도록 scan-worker 옵션을 분기했습니다.
  • baseline sentinel commit이 finding context에 덮어써지지 않도록 했습니다.
  • baseline worker regression test를 추가했습니다.

Why

  • personal-prod 초기 baseline은 commit_sha=baseline sentinel을 쓰는 queue job이라, 기존 단일 commit log opts(baseline^!)로 실행하면 runtime baseline이 실패합니다.

Validation

  • uv run pytest tests/test_scan_worker.py -q
  • uv run pytest -q
  • uv run python -m governance.autopilot_gate --base origin/main

baseline enqueue의 sentinel commit을 단일 commit log opts로 넘기지 않도록 scan-worker 옵션을 분리한다.

baseline job은 finding context에 sentinel commit/HEAD branch를 덮어쓰지 않고, scanner가 제공한 history context를 보존한다.

검증: uv run pytest tests/test_scan_worker.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>
@pureliture pureliture merged commit a329cf8 into main Jun 21, 2026
9 checks passed
@pureliture pureliture deleted the codex/personal-prod-baseline-worker branch June 21, 2026 00:12

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request refactors the scan worker to handle baseline scan jobs differently from incremental ones by introducing helper functions to configure scan options and finding contexts. The review feedback highlights a potential backward-compatibility issue where legacy baseline jobs in the queue might decode with an incremental job type but retain a "baseline" commit SHA, which would cause runtime failures. It suggests checking both the job type and the commit SHA to identify baseline jobs, and adding a corresponding test case to verify this behavior.

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.

Comment thread src/security_scanner/runtime/scan_worker.py
Comment thread tests/test_scan_worker.py
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