Skip to content

D4.5 and D5.2 together imply a failed push is unrecoverable after the tip moves, and never consider Re-run all jobs #1214

Closed

Description

@ptr727

D4.5 says the recovery for a failed package push is a re-dispatch, and that it repairs the failed version only while the branch tip has not moved. D5.2 separately rules out GitHub's Re-run failed jobs, because the package build artifact was already deleted under the download-success gate, so the re-run's download finds nothing.

Between them the two items conclude that a failed push whose branch tip has since moved is unrecoverable. A third route exists and neither item reaches it.

The route

GitHub's Re-run all jobs replays the workflow at the run's original github.sha, with the original event and inputs, rather than at the branch's current tip. For the dispatch-only publisher that means:

  • publish-release.yml re-runs with github.sha equal to the commit the failed run built, not the new tip.
  • get-version therefore computes the same NBGV version, since git height is taken at that commit.
  • The build leaf rebuilds the package from scratch, so the artifact D5.2 deleted is regenerated rather than downloaded.
  • publish-<target> pushes that same version again.

That is precisely the case D4.5 currently describes as beyond repair, and the difference from Re-run failed jobs is the whole point: the failed-jobs variant reuses the deleted artifact and fails at the download, while the all-jobs variant rebuilds it.

Why the contract does not reach it

D5.2 names only "Re-run failed jobs" and reasons from the deleted artifact. D4.5 says "The recovery is a re-dispatch rather than a cleanup", a definite article that forecloses a third option without having considered it. Neither item distinguishes the two re-run variants, and a maintainer reading either one concludes that a moved tip means the version is lost.

What needs deciding

This is a contract question rather than a wording fix, and it splits three ways:

  1. The route works and should be documented. D4.5 gains it as the recovery for the moved-tip case, D5.2 narrows its exclusion to the failed-jobs variant explicitly, and the condensed copies of both follow.
  2. The route works but is deliberately not offered, for example because a full re-run also re-runs the release-create leg and the fleet prefers a single documented recovery. Then D4.5 says so, rather than implying the case is unrecoverable.
  3. The route does not work for a reason not yet identified, in which case D4.5 is right and should say why, since the obvious objection is one an operator will reach for.

Option 1 or 2 wants the reason recorded either way. The claim in option 3 has not been tested against a real failed run, and this issue does not assert it either way.

Verification owed before acting

A live check is the honest way to settle this: take a run whose publish-<target> job failed, advance the branch, then Re-run all jobs and confirm whether the rebuilt package carries the original version. That is a real publish against a real registry, so it is the maintainer's to run rather than an agent's, per WORKFLOW.md 5C's own carve-out for outward-facing probes.

Related

Found by an adversarial diff pass on #1213, which fixed D4.5's separate defect of naming a re-dispatch "of the same commit" that workflow_dispatch cannot express. Related to #1200 and #1212, which carry the other section 4 and condensed-catalog defects, and to #1201, which records that no part of section 5 checks D4.5 at all, so nothing would catch this today.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions