Skip to content

fix(nix): stage nix/lib.nix instead of removed per-package hash files - #39459

Closed
liuhao1024 wants to merge 2 commits into
NousResearch:mainfrom
liuhao1024:fix/nix-lockfile-workflow-lib
Closed

fix(nix): stage nix/lib.nix instead of removed per-package hash files#39459
liuhao1024 wants to merge 2 commits into
NousResearch:mainfrom
liuhao1024:fix/nix-lockfile-workflow-lib

Conversation

@liuhao1024

Copy link
Copy Markdown
Contributor

What does this PR do?

Updates the nix-lockfile-fix.yml workflow to stage nix/lib.nix instead of the removed per-package hash files (nix/tui.nix, nix/web.nix). After the workspace lockfile consolidation in a51a7b9, the workflow can never commit its computed hash update.

Related Issue

Fixes #39455

Type of Change

  • 🐛 Bug fix (non-breaking change that fixes an issue)

Changes Made

  • .github/workflows/nix-lockfile-fix.yml: Update the file-whitelist guard regex from ^nix/(tui|web)\.nix$ to ^nix/lib\.nix$, and change git add in both the auto-fix-main and fix jobs from nix/tui.nix nix/web.nix to nix/lib.nix.

How to Test

  1. Verify that fix-lockfiles writes to nix/lib.nix (not nix/tui.nix or nix/web.nix): nix run .#fix-lockfiles -- --apply and check git diff --name-only.
  2. Verify the guard regex matches: echo "nix/lib.nix" | grep -E '^nix/lib\.nix$' should match.
  3. Verify the old files are no longer staged: the workflow should only commit nix/lib.nix.

Checklist

Code

  • I've read the Contributing Guide
  • My commit messages follow Conventional Commits (fix(scope):, feat(scope):, etc.)
  • I searched for existing PRs to make sure this isn't a duplicate
  • My PR contains only changes related to this fix/feature (no unrelated commits)
  • I've run pytest tests/ -q and all tests pass
  • I've added tests for my changes (required for bug fixes, strongly encouraged for features)
  • I've tested on my platform: macOS

Documentation & Housekeeping

  • I've updated relevant documentation (README, docs/, docstrings) — or N/A
  • I've updated cli-config.yaml.example if I added/changed config keys — or N/A
  • I've updated CONTRIBUTING.md or AGENTS.md if I changed architecture or workflows — or N/A
  • I've considered cross-platform impact (Windows, macOS) per the compatibility guide — or N/A
  • I've updated tool descriptions/schemas if I changed tool behavior — or N/A

Code Intelligence

⚠️ GitNexus unavailable — grep-based fallback used.

  • Checked files: .github/workflows/nix-lockfile-fix.yml, nix/lib.nix, nix/tui.nix, nix/web.nix
  • Blast radius: LOW — single CI workflow file, no code changes
  • Related patterns: a51a7b9 (consolidation commit), ba57ebec3 (hash bump)

The nix-lockfile-fix.yml workflow still references nix/tui.nix and
nix/web.nix, but commit a51a7b9 consolidated the npmDepsHash into
nix/lib.nix.  This means:

- The file-whitelist guard flags nix/lib.nix as unexpected and aborts
- git add stages nothing (tui.nix and web.nix are unchanged)
- The auto-fix and PR-fix jobs can never commit their hash update

Update both jobs to stage nix/lib.nix and adjust the guard regex
to allow only nix/lib.nix through.

Fixes NousResearch#39455
@alt-glitch alt-glitch added type/bug Something isn't working P2 Medium — degraded but workaround exists area/nix Nix flake, NixOS module, container packaging labels Jun 5, 2026
@teknium1

Copy link
Copy Markdown
Contributor

Thanks for the focused fix. This is an automated hermes-sweeper review.

@teknium1 teknium1 closed this Jul 14, 2026
@teknium1 teknium1 added the sweeper:implemented-on-main Sweeper: behavior already present on current main label Jul 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/nix Nix flake, NixOS module, container packaging P2 Medium — degraded but workaround exists sweeper:implemented-on-main Sweeper: behavior already present on current main type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

nix-lockfile-fix.yml can never commit its hash update — stages nix/tui.nix + nix/web.nix, but fix-lockfiles writes nix/lib.nix

3 participants