Skip to content

fix(release): carry plan-limited promotion approval rules into hotfix - #2009

Merged
gerchowl merged 11 commits into
release/1.18.2from
bugfix/1851-hotfix-promote-rules
Nov 3, 2026
Merged

gerchowl merged 11 commits into
release/1.18.2from
bugfix/1851-hotfix-promote-rules

Conversation

@gerchowl

@gerchowl gerchowl commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

Description

Carry the six reviewed #2002 commits into release/1.18.2 to fix promotion on plan-limited repositories. Ruleset requirements remain authoritative; only a recognized plan-limit 403 uses the configurable approval fallback. Count distinct, current-head approvals and keep retry diagnostics out of API responses.

Type of Change

  • fix -- Bug fix
  • test -- Adding or updating tests
  • ci -- CI/CD pipeline changes

Modifiers

  • Breaking change (!)

Changes Made

  • Cherry-pick with attribution, in order: f64c773136, 6456ab9844, 80dc0ab1bf, 2e9f2fff65, 048f98e005, f27d031bdb. Verified against gh pr view 2002 --json commits; no merge or sync commits carried.
  • Carry exactly four test-infrastructure files from 48ea8d5e: tests/github_expression.py, tests/workflow_replay.py, tests/test_github_expression.py, and tests/test_workflow_replay.py. Both implementations and the replay unit tests remain byte-identical to dev. Also carry the unchanged test-only CI prerequisite from d14b03fe: fetch tag 1.18.0 before replay tests in .github/actions/test-project/action.yml. No infrastructure changelog entries carried.
  • Omit exactly eight dev-only cases: test_shipped_workflows[False-fork], [False-same-repo], [False-push], [True-fork], [True-same-repo], [True-push], test_workflow_mutations[fork], and test_workflow_mutations[reusable]. They require dev-only runner-class outputs and fork routing absent from this release branch. They return when the next regular release from dev lands. The reusable mutation also raises the same ValueError without mutation on this branch, so it was vacuous; remove it and the now-unused traversal helper. Every helper-behavior test is retained; no conditional skips or synthetic dev fixtures.
  • Exclude DEVKIT_CI_LANE_SIZES when resolving the toolchain key-list conflict. Put the changelog under [1.18.2] - TBD and regenerate the .devcontainer mirror. Keep the consumer root changelog template as the blank skeleton required by its existing smoke-deploy tests.

Changelog Entry

