Skip to content

Move E2E PR result reporting into a trusted helper #6954

Closed

Description

@cv

Parent: #6952

Problem

The Post E2E target results to PR step in .github/workflows/e2e.yaml is a 317-line actions/github-script program. It validates dispatch selectors, resolves the target PR, loads matrix-child job results, reconciles aggregate conclusions, calculates wall-clock ranges, renders Markdown, and posts a comment from a write-capable job.

This logic is directly testable but cannot be loaded from a branch-controlled checkout because the job has pull-requests: write.

Work

  • Move result loading, validation, attribution, status calculation, and Markdown rendering into tools/e2e.
  • Expose it to the publisher through an immutable first-party action or a checkout explicitly pinned to the trusted workflow revision.
  • Keep the write-capable publication job isolated from test checkouts, E2E credentials, and generic issue-write permission.
  • Retain GitHub API calls only where matrix-child conclusions are unavailable through needs.

Acceptance criteria

  • The 317-line inline program is replaced by a short trusted helper invocation.
  • Explicit-only jobs, invalid selectors, missing requested tests, cancelled runs, aggregate/child attribution mismatches, unknown results, wall-clock ranges, and stale/closed PR handling remain covered.
  • The helper returns/render-tests comment content without requiring a live GitHub mutation.
  • A workflow-boundary test proves the publisher executes only the trusted revision and retains only actions: read and pull-requests: write as needed.
  • The publisher never checks out or executes checkout_sha content.
  • Existing E2E reporting tests are migrated from extracting YAML source to direct helper tests.

Activity

  1. added theissue type on Jul 15, 2026
  2. added
    area: ci
    on Jul 15, 2026
  3. added
    area: e2e
    area: architecture
    help wanted
    on Jul 15, 2026
  4. self-assigned this
    on Jul 16, 2026
  5. added a commit that references this issue on Jul 16, 2026
    329bbd0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area: architecturearea: ciarea: e2ehelp wanted

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions