Repository navigation
fix: advance lockstep release pins during hotfix upgrades - #2008
Merged
Merged
Conversation
10 of 11 tasks
gerchowl
added a commit
that referenced
this pull request
Nov 3, 2026
…#2009) ## 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 - [x] `fix` -- Bug fix - [x] `test` -- Adding or updating tests - [x] `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](#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: ```text 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](https://github.com/vig-os/devkit/actions/runs/41629525265)). `gh pr checks 2009 --watch` exited 0. - [x] Targeted tests pass locally (364 passed, exit 0): ```text 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 - [x] My code follows the project's style guidelines - [x] I have performed a self-review of my code - [x] Documentation updated where required - [x] CHANGELOG updated under the explicitly required hotfix section - [x] Tests prove the fix and pass locally - [x] 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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Carry #1856 / PR #1988 into the 1.18.2 hotfix. A target installer now advances release pins that matched the consumer's previous version, recognizes qualified and v-prefixed refs, and reports retained-pin mismatches with advice that respects opt-out.
Targets
release/1.18.2; no merge or release dispatch is requested.Type of Change
feat-- New featurefix-- Bug fixdocs-- Documentation onlychore-- Maintenance task (deps, config, etc.)refactor-- Code restructuring (no behavior change)test-- Adding or updating testsci-- CI/CD pipeline changesbuild-- Build system or dependency changesrevert-- Reverts a previous commitstyle-- Code style (formatting, whitespace)Modifiers
!) -- This change breaks backward compatibilityChanges Made
seed; Fixed, Changed and migration entries are under[1.18.2] - TBD. The sync-manifest hook regenerates the workspace mirror.Changelog Entry
Changed
DEVKIT_FLAKE_PIN_ADVANCE=false.Fixed
refs/tags/, and report removal of a leadingvto use published bare tags.DEVKIT_FLAKE_PIN_ADVANCE=falseto opt out and align pins manually; see the migration note.Testing
Commands ran inside
nix develop:uv run --with pytest-xdist pytest tests/test_install_direnv_host.py tests/test_flake_pin_lockstep.py -n 2 --basetemp=$HOME/.cache/devkit-pytest/1856-carry-final: 35 passed, exit 0.uv run --with pytest-xdist pytest tests/test_utils.py::TestInstallScriptUnit -n 2 --basetemp=$HOME/.cache/devkit-pytest/1856-carry-unit: 3 passed, exit 0.bats tests/bats/install.bats: 107 passed, exit 0.git diff --checkpassed. Full suites are delegated to PR CI.just test)Manual Testing Details
Compared every carried file with
origin/devusinggit diff:install.sh: the entire post-initialization section, including policy, normalization, rollback and warnings, is byte-identical. Earlier differences retain 1.18.1 container scaffolding, version resolution, preflight and environment forwarding rather than importing direnv mode: install.sh and devkit-upgrade.yml still require docker/podman to scaffold or upgrade #1871/Upgrade preflight: untracked build output blocks the upgrade that would add its .gitignore fragment #1826 and runner migrations.assets/init-workspace.sh: the pin-knob preservation change matches dev; remaining differences are existing Rust config seeding / pack support, untracked-file preflight, gitignore rendering, runner lane validation/migration and extension-hook reconciliation.assets/workspace/.github/workflows/ci.yml: lockstep normalization matches dev; existing runner selection, checkout paths and container-based drift checks stay on the release baseline.assets/workspace/.vig-os: pin-policy documentation matches dev; existing runner documentation and absence of lane-size settings remain from the release baseline.docs/DOWNSTREAM_RELEASE.mdand its workspace mirror: upgrade-policy prose matches dev; only the existing runner-json contract differs.docs/MIGRATION.md: the devkit-upgrade: commit step runs the NEW hook config inside the OLD project shell, so newly-added hooks cannot spawn #1856 migration section is byte-identical; remaining differences retain release-baseline runner contracts/migration guidance, manifest and language descriptions, shell/env guidance, preflight behavior, and absence of the dev-only site-leak hook.tests/test_flake_pin_lockstep.py: byte-identical to dev.tests/bats/install.bats: carried assertions match dev; existing preflight tests remain, fixture modes use direnv through the hotfix container path rather than dev's both mode, and dry-run targets retain the baseline behavior.tests/test_install_direnv_host.py: all policy decorators, function code and assertions match dev as an AST. Only minimal harness helpers are carried; unrelated dev host-scaffolding and migration tests are absent. The runtime stand-in replaces dev's Nix metadata/develop replay and records unexpected calls.Checklist
docs/templates/, then runjust docs)CHANGELOG.mdin[1.18.2] - TBDper the hotfix brief (entry above)Additional Notes
The brief explicitly overrides the generic dev-base and Unreleased instructions for this hotfix carry.
Refs: #1856