fix(github): give an e2e explore run its own pull request comment

Merged
OK
18d ago
+62-4

A job that runs e2e run and then e2e explore with the github() reporter loses its test results comment: both runs derive the same marker (project, workflow, job, key), so the exploration's page replaces the tests' page.

  • packages/github/src/reporter.ts: an exploration's marker gains kind=explore. A test run's marker is unchanged, so comments already on open pull requests are still found and updated.
  • packages/github/src/merge.ts: foldLastRun ignores a run before that was an exploration, so a --last-failed rerun never folds an exploration's result into the test comment.
  • docs/github.mdx gets an "Explorations" section: give e2e explore its own --output in a shared job, since it otherwise replaces the test run's results/ and the test comment's evidence links break.
  • Changeset notes the one transition cost: an exploration comment posted by an older version stops updating.

Verified

Ran it locally: yes

  • testbed bug garden with a scratch config using the built github() reporter, GitHub Actions env vars set, and GITHUB_API_URL pointed at a local fake GitHub API that logs every comment write. Sequence: e2e run, e2e explore --max-steps 1, then both again.
mainthis branch
POST 1 project=dev.e2e.verify workflow=e2e job=test 路 馃煝 e2e: 1 passedPOST 1 project=dev.e2e.verify workflow=e2e job=test 路 馃煝 e2e: 1 passed
PATCH 1 project=dev.e2e.verify workflow=e2e job=test 路 馃敶 e2e explore: 1 issue (tests comment overwritten)POST 2 ... job=test kind=explore 路 馃敶 e2e explore: 1 issue
rerun: PATCH 1 tests, PATCH 2 explore, each in place

Nothing was posted to a real pull request.