fix(issues): a skipped scan still catches up the deferred issues #826

Merged
sharang merged 1 commits from fix/issue-catchup-unchanged into main 2026-11-04 08:50:53 +00:00
Owner

Dogfood item 2 (t49 / t66).

Why

The issue catch-up (ISSUE_CATCHUP) opens at most 20 issues per target and scan (MAX_NEW_ISSUES), and it only ran inside a scan. A scheduled scan of an unchanged repository is skipped by change detection ("No new commits, skipping scan"), so the deferred findings waited for the next push. On our own repo, the 03.11. round logged created=20 linked=37 deferred=214, and those 214 would only move after a commit.

What

  • In the skip branch of run_pipeline, catch_up_unchanged runs the catch-up on its own. That is create_tracker_issues with no new findings, which lists the Gitea issues once and then catches up. It runs only when:
    • ISSUE_CATCHUP is on or dry_run;
    • the tracker is Gitea;
    • issue_catchup::waiting finds at least one open medium+ finding without an issue. This is the same filter as the catch-up's candidates and costs one find_one, so an idle repository makes no tracker request.
  • Failures are logged, and the skipped scan stays skipped.
  • With the default 6-hour schedule, a backlog now drains at 20 issues per target every 6 hours.
  • Docs: guide/issues.md.

Note

After #820, most of the pruefwerk repo's 214 deferred findings are fixture findings and will close as test data instead of getting issues. This change matters for real backlogs, ours and customers'.

Tests

  • on_links_by_marker_and_opens_the_others (Mongo) now also checks that waiting is true before the catch-up and false once nothing is left.
  • CI only.

🤖 Generated with Claude Code

Dogfood item 2 (t49 / t66). ## Why The issue catch-up (`ISSUE_CATCHUP`) opens at most 20 issues per target and scan (`MAX_NEW_ISSUES`), and it only ran inside a scan. A scheduled scan of an unchanged repository is skipped by change detection ("No new commits, skipping scan"), so the deferred findings waited for the next push. On our own repo, the 03.11. round logged `created=20 linked=37 deferred=214`, and those 214 would only move after a commit. ## What - In the skip branch of `run_pipeline`, `catch_up_unchanged` runs the catch-up on its own. That is `create_tracker_issues` with no new findings, which lists the Gitea issues once and then catches up. It runs only when: - `ISSUE_CATCHUP` is `on` or `dry_run`; - the tracker is Gitea; - `issue_catchup::waiting` finds at least one open medium+ finding without an issue. This is the same filter as the catch-up's candidates and costs one `find_one`, so an idle repository makes no tracker request. - Failures are logged, and the skipped scan stays skipped. - With the default 6-hour schedule, a backlog now drains at 20 issues per target every 6 hours. - Docs: `guide/issues.md`. ## Note After #820, most of the pruefwerk repo's 214 deferred findings are fixture findings and will close as test data instead of getting issues. This change matters for real backlogs, ours and customers'. ## Tests - `on_links_by_marker_and_opens_the_others` (Mongo) now also checks that `waiting` is true before the catch-up and false once nothing is left. - CI only. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
sharang added 1 commit 2026-11-04 08:34:14 +00:00
fix(issues): a skipped scan still catches up the deferred issues
CI / Check (push) Skipped
CI / Detect Changes (pull_request) Skipped
CI / Deploy Agent (pull_request) Skipped
CI / Deploy Dashboard (pull_request) Skipped
CI / Deploy Docs (pull_request) Skipped
CI / Deploy MCP (pull_request) Skipped
CI / Agent integration (pull_request) Successful in 3m37s
CI / Check (pull_request) Successful in 16m25s
59cf2a2c2c
The issue catch-up opens at most 20 issues per target and scan, and ran
only inside a scan. A scheduled scan of a repository without new
commits is skipped, so the rest waited for the next push: on our own
repo 214 findings sat deferred after the first round (dogfooding t49).

When change detection skips a scan, the catch-up now runs on its own,
if it is on (or dry run), the tracker is Gitea, and findings are
waiting for an issue. issue_catchup::waiting answers that with one
query, so an idle repository costs no tracker request.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
sharang merged commit 533d5f35b5 into main 2026-11-04 08:50:53 +00:00
Sign in to join this conversation.