Skip to content

Run the legacy lane in this repository - #5

Merged
Marius Storhaug (MariusStorhaug) merged 1 commit into
mainfrom
legacy-same-repo
Dec 1, 2026
Merged

Marius Storhaug (MariusStorhaug) merged 1 commit into
mainfrom
legacy-same-repo

Conversation

@MariusStorhaug

Copy link
Copy Markdown
Member

Moves the legacy (v2.0.3, 750abed) write lane from the unprovisioned Release-GHRepository-Test-Legacy repository into this repository, so upgrade changes can be tracked here.

  • Routing: a case whose candidate is the legacy SHA runs only in Legacy-Release-Test.yml. The candidate lane skips it.
  • The legacy lane now shares the candidate concurrency group and inventory. Gate calculates the expected tag (latest stable + 1 patch, or v0.0.1). Verify expects exactly that tag at the squash.
  • Jobs run only when Select returns a legacy case. contents: write stays in Publish.
  • README: same-repo lane, serialization rule, and an "Upgrade tracking" table (legacy vs candidate).

Tests: 67 pass locally (lane, routing, expected-tag gate, baseline). No live write case was dispatched. Hosted write behavior is not yet verified.

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.

🔵 Needs a closer look

Legacy publication now writes to shared release/tag inventory, but a controlled hosted run is needed to verify token-backed pushes, exact squash targeting, and cross-workflow serialization.

No open issues 🎉

What changed in this PR

Moves the legacy v2.0.3 release lane into this repository so legacy and candidate behavior can be tracked against a shared release inventory.

Changes:

  • Routes legacy-pinned cases exclusively to the legacy workflow and shares the candidate lane’s concurrency group.
  • Replaces the empty-inventory gate with expected-tag calculation and verification at the squash commit.
  • Updates routing and gate tests, plus documentation for same-repository operation and upgrade comparisons.

Hosted write behavior remains unverified; no live write case was dispatched.

File Description
tests/​ReleaseCase.Tests.ps1 Tests that the candidate lane skips legacy-pinned cases.
tests/​ReleaseCase.psm1 Excludes legacy-pinned cases from candidate selection.
tests/​LegacyCase.Tests.ps1 Updates repository guards and tests routing, expected tags, and workflow conditions.
tests/​LegacyCase.psm1 Adds legacy routing detection and expected-tag calculation for shared inventory.
tests/​Invoke-LegacyFixture.ps1 Routes cases and passes the expected tag from gating to verification.
README.md Documents shared-repository operation, serialization, and upgrade comparisons.
.github/​workflows/​Legacy-Release-Test.yml Enables the local legacy lane with shared concurrency and conditional jobs.

Review effort: Balanced

@MariusStorhaug
Marius Storhaug (MariusStorhaug) marked this pull request as ready for review November 30, 2026 23:53
@MariusStorhaug
Marius Storhaug (MariusStorhaug) merged commit d1a3757 into main Dec 1, 2026
8 checks passed
@MariusStorhaug
Marius Storhaug (MariusStorhaug) deleted the legacy-same-repo branch December 1, 2026 00:01
Marius Storhaug (MariusStorhaug) added a commit to PSModule/Release-GHRepository that referenced this pull request Dec 2, 2026
Maintainers can run one comparison from the action repository's `main`
branch. It verifies a release with published v2.0.3 before it opens a
fixture case for the exact candidate SHA. This change affects only the
fixture test harness.

<!-- ANNOUNCEMENT STOP -->

## Internal: Fixture tests compare the published baseline with a
candidate

The pair uses one initially empty fixture repository. It tests the same
`one-step` scenario with `release:patch` twice. The first release must
be `v0.0.1`. The candidate must add one patch, and each tag must point
to its own squash commit. The comparison does not cover the staged
handoff or the intentional CI failure case.

Run the pair once before the candidate action pull request merges. Keep
the two fixture releases as evidence. Use the ordinary `Fixture Test`
workflow for later integration cases.

<details>
<summary>Migration guide</summary>

Merge this pull request first. Open [Fixture Pair
Test](https://github.com/PSModule/Release-GHRepository/actions/workflows/Fixture-Pair-Test.yml)
in `PSModule/Release-GHRepository`. Select **Run workflow** and branch
`main` for each step. The workflow runs only on producer `main`.

Make sure the fixture has no releases, tags, or open fixture cases. Make
sure Shelly has access to the fixture and the `release:patch` label
exists. Do not update the case branches or merge other fixture pull
requests during the comparison.

1. Dispatch `start-legacy` with no pull request numbers. Find the
fixture pull request in the job summary. Use normal independent review
and squash merge.
2. Wait for the successful legacy report. Dispatch `start-candidate`
with the open producer pull request number (`candidate_pr`) and the
merged legacy fixture pull request number (`legacy_pr`). For the first
comparison, keep #109 open.
3. Wait for the `start-candidate` run to verify the open fixture case.
Use normal independent review and squash merge on that fixture pull
request.
4. Dispatch `compare` with `legacy_pr` and `candidate_fixture_pr`. Check
the job summary for the exact action SHAs, run links, squash commits,
and tag results.

If a start run fails at the label step, find the open fixture pull
request in the job summary. Close it without a merge before you retry
the start step.

</details>

<details>
<summary>Technical details</summary>

- The producer checks out its trusted workflow commit. It resolves the
open same-repository candidate pull request without checking out or
running candidate code.
- The driver verifies the fixture repository name, ID, and default
branch. Each start job requests a write token for the fixture repository
only. `compare` uses a read-only token.
- The candidate gate requires the exact v2.0.3 report and a stable
`v0.0.1` tag at the legacy squash. The original case and its squash must
have the same parent. The fixture `main` and inventory must still match
the legacy result.
- The final comparison binds both reports to their exact sources. It
checks the tag targets, the patch increment, and that the candidate
squash directly follows the legacy squash.
- All 66 credential-free driver tests pass locally. The added tests
cover a legacy squash on a changed base and an open pull request left by
a failed label request. The [fixture's v2.0.3 baseline
check](https://github.com/PSModule/Release-GHRepository-Test/actions/runs/46539940401)
passed without publication. No live pair has run.
- The producer `Release` workflow only processes changes to `action.yml`
or `src/`. This PR changes neither path. The scope check found no other
open issue that this PR closes.

| Changed surface | Standards checked | Framework docs checked | Result
|
| --- | --- | --- | --- |
| Driver and regression tests | PowerShell, Testing | [GitHub REST Git
commits](https://docs.github.com/en/rest/git/commits#get-a-commit) |
Detects drift before the legacy squash |
| Fixture workflows | GitHub Actions, YAML | [GitHub manual
dispatch](https://docs.github.com/en/actions/how-tos/manage-workflow-runs/manually-run-a-workflow)
| Runs only from producer `main` |
| Operator guide | Technical Writing Guide | The merged fixture contract
| Gives the three dispatches in order |

</details>

<details>
<summary>Related links</summary>

- Follows #122.
- Depends on PSModule/Release-GHRepository-Test#5.
- References #109 as the first action
candidate.

</details>
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