Fix #39455: Update nix-lockfile-fix.yml to stage nix/lib.nix - #41004
Closed
iamlukethedev wants to merge 1 commit into
Closed
Fix #39455: Update nix-lockfile-fix.yml to stage nix/lib.nix#41004iamlukethedev wants to merge 1 commit into
iamlukethedev wants to merge 1 commit into
Conversation
…nix (not tui/web) Fixes NousResearch#39455: The nix-lockfile-fix.yml workflow can never commit its hash update because it stages the pre-refactor per-package hash files (nix/tui.nix, nix/web.nix), but fix-lockfiles now writes the consolidated single hash in nix/lib.nix. PROBLEM: - Workflow runs: nix run .#fix-lockfiles (which edits nix/lib.nix) - Guard checks: git diff shows only nix/(tui|web).nix changes - Result: guard flags nix/lib.nix as unexpected → job errors - Staging: git add nix/tui.nix nix/web.nix stages nothing (files unchanged) - Net: no commit, auto-fix fails, PRs with stale npmDepsHash get stuck SOLUTION: - Update both jobs (auto-fix-main and fix) to stage nix/lib.nix instead - Update guard regex from '^nix/(tui|web)\.nix$' to '^nix/lib\.nix$' - Now the guard passes and the file is actually committed IMPACT: - ✅ nix-lockfile-fix can now auto-heal stale npmDepsHash on main - ✅ PR lockfile refresh jobs are no longer stuck - ✅ Security audits blocking on React/npm issues can be resolved automatically - ✅ Required nix check can pass on contributor PRs Changes: - Line 80: Updated unexpected files guard pattern - Line 92: Changed git add to nix/lib.nix - Line 219: Changed git add to nix/lib.nix Fixes NousResearch#39455
Contributor
|
Thanks for identifying the old staging mismatch. This is now superseded by a later Nix refactor. Automated hermes-sweeper review found:
Closing as implemented on main. |
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.
Fixes #39455: The nix-lockfile-fix.yml workflow can never commit its hash update because it stages the pre-refactor per-package hash files (nix/tui.nix, nix/web.nix), but fix-lockfiles now writes the consolidated single hash in nix/lib.nix.
Problem
nix run .#fix-lockfiles(which edits nix/lib.nix)Solution
Update both jobs (auto-fix-main and fix) to stage nix/lib.nix instead:
^nix/(tui|web)\.nix$→^nix/lib\.nix$git add nix/tui.nix nix/web.nix→git add nix/lib.nixfixjobImpact
This is a simple 3-line fix that restores the intended auto-fix workflow.