Skip to content

Post E2E results to pull requests - #11

Merged
isaevt merged 1 commit into
mainfrom
isaevt/e2e-pr-summary
Aug 31, 2026
Merged

isaevt merged 1 commit into
mainfrom
isaevt/e2e-pr-summary

Conversation

@isaevt

@isaevt isaevt commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

Summary

Post a compact E2E results summary to the pull request associated with the tested candidate.

Candidate execution and pull request reporting use separate jobs so candidate-controlled code cannot modify pull requests through GITHUB_TOKEN.

What changed

  • Discover an open same-repository pull request whose current head matches the resolved candidate commit.
  • Continue running E2E without posting a comment when no matching pull request exists.
  • Run candidate code with read-only GitHub permissions.
  • Upload E2E evidence for processing by a separate reporting job.
  • Run the reporter from the immutable trusted workflow revision.
  • Give pull-requests: write only to the reporting job.
  • Recheck the pull request head immediately before posting to avoid publishing stale results.
  • Create or update a single sticky results comment.
  • Report control-plane and lifecycle check statuses.
  • Map artifact-provided check identifiers and statuses to trusted fixed labels before publishing them.
  • Fail closed on unexpected artifact values without logging their contents.
  • Require complete evidence when E2E succeeds.
  • Link to the workflow run for detailed results.

@github-actions

github-actions Bot commented Aug 27, 2026

Copy link
Copy Markdown

gh-elm E2E results

Overall result: ✅ Passed

  • Candidate: fdb84dd5763b235249084d8a89bb11fdaa4b031f
  • Workflow run: View logs

Control-plane scenario

Check Status
Configuration ✅ Passed
Preflight ✅ Passed
Create primary migration ✅ Passed
Migration status ✅ Passed
Create pagination migration ✅ Passed
List pagination ✅ Passed
Cancel primary migration ✅ Passed
Cleanup ✅ Passed
Overall result ✅ Passed

Lifecycle scenario

Check Status
Configuration ✅ Passed
Preflight ✅ Passed
Create lifecycle migration ✅ Passed
Initial migration status ✅ Passed
Start migration ✅ Passed
Target migration ID ✅ Passed
Target migration ID validation ✅ Passed
Wait for cutover readiness ✅ Passed
Target resources ✅ Passed
Initiate cutover ✅ Passed
Wait for cutover completion ✅ Passed
Revert cutover ✅ Passed
Verify reverted state ✅ Passed
Cleanup ✅ Passed
Overall result ✅ Passed

@isaevt
isaevt force-pushed the isaevt/e2e-pr-summary branch from c45998c to b01ed4a Compare August 27, 2026 23:18
@isaevt
isaevt deployed to migration-e2e August 27, 2026 23:44 — with GitHub Actions Active
@isaevt
isaevt force-pushed the isaevt/e2e-pr-summary branch from b01ed4a to b2e0060 Compare August 27, 2026 23:57
@isaevt
isaevt deployed to migration-e2e August 27, 2026 23:58 — with GitHub Actions Active
@isaevt
isaevt force-pushed the isaevt/e2e-pr-summary branch from b2e0060 to edbd75c Compare August 28, 2026 00:05
@isaevt isaevt changed the title WIP Post E2E results to pull requests Aug 28, 2026
@isaevt
isaevt marked this pull request as ready for review August 28, 2026 00:07
Copilot AI balanced review requested due to automatic review settings August 28, 2026 00:07
@isaevt
isaevt requested a review from a team as a code owner August 28, 2026 00:07

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot review overview

🟡 Changes recommended

Requiring the new reporting script prevents otherwise valid older candidates from running E2E.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Review tier: Balanced
Findings: 1 Medium severity

New issues introduced by this change (1)
Severity Finding
Medium severity .github/​workflows/​e2e.yml — Making the PR-summary script part of required_harness_files prevents E2E from running for…
What changed in this PR

Adds sticky E2E result summaries to matching pull requests.

Changes:

  • Finds a pull request matching the candidate SHA.
  • Renders and updates compact scenario results.
  • Removes the skipped pause/resume lifecycle entry.
File Description
.github/​workflows/​e2e.yml Discovers PRs and posts results.
script/​e2e/​post-pr-summary.sh Renders and manages sticky comments.
script/​e2e/​scenarios/​lifecycle.sh Removes the obsolete skipped result.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread .github/workflows/e2e.yml Outdated
@isaevt
isaevt force-pushed the isaevt/e2e-pr-summary branch from edbd75c to fdb84dd Compare August 28, 2026 00:18
@isaevt
isaevt requested a balanced review from Copilot August 28, 2026 00:20
@isaevt
isaevt deployed to migration-e2e August 28, 2026 00:21 — with GitHub Actions Active

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot review overview

🟡 Changes recommended

Candidate code receives PR-write access, and stale runs can overwrite the summary after the PR head advances.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Review tier: Balanced
Findings: 1 High severity · 1 Medium severity

New issues introduced by this change (2)
Severity Finding
High severity .github/​workflows/​e2e.yml — The workflow-level write permission is inherited by the e2e job, where the checked-out candidate…
Medium severity .github/​workflows/​e2e.yml — The head SHA is checked only in the earlier resolve job. Because this job can wait for…
Issues resolved since last review (1)
Severity Finding
Medium severity .github/​workflows/​e2e.yml — Making the PR-summary script part of required_harness_files prevents E2E from running for… View resolved comment

Comment thread .github/workflows/e2e.yml Outdated
Comment thread .github/workflows/e2e.yml Outdated
@isaevt
isaevt force-pushed the isaevt/e2e-pr-summary branch from fdb84dd to 67d052e Compare August 28, 2026 00:34
@isaevt
isaevt requested a balanced review from Copilot August 28, 2026 00:35
@isaevt
isaevt deployed to migration-e2e August 28, 2026 00:37 — with GitHub Actions Active

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot review overview

🟡 Changes recommended

Candidate-controlled evidence can expose secrets, and missing evidence can produce a misleading passed report.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Review tier: Balanced
Findings: 1 High severity · 1 Medium severity

New issues introduced by this change (2)
Severity Finding
High severity script/​e2e/​post-pr-summary.sh — The artifact is produced by candidate-controlled code that receives SOURCE_TOKEN and…
Medium severity .github/​workflows/​e2e.yml — If artifact download fails after a successful E2E job, this branch continues and the reporter posts…
Issues resolved since last review (2)
Severity Finding
Medium severity .github/​workflows/​e2e.yml — The head SHA is checked only in the earlier resolve job. Because this job can wait for… View resolved comment
High severity .github/​workflows/​e2e.yml — The workflow-level write permission is inherited by the e2e job, where the checked-out candidate… View resolved comment

Comment thread script/e2e/post-pr-summary.sh Outdated
Comment thread .github/workflows/e2e.yml
@isaevt
isaevt force-pushed the isaevt/e2e-pr-summary branch from 67d052e to cc10694 Compare August 28, 2026 01:13
@isaevt
isaevt requested a balanced review from Copilot August 28, 2026 01:13

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot review overview

🔵 Needs a closer look

The security-sensitive workflow depends on externally configured environment branch protections that require human verification.

Review tier: Balanced
Findings: None

Issues resolved since last review (2)
Severity Finding
Medium severity .github/​workflows/​e2e.yml — If artifact download fails after a successful E2E job, this branch continues and the reporter posts… View resolved comment
High severity script/​e2e/​post-pr-summary.sh — The artifact is produced by candidate-controlled code that receives SOURCE_TOKEN and… View resolved comment

@isaevt
isaevt force-pushed the isaevt/e2e-pr-summary branch from cc10694 to 575efca Compare August 28, 2026 01:20

@dpmex4527 dpmex4527 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM! Sample workflow comment looks great.

Comment thread .github/workflows/e2e.yml
Comment on lines +11 to +13
# Permissions are granted per job. Candidate-controlled code must not receive a
# token capable of modifying pull requests.
permissions: {}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

❤️

stack merge was automatically disabled August 31, 2026 19:56

Pull Request is not mergeable

@isaevt
isaevt force-pushed the isaevt/e2e-pr-summary branch from 575efca to 09d4b3b Compare August 31, 2026 20:11
Base automatically changed from isaevt/ghes-lifecycle-e2e to main August 31, 2026 20:19
Discover the same-repository pull request associated with an E2E
candidate and post a compact, updatable results summary.

Keep candidate execution read-only and perform pull request updates in a
separate trusted reporting job. Recheck the pull request head before
posting, validate successful-run evidence, and map untrusted artifact
values to fixed labels before including them in the comment.

Continue running E2E normally when no matching pull request exists.
@isaevt
isaevt force-pushed the isaevt/e2e-pr-summary branch from 09d4b3b to ca1028c Compare August 31, 2026 20:19
@isaevt
isaevt merged commit be6cb1c into main Aug 31, 2026
14 checks passed
@isaevt
isaevt deleted the isaevt/e2e-pr-summary branch August 31, 2026 20:28
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