Skip to content

fix(ai-moderator): conclusion job fails when agent is skipped via skip-roles #203

@JacobPEvans-personal

Description

@JacobPEvans-personal

Problem

When skip-roles causes the AI Moderator to skip (all jobs CANCELLED), the conclusion job still executes and fails — because it expects artifacts from an agent run that never happened.

Symptom: Every PR opened by a repo admin (owner) shows conclusion: FAILURE in CI, making mergeStateStatus: UNSTABLE.

Why it happens:

  • skip-roles: [admin, maintainer, write, triage] in the moderator config
  • Repo owner PRs trigger the skip path: pre_activation → CANCELLED, activation → CANCELLED, agent → CANCELLED, detection → CANCELLED, safe_outputs → CANCELLED
  • conclusion job has no guard for this case — it fails when expected artifacts are absent

Current impact: Non-blocking (conclusion is not a required check), but every Phase 4 canonical-app-credentials PR shows UNSTABLE CI, which is noisy and confusing.

Fix options

  1. Guard conclusion on agent actually running — check if agent job was skipped/cancelled and exit 0 in that case
  2. gh aw upgrade — newer gh-aw versions may already handle this
  3. Make skip produce a clean conclusion result — conclusion should report "skipped" not "failure" when the agent was intentionally bypassed

Reproduction

Any PR opened by an account with admin/maintainer/write/triage role on the repo.

Related

  • Phase 4 PRs affected: ai-workflows#202, ansible-proxmox#167, ansible-proxmox-apps#231, nix-darwin#1065, nix-home#215, orbstack-kubernetes#210, python-template#42, tf-splunk-aws#157
  • AI Moderator skip config: skip-roles: [admin, maintainer, write, triage]

Metadata

Metadata

Assignees

No one assigned

    Labels

    type:bugBug - Something isn't working (semver: PATCH)

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions