Skip to content

Automate deterministic release fixture testing - #125

Open
Marius Storhaug (MariusStorhaug) wants to merge 11 commits into
mainfrom
deterministic-fixture-automation
Open

Marius Storhaug (MariusStorhaug) wants to merge 11 commits into
mainfrom
deterministic-fixture-automation

Conversation

@MariusStorhaug

Copy link
Copy Markdown
Member

Summary

Adds deterministic, automated fixture testing of the release action against the static test repository PSModule/Release-GHRepository-Test. It needs no per-run approval and no inference. It is separate from #109 and lands before it.

  • Adds the run-pair, run-legacy and one-dispatch Fixture Test lanes. They merge fixture pull requests with the scoped Shelly token and an exact head SHA. Candidate code never receives that token.
  • Binds pre-merge evidence to Release-Test.yml runs for the exact PR, head and branch. It reads check runs anonymously with GET only and a bounded poll budget.
  • Adds the producer-owned fixture seed at fixtures/release-fixture/seed, copied from fixture main d1a37576. A preflight rejects missing or drifted trusted files before a write and before a merge, including a resumed case.
  • Adds the acceptance spec docs/Fixture-Acceptance-Spec.md and updates docs/Fixture-Test.md.

Not in this change

No producer release behavior change, no change to #109, no fixture dispatch, and no fixture setting change. Fixture PR 6 is untouched.

Verification

  • Pester: 140 passed, 0 failed (yq 4.54.3).
  • PSScriptAnalyzer: 0 findings.
  • Live read-only seed parity at fixture main d1a37576: passed.

@MariusStorhaug
Marius Storhaug (MariusStorhaug) marked this pull request as ready for review December 2, 2026 13:19
Copilot AI balanced review requested due to automatic review settings December 2, 2026 13:19

Copilot AI 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.

🔵 Needs a closer look

The unattended merge paths depend on a fixture-only ruleset bypass that is not yet authorized, requiring owner verification of its scope and a live merge/report run beyond mocked tests.

No open issues 🎉

What changed in this PR

Automates release fixture orchestration in the static test repository, independently of #109, without changing production release behavior.

Changes:

  • Adds single-dispatch scenario, legacy, and paired runs with head-bound merges and bounded evidence polling.
  • Versions the trusted fixture seed and checks for drift before case creation and merging.
  • Expands tests and documents setup, recovery, and the remaining automatic-matrix work.
File Description
tests/​ReleaseFixturePair.Tests.ps1 Adds seed-aware pair mocks.
tests/​ReleaseFixtureMerge.Tests.ps1 Tests merge gates, orchestration, and anonymous reads.
tests/​ReleaseFixture.Tests.ps1 Tests seed parity and drift rejection.
tests/​Get-TestSeedTree.ps1 Builds mock seed tree responses.
fixtures/​release-fixture/​seed/​tests/​ReleaseInventory.Tests.ps1 Seeds inventory assertion tests.
fixtures/​release-fixture/​seed/​tests/​ReleaseInventory.psm1 Seeds release and tag verification.
fixtures/​release-fixture/​seed/​tests/​ReleaseCase.Tests.ps1 Seeds candidate case-selection tests.
fixtures/​release-fixture/​seed/​tests/​ReleaseCase.psm1 Seeds candidate case validation.
fixtures/​release-fixture/​seed/​tests/​LegacyCase.Tests.ps1 Seeds legacy guard and workflow tests.
fixtures/​release-fixture/​seed/​tests/​LegacyCase.psm1 Seeds legacy validation and tag expectations.
fixtures/​release-fixture/​seed/​tests/​Invoke-ReleaseFixture.ps1 Seeds candidate preparation and reporting.
fixtures/​release-fixture/​seed/​tests/​Invoke-LegacyFixture.ps1 Seeds legacy publication gates and reporting.
fixtures/​release-fixture/​seed/​tests/​FixtureContract.json Seeds scenario-to-label mappings.
fixtures/​release-fixture/​seed/​tests-baseline/​LegacyBaseline.Tests.ps1 Seeds pinned legacy behavior tests.
fixtures/​release-fixture/​seed/​tests-baseline/​LegacyAction.psm1 Seeds simulated legacy execution helpers.
fixtures/​release-fixture/​seed/​.github/​workflows/​Release-Test.yml Seeds candidate integration workflow.
fixtures/​release-fixture/​seed/​.github/​workflows/​Legacy-Release-Test.yml Seeds legacy integration workflow.
fixtures/​release-fixture/​seed/​.github/​workflows/​Legacy-Baseline.yml Seeds baseline simulation and preview workflow.
docs/​Fixture-Test.md Documents automated lanes and prerequisites.
docs/​Fixture-Acceptance-Spec.md Records acceptance goals and implementation gaps.
.github/​workflows/​Linter.yml Excludes byte-preserved seed files.
.github/​workflows/​Fixture-Test.yml Runs a scenario through completion.
.github/​workflows/​Fixture-Pair-Test.yml Adds automated pair and legacy modes.
.github/​workflows/​Fixture-Driver-Test.yml Includes merge tests in CI.
.github/​scripts/​ReleaseFixture.psm1 Adds seed checks, evidence gates, and orchestration.
.github/​scripts/​Invoke-ReleaseFixture.ps1 Exposes new modes and summaries.
.gitattributes Preserves exact fixture seed bytes.

Review effort: Balanced

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants