Skip to content

The Audit's D1.5 Check Cannot Be Satisfied by a Push-Triggered Gate #4048

Closed

Description

@ptr727

Observed

spec/audit.py reports a D1.5 interface finding against a gate workflow that has no pull_request trigger at all. The finding's remedy cannot be applied to that workflow.

Audit run 2026-11-11T00:47:35Z | hub 1397e30a | branch override develop, repository homeassistant-purpleair:

interface: .github/workflows/test-pull-request.yml job 'check-workflow-status' is named 'Check pull request workflow status job' on a run other than pull_request, so a run the pull request did not start can post the required check on its head (WORKFLOW.md D1.5)

The repository's gate runs on push: ['**'] and workflow_dispatch, by design and as its own WORKFLOW.md D1 and D6 document. A minimal workflow carrying the property:

on:
  push:
    branches: ['**']
  workflow_dispatch:
jobs:
  check-workflow-status:
    name: Check pull request workflow status job

Why the finding is wrong for this shape

The check at spec/audit.py flags every job carrying the required name when events - {"pull_request"} is non-empty. It does not ask whether pull_request is among the workflow's events.

  • D1.5 gives the remedy as naming the check only when github.event_name == 'pull_request'. On a workflow with no pull_request trigger that expression never yields the name, so the ruleset-bound context would never be posted and every pull request would block.
  • D1.5's stated hazard is a run posting the required context "without the PR run's gates". Here no pull request run exists. The push run and the dispatch run execute the same jobs, so there is no weaker producer to mask a stronger one. A Dispatch of the Smoke Pull Request Stub Can Mask a Pull Request's Required Check #3334 was the two-producer case with different gates.

Expected

The audit and D1.5 say what a push-triggered gate owes. Either of these would settle it:

  1. Scope the check to workflows whose events include pull_request, and state in D1.5 that a workflow with no such trigger has one class of producer.
  2. Rule that a gate must trigger on pull_request, and state that in D1.5, so this shape becomes a real finding with a remedy a repository can apply.

A related fact the decision should weigh

validate-task.yml gates its prose steps on github.event.pull_request != null. A push-triggered gate therefore never runs the prose gate in CI, and only a local hook covers it. That is a reason option 2 might be wanted, and it is why this is not filed as a pure false positive.

The audit finding stands on the repository until this is decided. The repository is leaving its workflow unchanged meanwhile.

Activity

  1. added
    script
    on Nov 11, 2026
  2. ptr727 commented on Nov 11, 2026

    @ptr727
    OwnerAuthor

    Answered by the maintainer, 2026-11-10: option 2. A gate must trigger on pull_request, and D1.5 states so. The shape this issue reports then becomes a real finding with a remedy a repository can apply. It also means the prose gate runs in CI, which a push-only gate never does.

  3. ptr727 commented on Nov 11, 2026

    @ptr727
    OwnerAuthor

    Backlog burndown claim, round 3 (2026-11-11). Branch feature/workflow-contract-triggers, group: #4011, #4051, #4048, #4060.

    Predicted files:

    • WORKFLOW.md
    • docs/reusable-workflows.md
    • spec/audit.py
    • tests/test_audit_helpers.py
    • .agents/skills/workflow-ci-contract/references/architecture.md
    • .agents/skills/workflow-ci-contract/references/d-guarantees.md
    • .agents/skills/workflow-ci-contract/references/test-methodology.md
    • .github/skills/workflow-ci-contract/references/architecture.md
    • .github/skills/workflow-ci-contract/references/d-guarantees.md
    • .github/skills/workflow-ci-contract/references/test-methodology.md
    • .claude-plugin/fleet-skills/skills/workflow-ci-contract/references/architecture.md
    • .claude-plugin/fleet-skills/skills/workflow-ci-contract/references/d-guarantees.md
    • .claude-plugin/fleet-skills/skills/workflow-ci-contract/references/test-methodology.md
    • .claude-plugin/fleet-skills/.source-digests/workflow-ci-contract
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    script

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions