From a3de0733d27e66cb26a7276ba4235a46f83ffc6c Mon Sep 17 00:00:00 2001 From: Drewry Pope Date: Sat, 31 Oct 2026 05:53:55 -0500 Subject: [PATCH 1/6] ci(nix-ci): add PR-tier NixOS host evaluation job (#705) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Evaluate both real hosts (amd, nixos) toplevel drvPath on PRs, in one job sequentially so the patched-nixpkgs import-from-derivation cost is paid once per runner. drvPath only — no builds. Same DeterminateSystems nix-installer v23 pin as flake-check; timeout-minutes 30 per investigation task 1072. This is the check that would have caught #699 on its PR instead of at switch time. --- .github/workflows/nix-ci.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/.github/workflows/nix-ci.yml b/.github/workflows/nix-ci.yml index d1af565c25..1b7832e0e5 100644 --- a/.github/workflows/nix-ci.yml +++ b/.github/workflows/nix-ci.yml @@ -49,6 +49,25 @@ jobs: - name: Check proxy port fallbacks match their definitions run: .github/scripts/check-proxy-port-fallbacks.sh + # PR tier (#705): evaluate both real NixOS hosts (drvPath only, no + # build), so a host-breaking change fails on the PR instead of at + # switch time (#699, fixed by #701's quoting, is the failure this + # catches). Host evaluation imports from the patched nixpkgs source + # (lib/default.nix make-nixos-from-config), i.e. it is + # import-from-derivation: both evals share one job so the + # patched-source realisation is paid once per runner. + host-eval: + name: "basic: NixOS host evaluation" + runs-on: ubuntu-latest + timeout-minutes: 30 + steps: + - uses: actions/checkout@v7 + - uses: DeterminateSystems/nix-installer-action@3138316df39ed29be04236d7ffc686fa525866aa # v23 + - name: Evaluate NixOS host configurations (drvPath only) + run: | + nix eval .#nixosConfigurations.amd.config.system.build.toplevel.drvPath + nix eval .#nixosConfigurations.nixos.config.system.build.toplevel.drvPath + flake-check: name: "full (main tier): Nix flake evaluation" # Main tier only (Phase 2, #1781): PRs keep the basic proxy-port From 43807e56f43be142f2d38c6562d6ee21f036de35 Mon Sep 17 00:00:00 2001 From: Drewry Pope Date: Sat, 31 Oct 2026 06:49:22 -0500 Subject: [PATCH 2/6] ci(nix-ci): dispatch ci-fix when host-eval fails (#705) Codex review on PR 3025 (P2): ci-fix only observed proxy-port-fallbacks and flake-check, so a host-eval-only failure would never reach the failure-dispatch path. Add host-eval to ci-fix.needs. --- .github/workflows/nix-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/nix-ci.yml b/.github/workflows/nix-ci.yml index 1b7832e0e5..fae77fb787 100644 --- a/.github/workflows/nix-ci.yml +++ b/.github/workflows/nix-ci.yml @@ -91,7 +91,7 @@ jobs: # continue-on-error: a dispatch failure must never change this # workflow's own result. ci-fix: - needs: [proxy-port-fallbacks, flake-check] + needs: [proxy-port-fallbacks, host-eval, flake-check] if: failure() permissions: id-token: write From 0a1cafd51f7cb62cdb785bc981c254ba798e93ea Mon Sep 17 00:00:00 2001 From: Drewry Pope Date: Sat, 31 Oct 2026 08:36:41 -0500 Subject: [PATCH 3/6] fix(openclaw): locked flake reference for the summarize custom plugin (#705) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR 3025's new host-eval job exposed it: nix-openclaw runs builtins.getFlake on customPlugins sources, and the old toString ./plugins/summarize is an unlocked flake reference, which pure evaluation refuses (CI run 41198626678: cannot call getFlake on unlocked .../home/openclaw/plugins/summarize). The vendored plugin is now a locked path input of the root flake (no nixpkgs follows — its deps hash is pinned under its own nixpkgs rev, which the lock keeps at 6510408d exactly), and customPlugins passes path:?narHash= with the string context discarded (getFlake rejects context-carrying strings too; both forms verified in isolation first). Verified pure on the laptop, exactly the CI commands: nix eval .#nixosConfigurations.amd.config.system.build.toplevel.drvPath -> /nix/store/k46qxz1n088xfb56fp4rdf444pfmrixm-nixos-system-amd-26.11.20261010.6510408.drv nix eval .#nixosConfigurations.nixos.config.system.build.toplevel.drvPath -> /nix/store/5dhb80658p6l3vyi9achsjc1v3g4i93w-nixos-system-nixos-26.11.20261010.6510408.drv flake.lock: no existing locked rev changed (node renumbering only). --- flake.lock | 57 ++++++++++++++++++++++++++++++--------- flake.nix | 10 +++++++ home/openclaw/default.nix | 13 ++++++++- 3 files changed, 66 insertions(+), 14 deletions(-) diff --git a/flake.lock b/flake.lock index 516088e82e..c9e6614d01 100644 --- a/flake.lock +++ b/flake.lock @@ -2786,6 +2786,22 @@ } }, "nixpkgs_20": { + "locked": { + "lastModified": 1791594108, + "narHash": "sha256-XK4KceonkwD8LuMAt/vNrz982mXJM5jeHAxMwsUXXAQ=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "6510408d147d8c5e6d76043e899e9251756f6a75", + "type": "github" + }, + "original": { + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "6510408d147d8c5e6d76043e899e9251756f6a75", + "type": "github" + } + }, + "nixpkgs_21": { "locked": { "lastModified": 1793166571, "narHash": "sha256-3+DlA8JY6abKt8G9hoZgTiSNLxdkGTn2a5MeiNDXmIc=", @@ -2801,7 +2817,7 @@ "type": "github" } }, - "nixpkgs_21": { + "nixpkgs_22": { "locked": { "lastModified": 1735563628, "narHash": "sha256-OnSAY7XDSx7CtDoqNh8jwVwh4xNL/2HaJxGjryLWzX8=", @@ -2817,7 +2833,7 @@ "type": "github" } }, - "nixpkgs_22": { + "nixpkgs_23": { "locked": { "lastModified": 1790689126, "narHash": "sha256-ilerN1WLSvF+HMjziC/Wv99J5y02maDH+6hZPwsORKg=", @@ -2833,7 +2849,7 @@ "type": "github" } }, - "nixpkgs_23": { + "nixpkgs_24": { "locked": { "lastModified": 1719848872, "narHash": "sha256-H3+EC5cYuq+gQW8y0lSrrDZfH71LB4DAf+TDFyvwCNA=", @@ -2849,7 +2865,7 @@ "type": "github" } }, - "nixpkgs_24": { + "nixpkgs_25": { "locked": { "lastModified": 1769461804, "narHash": "sha256-msG8SU5WsBUfVVa/9RPLaymvi5bI8edTavbIq3vRlhI=", @@ -2865,7 +2881,7 @@ "type": "github" } }, - "nixpkgs_25": { + "nixpkgs_26": { "locked": { "lastModified": 1790769526, "narHash": "sha256-5AIVFLRcx8YAwbFTVPTs7YhwJH7JyHfAQsvXmpovcXI=", @@ -2881,7 +2897,7 @@ "type": "github" } }, - "nixpkgs_26": { + "nixpkgs_27": { "locked": { "lastModified": 1790689126, "narHash": "sha256-ilerN1WLSvF+HMjziC/Wv99J5y02maDH+6hZPwsORKg=", @@ -3145,6 +3161,20 @@ "type": "github" } }, + "openclaw-plugin-summarize": { + "inputs": { + "nixpkgs": "nixpkgs_20" + }, + "locked": { + "path": "./home/openclaw/plugins/summarize", + "type": "path" + }, + "original": { + "path": "./home/openclaw/plugins/summarize", + "type": "path" + }, + "parent": [] + }, "opencode": { "inputs": { "nixpkgs": "nixpkgs_7" @@ -3166,7 +3196,7 @@ "opencode_2": { "inputs": { "mcpx-src": "mcpx-src_2", - "nixpkgs": "nixpkgs_20" + "nixpkgs": "nixpkgs_21" }, "locked": { "lastModified": 1793366858, @@ -3331,6 +3361,7 @@ "omasnap": "omasnap", "omnix": "omnix", "openchamber": "openchamber_2", + "openclaw-plugin-summarize": "openclaw-plugin-summarize", "opencode": "opencode_2", "pre-commit-hooks": "pre-commit-hooks_2", "roc": "roc", @@ -3432,7 +3463,7 @@ "server": { "inputs": { "microvm": "microvm_2", - "nixpkgs": "nixpkgs_21" + "nixpkgs": "nixpkgs_22" }, "locked": { "lastModified": 1731735740, @@ -3565,7 +3596,7 @@ }, "ssh-to-age": { "inputs": { - "nixpkgs": "nixpkgs_22" + "nixpkgs": "nixpkgs_23" }, "locked": { "lastModified": 1791089589, @@ -3926,7 +3957,7 @@ "unattended-installer": { "inputs": { "disko": "disko_3", - "nixpkgs": "nixpkgs_23" + "nixpkgs": "nixpkgs_24" }, "locked": { "lastModified": 1724352083, @@ -3945,7 +3976,7 @@ "waybar": { "inputs": { "flake-compat": "flake-compat_6", - "nixpkgs": "nixpkgs_24" + "nixpkgs": "nixpkgs_25" }, "locked": { "lastModified": 1790961154, @@ -4031,7 +4062,7 @@ "yazi": { "inputs": { "flake-utils": "flake-utils_10", - "nixpkgs": "nixpkgs_25", + "nixpkgs": "nixpkgs_26", "rust-overlay": "rust-overlay_2" }, "locked": { @@ -4051,7 +4082,7 @@ "zen-browser": { "inputs": { "home-manager": "home-manager_4", - "nixpkgs": "nixpkgs_26" + "nixpkgs": "nixpkgs_27" }, "locked": { "lastModified": 1791521685, diff --git a/flake.nix b/flake.nix index 9b6cf42e38..fddbf29ef7 100755 --- a/flake.nix +++ b/flake.nix @@ -278,6 +278,16 @@ rec { inputs.nixpkgs.follows = "nixpkgs"; inputs.home-manager.follows = "home-manager"; }; + # The vendored summarize plugin (home/openclaw/plugins/summarize) + # as a locked path input, so home/openclaw can hand nix-openclaw's + # customPlugins a LOCKED flake reference: builtins.getFlake on the + # old unlocked source-tree path fails pure evaluation (CI + # host-eval, #705). Deliberately NO nixpkgs follows: the plugin + # pins its own nixpkgs rev because its pnpm deps hash is pinned + # under that toolchain (see the plugin flake's header comment). + openclaw-plugin-summarize = { + url = "path:./home/openclaw/plugins/summarize"; + }; # Helium: privacy-focused Chromium fork by imputnet (the cobalt.tools org). # Not in nixpkgs and unlikely to be soon -- seven `helium: init` PRs have been # closed unmerged and the one still open (#498572) has been stalled since diff --git a/home/openclaw/default.nix b/home/openclaw/default.nix index 1d25cb2e54..78c1846cac 100644 --- a/home/openclaw/default.nix +++ b/home/openclaw/default.nix @@ -142,7 +142,18 @@ in # Custom plugins supplied as plugin flakes # (programs.openclaw.customPlugins). customPlugins = [ - { source = toString ./plugins/summarize; } + { + # nix-openclaw runs builtins.getFlake on this string. A plain + # source-tree path is an UNLOCKED flake reference and pure + # evaluation (CI host-eval, #705) refuses it, so pass the + # locked reference of the root flake's path input instead. + # unsafeDiscardStringContext: getFlake also rejects strings + # carrying store-path context; the narHash in the reference + # is what keeps the result locked and checkable. + source = + builtins.unsafeDiscardStringContext + "path:${inputs.openclaw-plugin-summarize.outPath}?narHash=${inputs.openclaw-plugin-summarize.narHash}"; + } ]; # OpenClaw runtime plugins (channels, harnesses, providers, search), From d62c819faf7eb0cbfd3544a5535e0a4cec67e817 Mon Sep 17 00:00:00 2001 From: Drewry Pope Date: Sat, 31 Oct 2026 09:18:45 -0500 Subject: [PATCH 4/6] fix(nix): #705 Codex P1 - pin summarize plugin subtree by its own narHash via fetchTree --- flake.lock | 57 +++++++++------------------------------ flake.nix | 10 ------- home/openclaw/default.nix | 24 +++++++++++++---- 3 files changed, 32 insertions(+), 59 deletions(-) diff --git a/flake.lock b/flake.lock index c9e6614d01..516088e82e 100644 --- a/flake.lock +++ b/flake.lock @@ -2786,22 +2786,6 @@ } }, "nixpkgs_20": { - "locked": { - "lastModified": 1791594108, - "narHash": "sha256-XK4KceonkwD8LuMAt/vNrz982mXJM5jeHAxMwsUXXAQ=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "6510408d147d8c5e6d76043e899e9251756f6a75", - "type": "github" - }, - "original": { - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "6510408d147d8c5e6d76043e899e9251756f6a75", - "type": "github" - } - }, - "nixpkgs_21": { "locked": { "lastModified": 1793166571, "narHash": "sha256-3+DlA8JY6abKt8G9hoZgTiSNLxdkGTn2a5MeiNDXmIc=", @@ -2817,7 +2801,7 @@ "type": "github" } }, - "nixpkgs_22": { + "nixpkgs_21": { "locked": { "lastModified": 1735563628, "narHash": "sha256-OnSAY7XDSx7CtDoqNh8jwVwh4xNL/2HaJxGjryLWzX8=", @@ -2833,7 +2817,7 @@ "type": "github" } }, - "nixpkgs_23": { + "nixpkgs_22": { "locked": { "lastModified": 1790689126, "narHash": "sha256-ilerN1WLSvF+HMjziC/Wv99J5y02maDH+6hZPwsORKg=", @@ -2849,7 +2833,7 @@ "type": "github" } }, - "nixpkgs_24": { + "nixpkgs_23": { "locked": { "lastModified": 1719848872, "narHash": "sha256-H3+EC5cYuq+gQW8y0lSrrDZfH71LB4DAf+TDFyvwCNA=", @@ -2865,7 +2849,7 @@ "type": "github" } }, - "nixpkgs_25": { + "nixpkgs_24": { "locked": { "lastModified": 1769461804, "narHash": "sha256-msG8SU5WsBUfVVa/9RPLaymvi5bI8edTavbIq3vRlhI=", @@ -2881,7 +2865,7 @@ "type": "github" } }, - "nixpkgs_26": { + "nixpkgs_25": { "locked": { "lastModified": 1790769526, "narHash": "sha256-5AIVFLRcx8YAwbFTVPTs7YhwJH7JyHfAQsvXmpovcXI=", @@ -2897,7 +2881,7 @@ "type": "github" } }, - "nixpkgs_27": { + "nixpkgs_26": { "locked": { "lastModified": 1790689126, "narHash": "sha256-ilerN1WLSvF+HMjziC/Wv99J5y02maDH+6hZPwsORKg=", @@ -3161,20 +3145,6 @@ "type": "github" } }, - "openclaw-plugin-summarize": { - "inputs": { - "nixpkgs": "nixpkgs_20" - }, - "locked": { - "path": "./home/openclaw/plugins/summarize", - "type": "path" - }, - "original": { - "path": "./home/openclaw/plugins/summarize", - "type": "path" - }, - "parent": [] - }, "opencode": { "inputs": { "nixpkgs": "nixpkgs_7" @@ -3196,7 +3166,7 @@ "opencode_2": { "inputs": { "mcpx-src": "mcpx-src_2", - "nixpkgs": "nixpkgs_21" + "nixpkgs": "nixpkgs_20" }, "locked": { "lastModified": 1793366858, @@ -3361,7 +3331,6 @@ "omasnap": "omasnap", "omnix": "omnix", "openchamber": "openchamber_2", - "openclaw-plugin-summarize": "openclaw-plugin-summarize", "opencode": "opencode_2", "pre-commit-hooks": "pre-commit-hooks_2", "roc": "roc", @@ -3463,7 +3432,7 @@ "server": { "inputs": { "microvm": "microvm_2", - "nixpkgs": "nixpkgs_22" + "nixpkgs": "nixpkgs_21" }, "locked": { "lastModified": 1731735740, @@ -3596,7 +3565,7 @@ }, "ssh-to-age": { "inputs": { - "nixpkgs": "nixpkgs_23" + "nixpkgs": "nixpkgs_22" }, "locked": { "lastModified": 1791089589, @@ -3957,7 +3926,7 @@ "unattended-installer": { "inputs": { "disko": "disko_3", - "nixpkgs": "nixpkgs_24" + "nixpkgs": "nixpkgs_23" }, "locked": { "lastModified": 1724352083, @@ -3976,7 +3945,7 @@ "waybar": { "inputs": { "flake-compat": "flake-compat_6", - "nixpkgs": "nixpkgs_25" + "nixpkgs": "nixpkgs_24" }, "locked": { "lastModified": 1790961154, @@ -4062,7 +4031,7 @@ "yazi": { "inputs": { "flake-utils": "flake-utils_10", - "nixpkgs": "nixpkgs_26", + "nixpkgs": "nixpkgs_25", "rust-overlay": "rust-overlay_2" }, "locked": { @@ -4082,7 +4051,7 @@ "zen-browser": { "inputs": { "home-manager": "home-manager_4", - "nixpkgs": "nixpkgs_27" + "nixpkgs": "nixpkgs_26" }, "locked": { "lastModified": 1791521685, diff --git a/flake.nix b/flake.nix index fddbf29ef7..9b6cf42e38 100755 --- a/flake.nix +++ b/flake.nix @@ -278,16 +278,6 @@ rec { inputs.nixpkgs.follows = "nixpkgs"; inputs.home-manager.follows = "home-manager"; }; - # The vendored summarize plugin (home/openclaw/plugins/summarize) - # as a locked path input, so home/openclaw can hand nix-openclaw's - # customPlugins a LOCKED flake reference: builtins.getFlake on the - # old unlocked source-tree path fails pure evaluation (CI - # host-eval, #705). Deliberately NO nixpkgs follows: the plugin - # pins its own nixpkgs rev because its pnpm deps hash is pinned - # under that toolchain (see the plugin flake's header comment). - openclaw-plugin-summarize = { - url = "path:./home/openclaw/plugins/summarize"; - }; # Helium: privacy-focused Chromium fork by imputnet (the cobalt.tools org). # Not in nixpkgs and unlikely to be soon -- seven `helium: init` PRs have been # closed unmerged and the one still open (#498572) has been stalled since diff --git a/home/openclaw/default.nix b/home/openclaw/default.nix index 78c1846cac..029a3c4339 100644 --- a/home/openclaw/default.nix +++ b/home/openclaw/default.nix @@ -145,14 +145,28 @@ in { # nix-openclaw runs builtins.getFlake on this string. A plain # source-tree path is an UNLOCKED flake reference and pure - # evaluation (CI host-eval, #705) refuses it, so pass the - # locked reference of the root flake's path input instead. + # evaluation (CI host-eval, #705) refuses it; a root-flake path + # input is no fix either — its lock node inherits the ROOT + # sourceInfo narHash, which does not match the plugin subtree + # the path fetcher hashes (Codex P1 on PR #3025). So fetch the + # subtree as a locked tree of its own: fetchTree with the + # subtree's own narHash pinned here, then hand getFlake the + # resulting store path with that same hash. + # When the plugin's files change, evaluation fails on the + # hash mismatch until the pin is refreshed with: + # nix eval --impure --raw --expr '(builtins.fetchTree { type = "path"; path = ./home/openclaw/plugins/summarize; }).narHash' # unsafeDiscardStringContext: getFlake also rejects strings - # carrying store-path context; the narHash in the reference - # is what keeps the result locked and checkable. + # carrying store-path context. source = + let + pluginTree = builtins.fetchTree { + type = "path"; + path = ./plugins/summarize; + narHash = "sha256-y4xkNIopeCdJ/C/PiIZeKlfALrmxUrBYg5CXUSqsMXU="; + }; + in builtins.unsafeDiscardStringContext - "path:${inputs.openclaw-plugin-summarize.outPath}?narHash=${inputs.openclaw-plugin-summarize.narHash}"; + "path:${pluginTree.outPath}?narHash=${pluginTree.narHash}"; } ]; From 161dfc4bd833768cae86b4fc05fdb7df004d4179 Mon Sep 17 00:00:00 2001 From: Drewry Pope Date: Sat, 31 Oct 2026 12:08:59 -0500 Subject: [PATCH 5/6] ci(nix-ci): disable lazy trees in host-eval job so fetchTree path plugins materialise (#705) --- .github/workflows/nix-ci.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/nix-ci.yml b/.github/workflows/nix-ci.yml index fae77fb787..2d0ff2e073 100644 --- a/.github/workflows/nix-ci.yml +++ b/.github/workflows/nix-ci.yml @@ -62,7 +62,17 @@ jobs: timeout-minutes: 30 steps: - uses: actions/checkout@v7 + # lazy-trees off for this job only (#705): Determinate Nix ships + # lazy trees on, which virtualises the flake source tree; the + # in-module builtins.fetchTree { type = "path"; } on + # home/openclaw/plugins/summarize then opens a directory that is + # not materialised and fails with ENOENT (run 41209590370), + # while the same head evaluates cleanly against a materialised + # source. Materialise the source for host evaluation instead. - uses: DeterminateSystems/nix-installer-action@3138316df39ed29be04236d7ffc686fa525866aa # v23 + with: + extra-conf: | + lazy-trees = false - name: Evaluate NixOS host configurations (drvPath only) run: | nix eval .#nixosConfigurations.amd.config.system.build.toplevel.drvPath From 25154dc287782375d65816bb914fcba13105ecb5 Mon Sep 17 00:00:00 2001 From: Drewry Pope Date: Sat, 31 Oct 2026 13:50:55 -0500 Subject: [PATCH 6/6] ci(nix-ci): allow unfree for host evaluation (#705) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Run 41223153158: with lazy-trees off the getFlake problem is gone, but drvPath evaluation now refuses the unfree package Affinity Photo 2 (scripts.nix) — the hosts legitimately include unfree packages and the laptop allows them; CI did not. This job guards evaluation health, not license policy: set NIXPKGS_ALLOW_UNFREE=1 and pass --impure (required for the env var to be honoured) on both host evals. --- .github/workflows/nix-ci.yml | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/.github/workflows/nix-ci.yml b/.github/workflows/nix-ci.yml index 2d0ff2e073..4bbbc4dfb9 100644 --- a/.github/workflows/nix-ci.yml +++ b/.github/workflows/nix-ci.yml @@ -74,9 +74,18 @@ jobs: extra-conf: | lazy-trees = false - name: Evaluate NixOS host configurations (drvPath only) + # The hosts legitimately include unfree packages (Affinity + # Photo 2 via scripts.nix); the laptop allows them, CI does + # not by default, and drvPath evaluation refuses them + # (run 41223153158). This check guards evaluation health + # (#699-style breakage), not license policy, so allow unfree + # for the eval exactly as the laptop does. NIXPKGS_ALLOW_UNFREE + # is only honoured with --impure. + env: + NIXPKGS_ALLOW_UNFREE: "1" run: | - nix eval .#nixosConfigurations.amd.config.system.build.toplevel.drvPath - nix eval .#nixosConfigurations.nixos.config.system.build.toplevel.drvPath + nix eval --impure .#nixosConfigurations.amd.config.system.build.toplevel.drvPath + nix eval --impure .#nixosConfigurations.nixos.config.system.build.toplevel.drvPath flake-check: name: "full (main tier): Nix flake evaluation"