nix: automatic lockfile fixing to keep main building with nix#13136
Merged
Conversation
4ce7229 to
5fdd849
Compare
67688d9 to
3225143
Compare
This reverts commit 688c9f5.
Closed
5 tasks
ulasbilgen
pushed a commit
to ulasbilgen/hermes-adhd-agent
that referenced
this pull request
May 1, 2026
…search#13136) * ci(nix): automatic lockfile fixing to keep main building This reverts commit ee9f9ec. * update lockfiles
aj-nt
pushed a commit
to aj-nt/hermes-agent
that referenced
this pull request
May 1, 2026
…search#13136) * ci(nix): automatic lockfile fixing to keep main building This reverts commit ef34b34. * update lockfiles
Luminet2023
pushed a commit
to Luminet2023/hermes-agent
that referenced
this pull request
May 1, 2026
…search#13136) * ci(nix): automatic lockfile fixing to keep main building This reverts commit 688c9f5. * update lockfiles
02356abc
pushed a commit
to 02356abc/hermes-agent
that referenced
this pull request
May 14, 2026
…search#13136) * ci(nix): automatic lockfile fixing to keep main building This reverts commit 688c9f5. * update lockfiles
gweeteve
pushed a commit
to gweeteve/hermes-agent
that referenced
this pull request
Jun 2, 2026
…search#13136) * ci(nix): automatic lockfile fixing to keep main building This reverts commit 688c9f5. * update lockfiles
Egavasyug
pushed a commit
to Egavasyug/hermes-agent
that referenced
this pull request
Jun 10, 2026
…search#13136) * ci(nix): automatic lockfile fixing to keep main building This reverts commit 672d983. * update lockfiles
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.
What does this PR do?
Adds tooling to keep nix builds working on main seamlessly.
Factors the npm-lockfile tooling shared between nix/tui.nix and nix/web.nix into a reusable
nix/lib.nix, and adds a CI lane that detects stale fetchNpmDeps hashes on PRs and lets a
maintainer apply the fix with one click.
Each npm-backed package (tui, web) now exposes
passthru.npmLockfile = { attr; folder; nixFile; }, and a new top-level.#fix-lockfilesaggregates them into a single --check / --apply script.Adding a third npm workspace is "callPackage + set passthru + add to the list" — no workflow
edits.
Type of Change
Changes Made
nix/lib.nix(new) — mkUpdateLockfileScript, mkNpmDevShellHook, mkFixLockfiles. The devshellhook now hashes package.json + package-lock.json in bash at shell-entry time and re-stamps after
install so a lockfile npm rewrites still matches.
nix/tui.nix,nix/web.nix— use the lib helpers; expose passthru.npmLockfile metadata.nix/packages.nix— wire hermesNpmLib; add packages.fix-lockfiles built from [ hermesTuihermesWeb ].
nix/devShell.nix— include hermes-web so its devshell hook runs too..github/workflows/nix-lockfile-check.yml(new) — on PR, nix run .#fix-lockfiles -- --check; ifstale, post a sticky comment with a
- [ ] **Apply lockfile fix**task-list checkbox plus amanual dispatch link.
.github/workflows/nix-lockfile-fix.yml(new) — triggers on workflow_dispatch orissue_comment.edited when that checkbox flips; verifies the actor has write access via
getCollaboratorPermissionLevel, resolves the PR head, runs --apply, commits, and pushes.
How to Test
nix flake check --no-buildworksnix run .#fix-lockfiles -- --checkexits 0 on a clean tree; exits 1 and prints a diff-stylereport if a lockfile hash is stale.
nix/web.nixto bogushash = "", thennix run .#fix-lockfiles -- --applyrewrites the hash and re-verifies.nix develop:.nix-stamps/hermes-tuiand.nix-stamps/hermes-webare created/updated based onthe bash-computed hash, re-run is a no-op when lockfiles haven't changed.
ui-tui/package-lock.json, the check workflow posts a sticky comment;ticking the checkbox triggers the fix workflow which pushes a
fix(nix): refresh npm lockfile hashescommit to the PR branch.Checklist
Code
fix(scope):,feat(scope):, etc.)pytest tests/ -qand all tests pass