Skip to content

test: validate retarget reporting lifecycle - #1162

Closed
piotr-iohk wants to merge 7 commits into
masterfrom
ci/ios-retarget-probe-01a1835c
Closed

piotr-iohk wants to merge 7 commits into
masterfrom
ci/ios-retarget-probe-01a1835c

Conversation

@piotr-iohk

@piotr-iohk piotr-iohk commented Oct 28, 2026 •

Copy link
Copy Markdown
Collaborator

Temporary validation fixture for #1161. It uses the production reporter at f7bc57c plus a probe-only helper adapter to select proposed workflow definitions before merge. This PR will be closed after validation.

Description

  • Isolates negative controls and native retarget routing from the fix PR.

Design

N/A — no UI changes.

Preview

N/A

QA Notes

Setup

Temporary parent-to-master retarget, using workflow definitions on the probe branch through the fixture adapter.

Journeys

N/A — no user-visible behaviour change.

Manual Tests

  • 1. Native retarget → required E2E and integration checks are queued/running, never fake skipped outcomes — GitHub controls are not in Capabilities.
  • 2. Metadata-only edit → no new E2E/integration run or required-check copy — GitHub controls are not in Capabilities.

Automated Checks

Production reporter: 25 regression tests and actionlint pass, recorded in #1161.

Evidence

Native pull_request helper 40742671425 dispatched E2E 40742705214 and integration 40742708445. The PR required-check list showed queued e2e-status 123008197780 and Run Integration Tests 123008202069, with no skipped required copies.

Isolated closed-check probe 40742192584 requested fresh helper 40742226481, which created new checks 123006673796 and 123006677249 and dispatched both suites. The original closed failure was preserved. That earlier skip-CI fixture supplied API-level evidence; the subsequent native retarget above supplied PR-display evidence.

This description update exercises metadata-only behavior before cleanup.

Gaps

This fixture verifies routing/reporting, not wallet-test success. Probe runs will be cancelled and this PR closed after validation.

Models used

  • Planning/scoping: gpt-6.1-sol (reasoning: high)
  • Implementation: gpt-6.1-sol (reasoning: high)
  • Review: gpt-6.1-sol (reasoning: high)

@piotr-iohk
piotr-iohk marked this pull request as ready for review October 28, 2026 18:04
@piotr-iohk
piotr-iohk changed the base branch from master to ci/retarget-probe-parent-01a1835c October 28, 2026 18:09
@piotr-iohk
piotr-iohk changed the base branch from ci/retarget-probe-parent-01a1835c to master October 28, 2026 18:10
@piotr-iohk piotr-iohk closed this Oct 28, 2026
@piotr-iohk
piotr-iohk deleted the ci/ios-retarget-probe-01a1835c branch October 28, 2026 18:14

@talosmachina talosmachina left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

No findings. Moves retarget validation from re-running the test workflows on the PR head to a dispatcher. It creates pending e2e-status and Run Integration Tests checks on the PR head, waits until it has a merge commit verified against the new base, dispatches both suites from master pinned to that commit, and lets each suite report back only to the check it owns. Reviewed 0e589f1, full tier (CI workflow files). Its tree is identical to #1161 at f7bc57c, so this also covers the three commits after 53fa8ef, the head I reviewed on #1161.

Static review: talos-pr-run refused to run retarget-tests.test.cjs here because it could not confirm the author's permission, so the node tests were not run by me. This head is [skip ci] and has no runs yet.

What I checked, and 7 candidates I ruled out

Read in full: retarget-tests.cjs, e2e-retarget.yml, e2e-tests.yml and integration-tests.yml at the head, and the triggers of every other workflow.
Ruleset: master requires Run Integration Tests, Run Tests, SwiftFormat and e2e-status, all from integration 15368 (GitHub Actions). Check runs that github-script creates with the job token are attributed to that app, so the dispatcher's checks can satisfy the rule. unit-tests.yml and lint.yml have no branches filter, so Run Tests and SwiftFormat already exist on a stacked head. The two suites this PR routes are the only required ones a retarget leaves missing.

Ruled out

  • Retarget steps leak into normal runs: on pull_request the inputs context is null, and null != '' is false in Actions expressions, because both coerce to 0. Every inputs.retarget_run != '' step and both report-retarget-result jobs skip, and checkout gets ref: '', the default.
  • Stale merge candidate after a base change: the dispatcher accepts merge_commit_sha only when parent 0 is pr.base.sha and parent 1 is the head. The reporter re-checks parent 1 against the head it reports.
  • Push during a retarget run: the new integration-tests-<pr> and e2e-tests-<pr> groups let the synchronize run cancel the dispatched one. Its always() reporter sees the head moved and leaves the old head's check alone. The new head gets checks from its own pull_request run.
  • Re-running a completed child run: a completed check cannot reopen. The start phase dispatches a fresh e2e-retarget and fails the job, and the complete phase returns early on a completed check, so the old conclusion is never overwritten. actions: write is granted on every job that can take that path.
  • Older generation overwrites a newer check: the reporter matches external_id retarget:<run>-<attempt>:<name>, the check name and the head before updating, and it only ever updates the check id it was handed.
  • New job-level permissions break the build: master sets none, so the jobs ran on the default token, which never includes id-token. namespace-stack.sh (nsc) and the swift-packages action work without it today, and GITHUB_TOKEN keeps contents and packages read.
  • Code from a same-repo PR runs with checks: write: the edited path is gated to the head repo and a non-draft PR. The manual path rejects a fork head in the script. Both are reachable only by someone with write already, as with the dispatcher on master.

Not proven, so not posted: the dispatcher polls for a verified merge commit for about 20 s (10 x 2 s). A slower mergeability computation fails both checks, and recovery then goes through the manual dispatch. I have no run that shows GitHub taking longer than that.

Merge confidence: 4/5, a change to two required checks whose unit tests I could not run and that has no live run on this head yet.

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.

2 participants