Skip to content

fix: prevent denied jobs from bypassing policy via retry - #249

Merged
ecarreras merged 2 commits into
mainfrom
fix/denied-retry-policy
Oct 6, 2026
Merged

ecarreras merged 2 commits into
mainfrom
fix/denied-retry-policy

Conversation

@pilipilisbot

Copy link
Copy Markdown
Collaborator

Problem

The dashboard/API retry path requeued denied and waiting_approval jobs directly to pending, bypassing the policy decision recorded when the job was created. A denied workflow_run could therefore be dispatched by an admin retry.

Fix

  • At the queue transition, only permit retry of blocked jobs whose recorded decision is executable (auto_trusted). This guards both API and CLI callers atomically.
  • Hide Retry for policy-denied/approval-pending jobs in the dashboard while retaining Dismiss.
  • Update operations documentation and add queue/API/UI regression coverage.

Verification

  • pytest -q (full suite)
  • npm --prefix dashboard test -- --run
  • npm --prefix dashboard run build

This does not re-evaluate a blocked job against a policy changed after initial enqueue; that is a separate follow-up guardrail.

# Conflicts:
#	src/github_agent_bridge/dashboard_static/assets/index-DBHrKV9X.js
#	src/github_agent_bridge/dashboard_static/index.html
@ecarreras
ecarreras requested a review from giscebot October 6, 2026 07:34

@giscebot giscebot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Approved. I checked the retry transition end to end: the queue now enforces blocked plus auto_trusted atomically, so both API and CLI callers reject denied and approval-pending jobs; the dashboard keeps Dismiss available while hiding Retry; operations documentation matches the behavior. The branch contains current main and remains MERGEABLE/CLEAN. Local verification on the reviewed commit: pytest 436 passed, dashboard 64 passed, production build succeeded and reproduced the committed static bundle, and git diff --check passed.

@ecarreras
ecarreras merged commit 95f8ce2 into main Oct 6, 2026
3 checks passed
@ecarreras
ecarreras deleted the fix/denied-retry-policy branch October 6, 2026 09:36
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.

3 participants