Allow status-only reporters to read proven pre-agent custom outputs

Merged
CO
1mo ago
+578-38

Status-only reporters reject pre-agent metadata such as PR numbers and head SHAs, preventing failure reporting when detection fails. This change permits those outputs without relaxing the post-agent data boundary.

  • Eligibility: Share a graph predicate requiring an authored custom producer to be an ancestor of agent, with no direct or transitive dependency on agent or detection.
  • Compiler/linter parity: Use the lowered graph when available; infer compiler ordering only for AW-only linting. Generated jobs without authored provenance remain excluded.
  • Preserved boundaries: Retain reporter conditions, leaf-only restrictions, artifact/file prohibitions, and existing detection-gated compiler-owned output access.
  • Coverage and docs: Add regressions for transitive metadata, pre-activation ordering, downstream dependencies, parallel jobs, and generated producers; document the contract.

A qualifying reporter can consume metadata through env:

needs: [eligibility, agent, detection]
detection-gate: status-only
if: always()
steps:
  - env:
      HEAD_SHA: ${{ needs.eligibility.outputs.head_sha }}
    run: printf '%s\n' "$HEAD_SHA"