The hotfix-specific brief requires [1.18.2] - TBD instead of Unreleased:

  • Promote releases on plan-limited private repositories (#1851)
    • Stop retrying only rulesets plan-limit HTTP 403 responses and require one approval by default in both promote gates.
    • Count distinct current-head approvals from each reviewer's latest APPROVED, CHANGES_REQUESTED, or DISMISSED review, ignoring COMMENTED and PENDING and excluding the PR author; keep host retry diagnostics out of API responses.
    • Add DEVKIT_RELEASE_REQUIRED_APPROVALS for the 403 fallback; solo consumers can set 0, while real ruleset requirements retain precedence.

Testing

Latest combined check: 434 passed, exit 0:

nix develop -c uv run --with pytest-xdist pytest tests/test_promote_rules_fallback.py tests/test_vig_os_manifest.py tests/test_scaffold_drift.py tests/test_promote_release.py tests/test_github_expression.py tests/test_workflow_replay.py tests/test_flake_pin_lockstep.py tests/test_install_direnv_host.py tests/test_changelog_unreleased_typos.py tests/test_release_time_changelog.py -n 2 --basetemp=$HOME/.cache/devkit-pytest/1851-carry-r4

Rebased onto d1888f82 (origin/release/1.18.2, including #2008). Preserve both carry entries under one ### Fixed list and regenerate the changelog mirror. All 16 checks are green on ce50566e792c05113421c052c635ba5ab67a6820, including Test Summary (CI run). gh pr checks 2009 --watch exited 0.

  • Targeted tests pass locally (364 passed, exit 0):
nix develop -c uv run --with pytest-xdist pytest tests/test_promote_rules_fallback.py tests/test_vig_os_manifest.py tests/test_scaffold_drift.py tests/test_promote_release.py tests/test_github_expression.py tests/test_workflow_replay.py -n 2 --basetemp=$HOME/.cache/devkit-pytest/1851-carry-r3
  • Pre-change proof: initial fallback/manifest tests produced 18 failures and 37 passes (exit 1) before implementation.
  • Before the authorized omissions, helper tests produced 7 dev-shape failures and 208 passes (exit 1).
  • Follow-up replay and scaffold-drift tests: 48 passed, exit 0 (nix develop -c uv run --with pytest-xdist pytest tests/test_scaffold_drift.py tests/test_workflow_replay.py -n 2 --basetemp=$HOME/.cache/devkit-pytest/1851-carry-r3-final).
  • Targeted BATS smoke-deploy checks: 3 passed, exit 0 (nix develop -c bats --filter 'smoke deploy (preserves|bootstraps)' tests/bats/init-workspace.bats).
  • Initial CI exposed release history in the consumer skeleton (BATS/integration) and the missing 1.18.0 tag prerequisite (project tests). Restore the blank skeleton and carry dev's tag-fetch step; both root causes are addressed without changing helper behavior.
  • git diff --check and byte comparison of both helper implementations against origin/dev: exit 0.
  • All commits made in nix develop with hooks enabled. Cherry-pick attribution retained above the final Refs: line as required by commit validation.

Manual Testing Details

Reviewed all carried runtime files against origin/dev; differences are release-baseline features intentionally outside this carry:

File Every remaining difference from dev
release-required-approvals.sh None; byte-identical.
promote-release.yml Existing legacy resolve runner variable and root sparse checkout; no .devkit-resolve path/working-directory or runner-class inputs/outputs; existing hosted downstream job runners. Approval behavior matches dev. These belong to #1860, #1863 and the runner-class changes.
setup-devkit-toolchain/action.yml Retry helper matches dev. Existing host Nix setup lacks dev's ambient configuration preservation/validation, credential masking, extended experimental features and collision-safe export delimiter (#1907).
resolve-toolchain/action.yml Approval knob logic matches dev. Existing resolver lacks dev's runner-class inputs/outputs/environment/context, lane handling, diagnostics and migration, plus sparse-checkout working-directory support (#1860, #1927 and runner-class work). No dev-only lane-size key carried.
.vig-os template Approval knob matches dev. Only existing runner documentation and omitted lane-size settings differ; #1856 is now in the base.
init-workspace.sh Approval knob read/preserve/write logic matches dev. Existing differences concern Rust tool configs, language seeding/preview/notices and Rust flake detection (#1496, #1831); untracked-upgrade preflight and shared gitignore helpers (#1826); managed security/commit documentation (#1910); runner-lane validation and legacy key/hook migration (#1927, #1929). #1856 is now in the base.

Checklist

  • My code follows the project's style guidelines
  • I have performed a self-review of my code
  • Documentation updated where required
  • CHANGELOG updated under the explicitly required hotfix section
  • Tests prove the fix and pass locally
  • Required test infrastructure included

Additional Notes

Target is release/1.18.2. No merge or release dispatch is part of this carry. Container and nix-eval suites are left to CI, as required by the carry brief. Isolated local pytest directories are removed after use.

Refs: #1851

@gerchowl
gerchowl requested a review from c-vigo as a code owner November 3, 2026 11:25
Carry unchanged helper files and their unit tests from 48ea8d5 for the hotfix approval regression tests.

Refs: #1851
Omit test_shipped_workflows[False-fork], [False-same-repo], [False-push], [True-fork], [True-same-repo], and [True-push], plus test_workflow_mutations[fork]. These seven cases require dev-only runner-class outputs and fork routing absent from release/1.18.2; they return with the next regular release from dev. Retain the workflow traversal as a helper for the existing reusable mutation case. Keep every helper-behaviour test and both helper implementations unchanged; add no conditional skips or synthetic dev fixtures.

Refs: #1851
Keep hotfix release history only in the root changelog and its generated devcontainer mirror. Restore the consumer template to its empty skeleton, as the existing smoke-deploy BATS and integration tests require.

Refs: #1851
Omit test_workflow_mutations[reusable] as the eighth dev-only case: the
release branch raises the same ValueError before applying its mutation,
so its pytest.raises assertion cannot verify the mutation. Remove the
now-unused workflow traversal helper without changing helper behavior tests.

The complete omitted set is test_shipped_workflows[False-fork],
test_shipped_workflows[False-same-repo], test_shipped_workflows[False-push],
test_shipped_workflows[True-fork], test_shipped_workflows[True-same-repo],
test_shipped_workflows[True-push], test_workflow_mutations[fork], and
test_workflow_mutations[reusable]. These require dev-only runner-class
outputs and fork routing absent from release/1.18.2. They return with the
next regular release from dev. Keep both helper implementations unchanged.

Refs: #1851
@gerchowl
gerchowl force-pushed the bugfix/1851-hotfix-promote-rules branch from 3c4ca2f to ce50566 Compare November 3, 2026 11:41
@gerchowl
gerchowl merged commit eaa108d into release/1.18.2 Nov 3, 2026
16 checks passed
@gerchowl
gerchowl deleted the bugfix/1851-hotfix-promote-rules branch November 3, 2026 11:47
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.

1 participant