Skip to content

fix(verifier): drain runtime queue jobs#102

Merged
pureliture merged 3 commits into
mainfrom
codex/verify-decimal-normalization
Jun 27, 2026
Merged

fix(verifier): drain runtime queue jobs#102
pureliture merged 3 commits into
mainfrom
codex/verify-decimal-normalization

Conversation

@pureliture

Copy link
Copy Markdown
Contributor

What

Fixes the runtime verifier queue drain path for DynamoDB-backed queue payloads.

Why

Historical verifier backfill can enqueue DB-backed verifier jobs, but the drain path was blocked by two runtime issues:

  • DynamoDB numeric values in finding snapshots could reach verifier prompt construction as non-JSON primitives.
  • Code-scan workers could lease job_type="verify" queue entries and return them to pending, competing with verify-drain.

Changes

  • Coerce Location.lineEnd during finding deserialization, matching existing lineStart handling.
  • Exclude verifier jobs from lease_next_scan_job() so only lease_next_verify_job() consumes them.
  • Add regression coverage for DynamoDB Decimal verifier snapshots and scan-worker/verifier queue isolation.

Validation

  • Related verifier/storage/worker pytest coverage passed locally.
  • Diff whitespace check passed locally.
  • Focused ruff checks for syntax/import regressions passed locally.

Closes #101

@pureliture pureliture added the type:bug Bug work item label Jun 27, 2026

@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 updates Location.from_dict to cast line_end to an integer to support DynamoDB Decimal types, and modifies lease_next_scan_job to filter out 'verify' jobs from the leased candidates, accompanied by relevant unit tests. Feedback on these changes suggests implementing defensive type coercion when parsing line_end to prevent potential crashes on malformed input. Additionally, there is a concern regarding head-of-line blocking and queue starvation, as filtering 'verify' jobs in-memory after querying a bounded candidate window could exhaust the retrieved window and starve standard scan jobs.

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/core/finding/model.py Outdated
Comment thread src/security_scanner/storage/adapters/nosql_db/store.py Outdated
@pureliture pureliture merged commit 6940019 into main Jun 27, 2026
9 checks passed
@pureliture pureliture deleted the codex/verify-decimal-normalization branch June 27, 2026 07:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type:bug Bug work item

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug: verifier queue drain stalls on runtime queue payloads

1 participant