hermes-agent/.github/workflows
Siddharth Balyan d02a59b679
fix(nix): cold npm builds + fix-lockfiles real-build verification + auto-fix workflow (#41867)
* fix(nix): fix-lockfiles real-build verification + point auto-fix at nix/lib.nix

Two related fixes to the npm lockfile-hash tooling that, together, let a
broken nix build slip onto main and stay there:

1. fix-lockfiles trusted prefetch-npm-deps. It computes the hash from the
   lockfile *contents* and early-exited "ok" whenever that matched the pin,
   never running the real fetchNpmDeps + npmConfigHook build. Those two can
   disagree (the --apply path already works around it), so `--check`
   reported "ok" while a cold build was actually broken (e.g. lockfile
   engines/os/cpu fields the pinned nixpkgs strips from the deps cache,
   tripping npmConfigHook's consistency diff). Now, when prefetch says the
   hash matches, confirm with `nix build .#<attr>` before believing it:
   adopt the real fetchNpmDeps hash if nix reports a 'got:' mismatch,
   surface non-hash failures honestly (exit 1) instead of claiming "ok",
   and keep the transient-cache-failure skip.

2. nix-lockfile-fix.yml's auto-fix-main (and the PR-fix job) whitelisted and
   staged nix/tui.nix + nix/web.nix, but the single npmDepsHash moved to
   nix/lib.nix. So fix-lockfiles --apply edited nix/lib.nix, the guard
   flagged it as an "unexpected modified file", and the job exited without
   committing — the auto-healer could never push a fix. Point the guard
   regex and both `git add` lines at nix/lib.nix.

* fix(nix): fix cold npm builds — adopt the deps-cache lockfile in patchPhase

hermes-tui/hermes-agent could not be built from source on the pinned nixpkgs:
prefetch-npm-deps strips advisory lockfile fields (engines/os/cpu/funding/
bin/…) that newer npm writes into package-lock.json, then npmConfigHook
byte-compares the source lockfile against the cache's stripped copy and fails
on the difference. CI only stayed green because it substitutes the prebuilt
hermes-tui from Cachix and never cold-builds it; anyone building cold (e.g. a
local path: input, or a cache miss) hit the failure.

mkNpmPassthru's patchPhase now copies the cache's own normalized
package-lock.json over the source before npmConfigHook runs, so the
consistency check is trivially satisfied. The resolved dependency set
(version/resolved/integrity/dependencies) is identical — fetchNpmDeps derived
the cache from this very lockfile — so `npm ci` installs the same tree; only
advisory metadata is dropped. Genuine drift is still caught by the
fixed-output npmDepsHash check, which runs before this phase.

Verified by cold-building .#tui and .#default (full hermes-agent) from scratch
on the pinned nixpkgs (6201e2) — both succeed where they previously failed at
npmConfigHook.
2026-06-08 12:41:37 +05:30
..
build-windows-installer.yml add a github action to build& sign a windows installer 2026-05-31 22:09:44 -04:00
contributor-check.yml ci: ensure required checks always report status 2026-05-29 09:17:01 -07:00
deploy-site.yml ci(deploy): allow workflow_dispatch to also trigger Vercel deploy (#34081) 2026-05-28 13:17:58 -07:00
docker-lint.yml ci(docker): add hadolint + shellcheck for container build inputs 2026-05-24 18:05:14 -07:00
docker-publish.yml fix(windows): rip out unused submodule support in installer & docker & docs 2026-06-03 03:01:37 -07:00
docs-site-checks.yml chore(actions)(deps): bump actions/checkout from 4.3.1 to 6.0.2 2026-05-19 03:27:54 -07:00
history-check.yml chore(actions)(deps): bump actions/checkout from 4.3.1 to 6.0.2 2026-05-19 03:27:54 -07:00
lint.yml chore(actions)(deps): bump actions/checkout from 4.3.1 to 6.0.2 2026-05-19 03:27:54 -07:00
nix-lockfile-fix.yml fix(nix): cold npm builds + fix-lockfiles real-build verification + auto-fix workflow (#41867) 2026-06-08 12:41:37 +05:30
nix.yml ci(nix): fold package+devShell builds into flake check 2026-06-02 19:14:18 -04:00
osv-scanner.yml fix(node/nix): consolidate workspace lockfile + update all consumers 2026-06-02 20:28:18 -04:00
skills-index-freshness.yml feat(skills-hub): health checks, freshness badge, and a watchdog cron (#32345) 2026-05-25 23:10:45 -07:00
skills-index.yml fix(skills-hub): show every catalog source on /docs/skills (skills.sh, ClawHub, browse.sh, OpenAI, …) (#32336) 2026-05-25 18:34:54 -07:00
supply-chain-audit.yml ci: harden supply-chain gate jobs against changes-job failure 2026-05-29 09:17:01 -07:00
tests.yml fix(packaging): ship locales/ i18n catalogs in wheel, sdist, and Nix (#38383) 2026-06-03 12:00:27 -07:00
upload_to_pypi.yml chore(actions)(deps): bump actions/checkout from 4.3.1 to 6.0.2 2026-05-19 03:27:54 -07:00
uv-lockfile-check.yml chore(actions)(deps): bump actions/checkout from 4.3.1 to 6.0.2 2026-05-19 03:27:54 -07:00