Skip to content

fix(nix): refresh npmDepsHash after the Electron 40.10.2 pin (#47792) - #48457

Merged
alt-glitch merged 1 commit into
mainfrom
fix/refresh-npm-deps-hash
Jun 18, 2026
Merged

fix(nix): refresh npmDepsHash after the Electron 40.10.2 pin (#47792)#48457
alt-glitch merged 1 commit into
mainfrom
fix/refresh-npm-deps-hash

Conversation

@alt-glitch

@alt-glitch alt-glitch commented Jun 18, 2026

Copy link
Copy Markdown
Collaborator

Summary

Every Nix build of the npm workspaces currently fails with:

ERROR: npmDepsHash is out of date
The package-lock.json in src is not the same as the in /nix/store/...-npm-deps.

Root cause: PR #47792 ("pin Electron below the broken native extract-zip install") pinned Electron to an exact 40.10.2 and regenerated the root package-lock.json — dropping @electron/get@5 + @electron-internal/extract-zip, restoring @electron/get@2 + extract-zip@2 + yauzl. That PR touched apps/desktop/package.json, package.json, package-lock.json, and a test, but not nix/lib.nix. The single shared npmDepsHash still described the old 40.10.3 lockfile, so npmConfigHook's consistency check fails on hermes-tui, hermes-web, and hermes-desktop.

This is reproducible on current main (HEAD at branch point), not just stale checkouts.

Fix

Regenerate the one shared hash in nix/lib.nix:

-  npmDepsHash = "sha256-m9cjbjzi4SaFCjODfdrawS5e+1ag+MpRn528/upSNqo=";
+  npmDepsHash = "sha256-kbjJksq7limRIYqP3DwI+GNgCXkG96tXcsQqmuEedxo=";

Computed via fetchNpmDeps (authoritative — prefetch-npm-deps can disagree, per the notes in lib.nix).

Test plan

nix build .#tui.npmDeps   # builds clean (FOD hash matches)
nix build .#tui           # Validating consistency -> Installing dependencies
                          # -> Finished npmConfigHook   (no "out of date" error)

Follow-up (not in this PR)

The nix-lockfile-fix automation should have caught this. See open PR #41004 ("Update nix-lockfile-fix.yml to stage nix/lib.nix") — the auto-refresh workflow apparently doesn't stage nix/lib.nix, which is exactly why a lockfile-changing PR (#47792) could land without the hash following it. Worth landing that to prevent recurrence.

@github-actions

github-actions Bot commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

🔎 Lint report: fix/refresh-npm-deps-hash vs origin/main

ruff

Total: 0 on HEAD, 0 on base (➖ 0)

🆕 New issues: none

✅ Fixed issues: none

Unchanged: 0 pre-existing issues carried over.

ty (type checker)

Total: 11011 on HEAD, 11009 on base (🆕 +2)

🆕 New issues (2):

Rule Count
unresolved-attribute 2
First entries
run_agent.py:2941: [unresolved-attribute] unresolved-attribute: Object of type `Self@get_credits_spent_micros` has no attribute `_credits_session_start_micros`
tests/run_agent/test_credits_notices_toggle.py:76: [unresolved-attribute] unresolved-attribute: Unresolved attribute `_credits_session_start_micros` on type `AIAgent`

✅ Fixed issues (1):

Rule Count
invalid-assignment 1
First entries
tests/run_agent/test_credits_notices_toggle.py:76: [invalid-assignment] invalid-assignment: Object of type `None` is not assignable to attribute `_credits_session_start_micros` of type `int`

Unchanged: 5768 pre-existing issues carried over.

Diagnostics are surfaced as warnings — this check never fails the build.

@alt-glitch alt-glitch added type/bug Something isn't working P1 High — major feature broken, no workaround area/nix Nix flake, NixOS module, container packaging labels Jun 18, 2026
PR #47792 pinned Electron to an exact 40.10.2 and regenerated the root
package-lock.json (dropping @electron/get@5 + @electron-internal/extract-zip,
restoring @electron/get@2 + extract-zip@2 + yauzl), but did not refresh the
shared npmDepsHash in nix/lib.nix. The hash still described the previous
40.10.3 lockfile, so npmConfigHook fails on every Nix build with
"npmDepsHash is out of date" for hermes-tui / hermes-web / hermes-desktop.

Regenerate the single shared hash to match the current lockfile.

Verified with fetchNpmDeps (authoritative, not prefetch-npm-deps):
  nix build .#tui.npmDeps  -> builds clean
  nix build .#tui          -> Validating consistency -> Installing dependencies
                              -> Finished npmConfigHook (no hash error)
@alt-glitch
alt-glitch force-pushed the fix/refresh-npm-deps-hash branch from e968567 to 184dd24 Compare June 18, 2026 14:55
@alt-glitch
alt-glitch enabled auto-merge (squash) June 18, 2026 14:55
@alt-glitch
alt-glitch merged commit 646cd1b into main Jun 18, 2026
34 checks passed
@alt-glitch
alt-glitch deleted the fix/refresh-npm-deps-hash branch June 18, 2026 15:00
waefrebeorn pushed a commit to waefrebeorn/slermes that referenced this pull request Jul 2, 2026
…earch#47792) (NousResearch#48457)

PR NousResearch#47792 pinned Electron to an exact 40.10.2 and regenerated the root
package-lock.json (dropping @electron/get@5 + @electron-internal/extract-zip,
restoring @electron/get@2 + extract-zip@2 + yauzl), but did not refresh the
shared npmDepsHash in nix/lib.nix. The hash still described the previous
40.10.3 lockfile, so npmConfigHook fails on every Nix build with
"npmDepsHash is out of date" for hermes-tui / hermes-web / hermes-desktop.

Regenerate the single shared hash to match the current lockfile.

Verified with fetchNpmDeps (authoritative, not prefetch-npm-deps):
  nix build .#tui.npmDeps  -> builds clean
  nix build .#tui          -> Validating consistency -> Installing dependencies
                              -> Finished npmConfigHook (no hash error)
habarmc1223-sudo pushed a commit to habarmc1223-sudo/hermes-agent-fluxmem that referenced this pull request Jul 8, 2026
…earch#47792) (NousResearch#48457)

PR NousResearch#47792 pinned Electron to an exact 40.10.2 and regenerated the root
package-lock.json (dropping @electron/get@5 + @electron-internal/extract-zip,
restoring @electron/get@2 + extract-zip@2 + yauzl), but did not refresh the
shared npmDepsHash in nix/lib.nix. The hash still described the previous
40.10.3 lockfile, so npmConfigHook fails on every Nix build with
"npmDepsHash is out of date" for hermes-tui / hermes-web / hermes-desktop.

Regenerate the single shared hash to match the current lockfile.

Verified with fetchNpmDeps (authoritative, not prefetch-npm-deps):
  nix build .#tui.npmDeps  -> builds clean
  nix build .#tui          -> Validating consistency -> Installing dependencies
                              -> Finished npmConfigHook (no hash error)
santhreal pushed a commit to santhreal/hermes-agent that referenced this pull request Jul 13, 2026
…earch#47792) (NousResearch#48457)

PR NousResearch#47792 pinned Electron to an exact 40.10.2 and regenerated the root
package-lock.json (dropping @electron/get@5 + @electron-internal/extract-zip,
restoring @electron/get@2 + extract-zip@2 + yauzl), but did not refresh the
shared npmDepsHash in nix/lib.nix. The hash still described the previous
40.10.3 lockfile, so npmConfigHook fails on every Nix build with
"npmDepsHash is out of date" for hermes-tui / hermes-web / hermes-desktop.

Regenerate the single shared hash to match the current lockfile.

Verified with fetchNpmDeps (authoritative, not prefetch-npm-deps):
  nix build .#tui.npmDeps  -> builds clean
  nix build .#tui          -> Validating consistency -> Installing dependencies
                              -> Finished npmConfigHook (no hash error)
Gravezzz pushed a commit to Gravezzz/hermes-agent that referenced this pull request Jul 21, 2026
…earch#47792) (NousResearch#48457)

PR NousResearch#47792 pinned Electron to an exact 40.10.2 and regenerated the root
package-lock.json (dropping @electron/get@5 + @electron-internal/extract-zip,
restoring @electron/get@2 + extract-zip@2 + yauzl), but did not refresh the
shared npmDepsHash in nix/lib.nix. The hash still described the previous
40.10.3 lockfile, so npmConfigHook fails on every Nix build with
"npmDepsHash is out of date" for hermes-tui / hermes-web / hermes-desktop.

Regenerate the single shared hash to match the current lockfile.

Verified with fetchNpmDeps (authoritative, not prefetch-npm-deps):
  nix build .#tui.npmDeps  -> builds clean
  nix build .#tui          -> Validating consistency -> Installing dependencies
                              -> Finished npmConfigHook (no hash error)
leewenjie pushed a commit to leewenjie/hermes-agent that referenced this pull request Aug 7, 2026
…earch#47792) (NousResearch#48457)

PR NousResearch#47792 pinned Electron to an exact 40.10.2 and regenerated the root
package-lock.json (dropping @electron/get@5 + @electron-internal/extract-zip,
restoring @electron/get@2 + extract-zip@2 + yauzl), but did not refresh the
shared npmDepsHash in nix/lib.nix. The hash still described the previous
40.10.3 lockfile, so npmConfigHook fails on every Nix build with
"npmDepsHash is out of date" for hermes-tui / hermes-web / hermes-desktop.

Regenerate the single shared hash to match the current lockfile.

Verified with fetchNpmDeps (authoritative, not prefetch-npm-deps):
  nix build .#tui.npmDeps  -> builds clean
  nix build .#tui          -> Validating consistency -> Installing dependencies
                              -> Finished npmConfigHook (no hash error)
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 P1 High — major feature broken, no workaround type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant