fix(issues): Gitea issue sync lists once per scan and keeps at most two requests in flight per instance #548

Merged
sharang merged 1 commits from fix/gitea-issue-sync-load into main 2026-10-09 14:25:30 +00:00
1 Commits
Author SHA1 Message Date
Sharang ParnerkarandClaude Opus 5.5 9882d48d3d fix(issues): Gitea issue sync lists once per scan and keeps at most two requests in flight per instance
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 / Check (pull_request) Successful in 9m24s
A managed Gitea (1 GiB) was OOM-killed while a scan filed its findings as
issues: up to two q= searches per finding, label listings and creates hit it
in parallel with the background status sync.

- Issue creation on Gitea lists the repository's issues once (paged, 50 per
  page, state=all) and matches each finding locally: by the fingerprint
  marker in the body, then by exact title (not for a group). Issues opened
  during the run join the index. A listing that fails stops issue creation for
  that repository with an error (logged), instead of searching per finding.
  Issue creation only covers a scan's new findings, so those of a failed
  run get no issue later (as with a failed create today). Other trackers keep their search.
- The status sync resolves the risk:accepted label once per target, not per
  issue.
- Every request to a Gitea, from the tracker and the managed git source, takes
  one of two permits of its instance (host:port), shared across all scans of
  the process; creates are followed by a 250 ms pause. The tracker's request
  code goes through one helper that holds the permit until the body is read,
  and a failed search no longer reads as "no issue".

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EYKjxacrr6K88DruUmP48p
2026-10-09 16:13:46 +02:00