Skip to content

feat(github-app): persist PR-scan jobs and surface lifecycle status #579

Description

@Darkroom4364

Problem

The GitHub App accepts pull-request work into an in-memory bounded queue. A process restart can lose queued or in-flight work, and a PR user cannot reliably distinguish queued/running work, an infrastructure failure, and a clean result.

Scope

Persist accepted PR-scan jobs (delivery ID, repository, PR number, head SHA, lifecycle state, attempts, and terminal error/result metadata) before acknowledging them. Recover non-terminal jobs after restart, retain delivery/head idempotency and supersession/coalescing, and expose queued/running/terminal state through the existing GitHub check-run surface.

This must not change the marker-tagged review-summary/legacy-comment behavior being implemented by #575.

Non-goals

Do not redesign finding rendering, review-comment aggregation, or build a general external workflow engine.

Acceptance criteria

  • A valid PR delivery is durably recorded before its successful webhook acknowledgement; duplicate delivery IDs and superseded heads do not cause duplicate scans.
  • After restart, non-terminal jobs are recovered or safely requeued; an older head cannot overwrite the terminal state for a newer head.
  • The PR check visibly transitions through queued or in-progress and reaches a terminal success, finding, or infrastructure-failure state with an operator-actionable summary.
  • Tests cover persistence/restart recovery, duplicate delivery handling, head supersession, and terminal failure visibility.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestpriority/highHigh-priority active product work

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions