Fix Hermes browser runtime, adaptive Redview batching and fleet SSH #325
No reviewers
Labels
No labels
area:authentication
area:flake-utilities
area:performance
area:tbd
host:chaos
host:cosmos
host:electra
host:fleet
host:lena
host:lyra
host:mass-storage
host:media1
host:nimmog-de
host:nova
host:pangolin
host:pangolin-vps
host:phone
host:router
host:vega
investigation
phase:cutover
phase:deploy
phase:mcp
phase:module
phase:packaging
phase:prep
phase:validation
priority:high
priority:medium
project:attic-postgres-lyra-rollout
project:auto-update-reliability
project:auto-update-remediation
project:declarative-purity-cleanup
project:external-review
project:fleet-boundary-cleanup
project:host-facts-refactor
project:lyra-nixos-deploy
project:lyra-service-stack-migration
project:nebula-mesh-network
project:nix-idioms-hygiene
project:nixos-build-deployment-pipeline
project:security-hardening
project:service-stack-migration
project:vega-sillytavern-cutover
project:wiki-rebuild
repo:numtide/flake-utils
repo:numtide/nix-auth
repo:numtide/nixos-passthru-cache
repo:numtide/nix-relay
service:auto-update
service:gitlab
service:hermes
service:mem0
service:nix
service:sillytavern
service:slskd
service:synthseek
service:tdarr
No milestone
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
nimmo/nixos-config!325
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/hermes-browser"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Hermes browser tools currently select PM's generic Linux agent-browser download, which cannot launch on NixOS. This change wraps Hermes with native agent-browser and Chromium and gives that runtime precedence. Redview now uses upstream VRAM-adaptive tag batching instead of a forced batch size of 32.
Hermes also receives a dedicated fleet SSH identity, separate from its Git deploy key. This repository owns Vega-scoped encrypted key delivery, public-key authorization on the four configured NixOS hosts, trusted host pins and service integration. Destination routes/accounts and operational guidance live in the Hermes profile, included at runtime after scalar SSH safety settings and before the fallback user. IdentityFile entries are additive; this is documented explicitly. No one-shot installer or single-use migration code is included.
The profile prerequisite is already published to nimmo/hermes main at aad7557. It must be pulled into the normal runtime checkout before activating this infrastructure change.
Related issues: #321, #322, #324. Milestone: Hermes reported configuration gaps.
Validation
nix flake checkpasses in nixos-config and the Hermes profile repository.Remaining live evidence
Mass-storage retains its DSM authentication setup; the Windows Desktop is excluded. nimmog-de services run in Docker, so no journal-group change is needed there. Remote nimmo accounts retain their existing permissions; Docker control is root-equivalent, and the three approved VPS exceptions use root.
This MR is open for automated review. Merge and deployment are separate remaining steps.
Automated code review
Reviewed commit:
fca8907f500d7a84a7713f4d68cafbcb14813db6Verdict: Requires further work
Resolve the blocking or important findings and investigate failed deterministic checks before merging.
Overall assessment
The three changes (Hermes fleet SSH module + flake check + SOPS/keys/users wiring, the browser package overlay, and the Redview TAG_BATCH_SIZE removal) evaluate consistently against the checked-out code. The new check scripts and module agree on the same secret path, key, ownership and mode; the widened .sops.yaml rule matches the four recipients present in secrets/hermes-fleet-ssh.yaml; and the public key is authorized on all four registered nixosConfigurations (vega, lyra, lena import users/nimmo.nix directly; electra reaches it transitively via profiles/laptop.nix -> profiles/gui.nix), so the check's
builtins.elem publicKey ... keyFilesassertion is satisfiable. No evaluated-config regression was demonstrated. The remaining actionable issues are runtime trust-boundary properties of the generated SSH configuration thatnix flake checkcannot gate: an unguarded Include of a mutable, agent-authored profile file.Blocking findings
None.
Important findings
The generated /etc/hermes/fleet-ssh.conf emits
Include ${sshCfg.profileConfig}(default${cfg.stateDir}/profile/ssh/config) with no existence guard or glob fallback. That path exists only after the preStartgit clone/pullofcfg.gitRepointo${cfg.stateDir}/profilein modules/services/hermes.nix, and the pull is best-effort (git ... pull --ff-only || true). modules/services/hermes-fleet-ssh.nix also links${sshDirectory}/configto this file, and modules/services/hermes.nix setsHOME=${cfg.stateDir}in hermes-agent's serviceConfig.Environment, so plain ssh invocations - including the preStartGIT_SSH_COMMANDprofile pull itself - read this file. docs/hermes-fleet-ssh.md treats publishing the profile branchfeat/fleet-ssh-profileas a separate, later step ('Publish the Hermes profile branch feat/fleet-ssh-profile first when requested, so ssh/config ... are available to the runtime pull'), i.e. the file may not exist when this infrastructure activates. The flake check cannot catch this because it substitutes the path with a fixture:substitute ${sshConfig} ssh-config --replace-fail ... "$PWD/profile-config".Impact: If the profile checkout lacks ssh/config (default branch before the feature branch is merged, or a later revision that removes it), OpenSSH fails on the missing Include target, so every Hermes ssh call - including the git-over-ssh profile pull that would have supplied the file - exits non-zero. The profile becomes un-updatable from that state without manual intervention, and this failure mode is invisible to
nix flake check.Suggested fix: Make the Include tolerant: use a glob that is guaranteed to match (e.g. include
/srv/services/hermes/profile/ssh.d/*.confwith a repository-owned placeholder, or a tmpfiles rule that stages an empty file when the profile path is missing), or add a preStart/activation guard that only emits the Include when${stateDir}/profile/ssh/configexists.Suggestions
Include ${sshCfg.profileConfig}precedes theHost *block that suppliesForwardAgent no,BatchMode yes,ConnectTimeout 10,StrictHostKeyChecking accept-newand the known-hosts settings, and the file's own header comment states the reason: '# Specific account/route rules precede the defaults (SSH takes the first value).' The new check relies on that same first-match rule (grep -q '^user root$' root-optionsfrom the profile fixture). The profile is not review-gated by this repository: README.md states the agent 'author[s], commit[s], and push[es] back its own skills and scheduled routines without NixOS rebuilds', and docs/hermes-fleet-ssh.md states 'Pulling approved profile changes updates destinations without a NixOS rebuild'.Impact: A
Host *or broad pattern pushed into the profile ssh/config silently re-enables agent forwarding, drops BatchMode/IdentitiesOnly, or changes the account for all destinations, undoing the noninteractive guarantees this change provides - with no rebuild and no check to detect it.Suggested fix: State in the profile's ssh/README.md (and, if useful, assert in the check) that the profile file is restricted to per-alias HostName/User/HostKeyAlias entries with no
Host *patterns, or supply the safety defaults outside the config (fixed-ooptions in the wrapper) so the mutable file cannot override them.Tests and validation
Questions
ssh/configbeforefeat/fleet-ssh-profileis published? Thenimmo/hermesrepository is not in this checkout, so the ordering assumption in docs/hermes-fleet-ssh.md cannot be verified here.HostKeyAliasvalues match the names pinned in keys/hermes-fleet-known-hosts (electra, lena, vega, lyra, nova, media1, de.nimmog.uk, pangolin-vps, totalgeek.co.uk, nimmog.uk)? The pin file and the profile are not paired anywhere in this checkout.ssh -Gemitforwardagent noas a default value? If so, the check'sgrep -q '^forwardagent no$' root-optionsis vacuous and does not prove the fleet config sets it, unlike theidentitiesonly yes/identityagent nonegreps.agent_browser_runnableand_agent_browser_candidate_present(andos) already defined in upstream tools/browser_tool_install.py at the pinned hermes-agent rev? The upstream file is not in this checkout, so the added branch in modules/common/hermes-browser-tools.patch cannot be resolved against it.pkgs.agent-browserpresent in the pinned nixpkgs? No Nix evaluation was run, so modules/common/hermes-browser-package.nix'slib.getExe pkgs.agent-browserwas not resolved.Review limitations
nix flake checkwas run; the review container has no Nix toolchain, so all evaluation claims are read from source rather than observed.nimmo/hermesprofile repository (ssh/config, ssh/README.md) is not part of this checkout, so destination aliases, remote accounts, and HostKeyAlias pairings were not inspected.hermes-agentpackage sources and the built store paths were not inspected; the browser overlay's patch application and runtime behaviour were not exercised.Diff coverage
.sops.yaml: reviewed — included in a context-limited batchREADME.md: reviewed — included in a context-limited batchdocs/hermes-fleet-ssh.md: reviewed — included in a context-limited batchflake.nix: reviewed — included in a context-limited batchkeys/hermes-fleet-known-hosts: reviewed — included in a context-limited batchkeys/hermes-fleet.pub: reviewed — included in a context-limited batchmodules/common/hermes-browser-package.nix: reviewed — included in a context-limited batchmodules/common/hermes-browser-tools.patch: reviewed — included in a context-limited batchmodules/services/hermes-fleet-ssh.nix: reviewed — included in a context-limited batchmodules/services/hermes.nix: reviewed — included in a context-limited batchmodules/services/redview.nix: reviewed — included in a context-limited batchscripts/check-hermes-fleet-ssh.nix: reviewed — included in a context-limited batchsecrets/hermes-fleet-ssh.yaml: reviewed — included in a context-limited batchusers/nimmo.nix: reviewed — included in a context-limited batchReview metadata
Addressed review 70 in
c364d29.Full nix flake check passes after these changes, including the new regressions. The existing upstream stdenv deprecation warnings were reviewed. Normal service activation and deployment acceptance remain pending; no merge or deployment was performed.
Automated code review
Reviewed commit:
c364d29ea8499244a7b95a12bb691e406a170e87Verdict: Requires further work
Resolve the blocking or important findings and investigate failed deterministic checks before merging.
Overall assessment
The supplied changes are internally consistent where evidence exists: the new SOPS file's four recipients (vega, yubikey-nano5c, yubikey-5-nfc, provision-key) match the widened
.sops.yamlrulesecrets/hermes(-fleet-ssh)?\.yaml$exactly;users/nimmo.nixreaches all four registered nixosConfigurations (vega, lena, lyra directly; electra viamodules/profiles/gui.nix:24), which is whatscripts/check-hermes-fleet-ssh.nixasserts; the relative imports (../../secrets/hermes-fleet-ssh.yaml,../../keys/...,./hermes-fleet-ssh.nix,../common/hermes-browser-package.nix) resolve; the patch's declared line counts (3 -> 10, seven added lines) and indentation are self-consistent; and no supplied check asserts onTAG_BATCH_SIZE, so removing it breaks no deterministic gate. The defects I can evidence are the offset-anchored browser patch applied to a floating, auto-updated input, and one guard in the new flake check that cannot fail.Blocking findings
None.
Important findings
The overlay is applied unconditionally in
postInstallaspatch --directory="$out/lib/hermes-nixos-browser" -p1 < ${./hermes-browser-tools.patch}(modules/common/hermes-browser-package.nix:19), and the patch body carries no fuzzy anchor:@@ -64,3 +64,10 @@with only three context lines (cached: a new PM fact or profile must be visible immediately.,""",import pm). Its subject comes fromhermes-agent.url = "github:NousResearch/hermes-agent"(flake.nix:37), which has no ref or revision pin, andlib/auto-update-policy.nix:241listshermes-agentas a normal auto-updategroupsentry withhosts = [ "vega" ]; the onlypinnedentry in that file (line 248) isnixpkgs-sbomnix-176.Impact: Any upstream edit at or above line 64 of
tools/browser_tool_install.py- including one pulled in by Vega's routine pull-only auto-update - makespatchfail inpostInstalland aborts every Vega build, so the browser fix cannot be relied on across an automatic update; the failure is a hard build break rather than a contained fallback.Suggested fix: Make the coupling explicit and re-testable: record it under the existing pin/
remediation/pinscontract (or movehermes-agentout of the auto-updategroups) so the offset-sensitive patch is validated before acceptance, or rewrite the overlay so it does not depend on upstream line offsets - e.g. shadowtools.browser_tool_installwith a repo-owned wrapper module that readsHERMES_AGENT_BROWSERand delegates to the upstream implementation.Suggestions
The new check's 'Git must not use the fleet SSH identity' guard cannot fail (flake.nix:284; medium confidence)
The guard runs
ssh -G -F ssh-config -i "$PWD/git-test-identity" git@git.nimmog.uk > git-options(flake.nix:281) and then fails only if^identityfile /run/secrets/hermes-fleet-ssh-key$appears ingit-options(flake.nix:284-287). A command-line-ioverridesIdentityFilefrom the config file, and the generated configuration independently excludes that host from the fleet identity block (Host * !git.nimmog.uk, modules/services/hermes-fleet-ssh.nix:33). Neither mechanism can put the fleet key in this output, so the branch is unreachable.Impact: The check documents a property it does not test: if the
!git.nimmog.ukexclusion were removed or inverted, or the fleet identity were otherwise injected,nix flake checkwould still pass while Hermes's profile pull silently used the fleet key instead of its Git deploy key. The check also never asserts that the fleet identity is offered for a genuine fleet destination, so the identity wiring itself is untested in the positive direction.Suggested fix: Assert the exclusion without a command-line identity: run
ssh -G -F ssh-config git@git.nimmog.ukand require that noidentityfileline names/run/secrets/hermes-fleet-ssh-key; keep the explicit-iinvocation only as a separate positive assertion about identity selection, and add a positive assertion that a fleet destination resolvesidentityfile /run/secrets/hermes-fleet-ssh-key.Precedence claim in the new document does not hold for IdentityFile, which accumulates (docs/hermes-fleet-ssh.md:31; medium confidence)
docs/hermes-fleet-ssh.md:31-32 states that 'Infrastructure identity and safety settings precede the include so profile changes cannot override those first-value settings', and modules/services/hermes-fleet-ssh.nix:33-35 relies on that ordering for
IdentityFile,IdentitiesOnlyandIdentityAgent, followed byInclude ${sshCfg.profileConfig}(line 46). 'First obtained value wins' applies to the scalar options, butIdentityFileis list-valued and accumulates across matching blocks, so a profileHostblock supplying its ownIdentityFileadds a second identity thatIdentitiesOnly yeswill still offer.Impact: A mutable profile entry can widen the offered identity set for a destination beyond the single fleet key, which contradicts the isolation the document claims for the dedicated identity; the scalar safety settings themselves remain protected.
Suggested fix: State the list-valued exception in docs/hermes-fleet-ssh.md, or keep identity selection fully infrastructure-owned: document that profile
ssh/configmust not setIdentityFileand have the check fixture reject it by asserting the emitted identity list for a fleet destination contains exactly the fleet key path.Tests and validation
Questions
tools/browser_tool_install.pyimportosat module scope and defineagent_browser_runnableand_agent_browser_candidate_present, with avalidateparameter in the enclosing function, at the patched call site? The supplied patch context shows only"""andimport pm, so a NameError at runtime is possible but not demonstrable from the supplied material.nimmo/hermesprofilessh/configat aad7557 reach each destination under exactly the bare names pinned inkeys/hermes-fleet-known-hosts(electra, lena, vega, lyra, nova, media1, de.nimmog.uk, pangolin-vps, nimmog.uk), or via matchingHostKeyAliasvalues? The check fixture only exercises a syntheticHostKeyAlias fixture, so a mismatch would meanaccept-newappends a duplicate entry instead of using the pin.TAG_BATCH_SIZEis removed? Theredviewflake input source was not supplied.Review limitations
nix flake checkpassing is taken from the pull-request text, not from supplied tool output.hermes-agentpackage definition was not supplied, soold.passthru.hermesVenv,old.passthru.python.sitePackages, the assumed$out/bin/hermesentry point, the presence oftools/{__init__,browser_tool_install}.pyin the venv, and the single-output assumption behind$out/lib/hermes-nixos-browsercould not be verified.pkgs.agent-browserandpkgs.chromiumand the executables produced bylib.getExefor them were not supplied, so the runtime browser command lines and Chromium's usability on headless Vega could not be verified.nimmo/hermesprofile repository (includingssh/configat aad7557) is outside this checkout, so destination aliases, remote accounts, and their agreement with the pinned host keys and the three approved root VPS accounts could not be checked.redviewflake input source was not supplied, so the tagger's behaviour whenTAG_BATCH_SIZEis unset could not be confirmed; no supplied check asserts on that variable, so no defect is reported for that change.Diff coverage
.sops.yaml: reviewed — included in a context-limited batchREADME.md: reviewed — included in a context-limited batchdocs/hermes-fleet-ssh.md: reviewed — included in a context-limited batchflake.nix: reviewed — included in a context-limited batchkeys/hermes-fleet-known-hosts: reviewed — included in a context-limited batchkeys/hermes-fleet.pub: reviewed — included in a context-limited batchmodules/common/hermes-browser-package.nix: reviewed — included in a context-limited batchmodules/common/hermes-browser-tools.patch: reviewed — included in a context-limited batchmodules/services/hermes-fleet-ssh.nix: reviewed — included in a context-limited batchmodules/services/hermes.nix: reviewed — included in a context-limited batchmodules/services/redview.nix: reviewed — included in a context-limited batchscripts/check-hermes-fleet-ssh.nix: reviewed — included in a context-limited batchsecrets/hermes-fleet-ssh.yaml: reviewed — included in a context-limited batchusers/nimmo.nix: reviewed — included in a context-limited batchReview metadata
Verified review 71 and published
fc10bb2.Valid improvements implemented: documented that IdentityFile accumulates matching entries and is not protected by scalar first-value precedence; added positive fleet identity coverage and a separate Git exclusion check without -i. Full nix flake check passes.
Two defect claims did not reproduce:
Previous runtime/source questions remain covered by the earlier canary and pinned-source verification; all 31 current Hermes profile aliases matched infrastructure host-key pins. The profile is published on main. No merge or activation has been performed.
The automated review run for
fc10bb2failed without posting a review: the model produced an invalid JSON artifact and its internal retry timed out after 700 seconds. CI/flake validation passed. Rerunning the review workflow; this is a tooling failure, not a reported configuration defect.Completed the user-requested five-minute review polling window (13:39–14:39 UTC). Valid documentation/identity-test improvements are published in
fc10bb2and CI passed. The first follow-up review run failed on invalid model JSON followed by a timeout; a replacement was dispatched successfully as Actions run 1246. At the final check it remains running and has posted no current-head review. Monitoring stopped at the requested one-hour limit; MR is not claimed clear, merged or deployed.Automated code review
Reviewed commit:
fc10bb224c87c5f0192b8a8b6752ddd0ef0d4cd4Verdict: Requires further work
Resolve the blocking or important findings and investigate failed deterministic checks before merging.
Overall assessment
The supplied changes (fleet-SSH identity delivery, generated client config, its new flake check, the public-key authorization in users/nimmo.nix, the browser overlay, and the Redview TAG_BATCH_SIZE removal) evaluate coherently against the checked-out code: the sops path/key match secrets/hermes-fleet-ssh.yaml and the .sops.yaml rule's recipients (vega, yubikey-nano5c, yubikey-5-nfc, provision-key) match the file's four age recipients; users/nimmo.nix is included by all four nixosConfigurations (electra, lena, lyra, vega), so the check's keyFiles assertion in scripts/check-hermes-fleet-ssh.nix is satisfiable; no other module sets openssh.authorizedKeys.keyFiles or TAG_BATCH_SIZE, and scripts/check-redview-v2-production.nix asserts nothing about the tagger environment, so its removal does not break that check. The evidenced risks are the unguarded line-context patch of an auto-updated flake input, the silent primary-user fallback when the mutable profile ssh/config is absent, and one weaker (unanchored) assertion in the new flake check.
Blocking findings
None.
Important findings
postInstall copies tools/browser_tool_install.py out of the input package's venv ('cp ${old.passthru.hermesVenv}/${old.passthru.python.sitePackages}/tools/{init,browser_tool_install}.py') and applies modules/common/hermes-browser-tools.patch, whose only locator is '@@ -64,3 +64,10 @@' with literal context ('cached: a new PM fact or profile must be visible immediately.', '"""', 'import pm'), with no existence or marker check before 'patch --directory=... -p1'. flake.nix:37 declares hermes-agent.url = "github:NousResearch/hermes-agent" and it is absent from lib/auto-update-policy.nix's 'pinned' list, while lib/auto-update-policy.nix:241-244 lists hermes-agent as an auto-update group with hosts = [ "vega" ]. remediation/worker-prompt.md:24-25 states that 'standalone flake-input failures' are diagnosis-only.
Impact: Any upstream hermes-agent revision that shifts, renames or reformats tools/browser_tool_install.py (or changes the venv layout or the '$out/bin/hermes' entry point) makes the Vega build fail in postInstall. Because the input is auto-updated on vega and the failure is a standalone flake input, the documented remediation policy classifies it as diagnosis-only, so no automatic pin is proposed and the hermes-agent group is held back until the overlay is repaired by hand; the build error itself does not name the overlay as the cause, making the hold slow to attribute.
Suggested fix: Make the overlay fail loudly and self-describe: verify the target file and an expected marker before patching and emit a diagnostic naming the overlay (e.g. 'hermes-browser overlay: upstream tools/browser_tool_install.py no longer matches'), or supply the behaviour from a vendored module loaded via PYTHONPATH/import hook instead of a line-context patch on upstream source. Alternatively, while the overlay is in force, move hermes-agent into lib/auto-update-policy.nix's 'pinned' list so the input cannot move under it without an explicit review.
Suggestions
Generated fleet ssh_config silently substitutes the primary user when the profile ssh/config is absent (modules/services/hermes-fleet-ssh.nix:53; medium confidence)
The generated /etc/hermes/fleet-ssh.conf ends with an unconditional 'Host *' block setting 'User ${config.nixosConfig.primaryUser}' after 'Include ${sshCfg.profileConfig}'. docs/hermes-fleet-ssh.md states OpenSSH ignores an absent include target ('allowing bootstrap before the profile file is present') and that the root destinations keep their approved account only because 'Specific account rules precede defaults'. modules/services/hermes.nix:289 runs the profile update as 'git -C "$repo_dir" pull --ff-only || true', so a missing or failed profile checkout is not surfaced as an error.
Impact: Before the profile change is present in the runtime checkout, or after a failed profile pull, every fleet destination resolves to the primary user instead of the profile's approved root accounts; the same PR text records that the VPS accounts rejected the operator key, so the resulting failures are wrong-account or confusing rather than an explicit 'no destination configured' condition. This is the state the MR says must be pulled in before activation, so it is easy to hit during rollout.
Suggested fix: Either drop the 'User' fallback and require the profile to declare destination accounts (making a missing profile an explicit, greppable error), or have preStart check that ${cfg.stateDir}/profile/ssh/config exists and log a clear warning when it does not, so the degraded bootstrap state is visible from Hermes's own terminal context.
New flake check asserts the fallback user with an unanchored match, unlike its other assertions (flake.nix:272; high confidence)
In checks.x86_64-linux.hermes-fleet-ssh, the fallback-account assertion is 'grep -Fxq ${pkgs.lib.escapeShellArg "user ${...primaryUser}"} default-options' with no anchors, while the surrounding assertions in the same derivation are anchored, e.g. 'grep -q '^user root$' root-options' and 'grep -q '^identitiesonly yes$' root-options'.
Impact: The precedence assertion for the fallback account is weaker than the rest of the check: it also matches a longer value (e.g. 'user nimmo-admin'), so a future profile or module change producing a near-miss could keep flake check green while the effective account is wrong.
Suggested fix: Anchor it consistently with the other assertions, e.g. build the pattern 'user ${primaryUser}$' (or use --exact with -F) so the check proves the exact fallback value.
Tests and validation
Questions
Review limitations
Diff coverage
.sops.yaml: reviewed — included in a context-limited batchREADME.md: reviewed — included in a context-limited batchdocs/hermes-fleet-ssh.md: reviewed — included in a context-limited batchflake.nix: reviewed — included in a context-limited batchkeys/hermes-fleet-known-hosts: reviewed — included in a context-limited batchkeys/hermes-fleet.pub: reviewed — included in a context-limited batchmodules/common/hermes-browser-package.nix: reviewed — included in a context-limited batchmodules/common/hermes-browser-tools.patch: reviewed — included in a context-limited batchmodules/services/hermes-fleet-ssh.nix: reviewed — included in a context-limited batchmodules/services/hermes.nix: reviewed — included in a context-limited batchmodules/services/redview.nix: reviewed — included in a context-limited batchscripts/check-hermes-fleet-ssh.nix: reviewed — included in a context-limited batchsecrets/hermes-fleet-ssh.yaml: reviewed — included in a context-limited batchusers/nimmo.nix: reviewed — included in a context-limited batchReview metadata
Implemented the valid follow-ups from review 72 in
6c73318.Validation: full nix flake check passes, and the actual final Hermes package builds successfully. Generated overlay-code checks covered normal source, source shifted by 20 lines, missing upstream file, missing entry point, missing discovery marker and incompatible patch context. The generated startup warning was checked with both absent and present profile files; bash syntax passes. Existing upstream stdenv deprecations and harmless concurrent Nix evaluation-cache busy messages were reviewed.
Publishing this commit and arranging bounded Paseo heartbeat checks for subsequent current-head feedback. No merge or deployment has been performed.
The review for
6c73318failed without findings: the model artifact was invalid JSON, then the internal retry timed out after 135 seconds. CI passed. Dispatched one replacement review within the existing monitoring deadline; the invalid artifact is a review-tool failure, not a reported code regression.Automated code review
Reviewed commit:
6c733186d4e33ef37a0e4e308b9403f832ec0dc9Verdict: Ready to merge
No blocking or important findings were retained, and deterministic checks passed. Suggestions remain advisory.
Overall assessment
Re-checked against the checkout: the new
hermes-fleet-sshmodule,scripts/check-hermes-fleet-ssh.nixassertions, theflake.nixssh -Gfixture, the.sops.yamlscope rule (secrets/hermes(-fleet-ssh)?\.yaml$with key group vega + yubikey-nano5c + yubikey-5-nfc + provision-key, which matches the four recipients recorded in the newsecrets/hermes-fleet-ssh.yaml), and thekeys/hermes-fleet.pubauthorization inusers/nimmo.nix(reached by all four registered configurations: vega/lyra/lena import it directly, electra viamodules/profiles/laptop.nix→modules/profiles/gui.nix) agree with each other. The browser overlay's guards and the Redview env edit are internally consistent. I found no defect provable from the supplied evidence that would fail evaluation or build. The retained items are gaps in the new deterministic gate: thessh -Gfixture proves first-value precedence for scalar options and negatively proves the fleet-identity exclusion, but it never negatively proves the known-hosts settings, and the browser overlay's guards do not cover the runtime selection mechanism. The Redview item from the initial review is unverifiable here (the application is an external input) and is reported only as a question.Blocking findings
None.
Important findings
None.
Suggestions
The
ssh -Gfixture proves identity exclusion but never proves the known-hosts settings are not also taken from the profile (flake.nix:251; medium confidence)The fixture profile deliberately sets
GlobalKnownHostsFile /tmp/ignored-global-hostsandUserKnownHostsFile /tmp/ignored-user-hostsunderHost *(flake.nix:251-252), but the assertions for those keywords only test presence of the infrastructure values:grep -q '^globalknownhostsfile /etc/hermes/fleet-known-hosts$'andgrep -Fxq "userknownhostsfile <stateDir>/.ssh/known_hosts". The identity case is handled asymmetrically and strictly stronger:if grep -q '^identityfile /run/secrets/hermes-fleet-ssh-key$' git-default-options; then ... exit 1; fi.docs/hermes-fleet-ssh.mdstates that infrastructure settings precede the include so the profile cannot override them, calling out onlyIdentityFileas accumulating, and separately promises that 'changed keys are rejected'.Impact: If OpenSSH accumulates
GlobalKnownHostsFile/UserKnownHostsFileacross included files rather than taking the first value, a profileHost *entry adds a known-hosts file that is consulted alongside/etc/hermes/fleet-known-hosts, so the 'changed keys are rejected' guarantee becomes profile-dependent; the new gate would pass either way, so it does not establish the documented property.Suggested fix: Add negative assertions for the fixture's own values, e.g.
if grep -q '^globalknownhostsfile /tmp/ignored-global-hosts$' root-options; then echo 'profile known-hosts files must not be consulted' >&2; exit 1; fi(and the same foruserknownhostsfile /tmp/ignored-user-hosts), and either name the known-hosts keywords as accumulating exceptions indocs/hermes-fleet-ssh.mdor move them out of the profile-reachable scope.Browser overlay guards do not cover the runtime selection mechanism the fix depends on (modules/common/hermes-browser-package.nix:39; medium confidence)
The added
postInstallguards test only file presence (if [ ! -f "$upstream_tools/$file" ]), the entry point (if [ ! -x "$out/bin/hermes" ]), a fixed-string grep fordef _find_agent_browser(, andpatch --fuzz=0. The fix's actual mechanism is unasserted:wrapProgram "$out/bin/hermes" --prefix PYTHONPATH : "$out/lib/hermes-nixos-browser"plus the appended__path__.append("${old.passthru.hermesVenv}/${old.passthru.python.sitePackages}/tools")in the copiedtools/__init__.py. Nothing checks thattools.browser_tool_installresolves to the patched copy under$browser_toolsrather than to the unpatched copy in the venv.Impact: An upstream layout change (module loaded by absolute path,
toolsno longer a top-level package, or an import path that bypassessys.pathordering) would leave a clean build and a cleannix flake checkwhile the patchedHERMES_AGENT_BROWSERbranch is never reached, silently restoring the generic Linux download this change exists to prevent.Suggested fix: Extend the existing fail-closed guards with a build-time shadowing assertion, e.g. run the interpreter with
PYTHONPATH="$out/lib/hermes-nixos-browser"and asserttools.browser_tool_install.__file__resolves inside$browser_tools, exiting non-zero otherwise, so the guard set matches the property the overlay relies on.Tests and validation
Questions
pkgs.agent-browserhas no definition in this repository (packages/contains no such package andflake.nixdeclares no overlays), so its existence depends entirely on the pinned nixpkgs. Can you confirmpkgs.agent-browserandpkgs.chromiumboth evaluate in the pinned package set? A missing attribute would be an evaluation error inmodules/common/hermes-browser-package.nix, reached frommodules/services/hermes.nixfor every host that enables Hermes.tools/browser_tool_install.pyreads onlyHERMES_AGENT_BROWSER; isAGENT_BROWSER_EXECUTABLE_PATH(also set bywrapProgram) consumed by the pinned hermes-agent revision, and is that variable name correct for it?ssh/configataad7557contain onlyHost-scoped destination rules? A top-level (pre-Host) directive there would be reached after the infrastructure block and could not be overridden by it, and theIncludeis placed after that block.TAG_BATCH_SIZEalso be supplied by the SOPSredview-envenvironment file (config.sops.secrets."redview-env".path, listed inenvironmentFilesimmediately below the removed assignment)? That would contradict the README's new instruction to keep it unset; the file is encrypted and was not decrypted here.checks.x86_64-linux.hermes-fleet-sshactually built in the validation path used for this MR, or is only the Nix-level assertion filescripts/check-hermes-fleet-ssh.nixexercised? Only the latter would leave thessh -Gprecedence proof (profile inclusion,ForwardAgent no/BatchMode yes/ConnectTimeout 10overriding the profile, theHost * !git.nimmog.ukexclusion, the missing-Include bootstrap path) unexecuted.Review limitations
nix flake checkwas run; the reported passing checks come only from the pull-request text.hermes-agentpackage sources (flake.lock rev2b50c8c5…, NousResearch) are not in this checkout, so the overlay's patch context, upstreamtools/__init__.py, the definitions ofagent_browser_runnable/_agent_browser_candidate_present, whetherosis imported intools/browser_tool_install.py, andAGENT_BROWSER_EXECUTABLE_PATHhandling could not be inspected.nimmo/hermesprofile repository (includingssh/configataad7557) is not in this checkout, so the profile's actual rules could not be checked against the infrastructure block.TAG_BATCH_SIZEcould not be inspected, so the initial review's GPU over-commit concern is neither confirmed nor refuted here.secrets/hermes-fleet-ssh.yamlandsecrets/redview-envwere not decrypted, so key material and any additional Redview environment overrides are unverified.Diff coverage
.sops.yaml: reviewed — included in a context-limited batchREADME.md: reviewed — included in a context-limited batchdocs/hermes-fleet-ssh.md: reviewed — included in a context-limited batchflake.nix: reviewed — included in a context-limited batchkeys/hermes-fleet-known-hosts: reviewed — included in a context-limited batchkeys/hermes-fleet.pub: reviewed — included in a context-limited batchmodules/common/hermes-browser-package.nix: reviewed — included in a context-limited batchmodules/common/hermes-browser-tools.patch: reviewed — included in a context-limited batchmodules/services/hermes-fleet-ssh.nix: reviewed — included in a context-limited batchmodules/services/hermes.nix: reviewed — included in a context-limited batchmodules/services/redview.nix: reviewed — included in a context-limited batchscripts/check-hermes-fleet-ssh.nix: reviewed — included in a context-limited batchsecrets/hermes-fleet-ssh.yaml: reviewed — included in a context-limited batchusers/nimmo.nix: reviewed — included in a context-limited batchReview metadata
The bounded Paseo follow-up window ended at 17:24 UTC (18:24 UK). Latest head is
6c73318, with the validated browser diagnostics/strict-context patch and missing-profile warning pushed. CI validation passed. The first review run failed on invalid model JSON followed by a timeout; replacement Actions run 1250 remains running and has not posted a current-head review. Stopping the heartbeat at the requested deadline. MR remains open and is not claimed clear, merged or deployed; the earlier failed review check still contributes a failed aggregate status.Review 73 now reports Ready to merge with no blocking or important findings. Verified the advisory concerns against actual tool behavior:
CI validation passed and manual review run 1250 succeeded. The aggregate MR check state still includes the failed original AI-review run 1248 (invalid JSON/timeout); the successful manual dispatch did not replace that status context. Live activation/acceptance evidence remains as documented. No additional code change, merge or deployment was performed.
Pre-merge validation completed with current main
2e865c3combined with reviewed head6c73318in a temporary integration checkout: full nix flake check and the actual Hermes browser-overlay package build both pass, including main's newer hermes-agent input. Current Vega live configuration reports revision6c73318; hermes-agent is active/running since 20:16:15 BST and the new fleet secret is delivered as hermes:hermes mode 0400, confirming the user's just test activation succeeded. The successful replacement review reports Ready to merge with no blocking/important findings; the original model-JSON/timeout failure remains a stale aggregate status. Main has no branch protection. Merging under the user's explicit instruction; normal Hermes terminal-context SSH acceptance, Lyra activation, persistent deployment and no-op evidence remain in the related open issues.