Fix Hermes browser runtime, adaptive Redview batching and fleet SSH #325

Merged
nimmo merged 6 commits from fix/hermes-browser into main 2026-10-13 20:33:18 +01:00
Owner

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

  • Full nix flake check passes in nixos-config and the Hermes profile repository.
  • Native Hermes browser navigation and snapshot passed in an isolated canary.
  • SSH checks cover public/private delivery scope, profile inclusion and account precedence, safety defaults and Git identity separation. The actual profile and generated infrastructure configuration were checked together.
  • Dedicated-key mesh logins, Docker inspection and no-op enrollment repeats passed on Nova, media1 and nimmog-de. All three approved VPS root accounts were enrolled via Electra's operator access, with exactly one matching key entry and no-op follow-ups.
  • Existing upstream stdenv deprecation warnings were reviewed.

Remaining live evidence

  • Activate the browser and SSH configuration on Vega and exercise SSH from Hermes's normal terminal context, including the newly enrolled VPS accounts.
  • Activate adaptive batching on Lyra and confirm fresh Redview worker behavior.
  • Gather the required genuine deployment and no-op follow-up before closing the related issues.

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.

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](https://git.nimmog.uk/nimmo/hermes/commit/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 - Full `nix flake check` passes in nixos-config and the Hermes profile repository. - Native Hermes browser navigation and snapshot passed in an isolated canary. - SSH checks cover public/private delivery scope, profile inclusion and account precedence, safety defaults and Git identity separation. The actual profile and generated infrastructure configuration were checked together. - Dedicated-key mesh logins, Docker inspection and no-op enrollment repeats passed on Nova, media1 and nimmog-de. All three approved VPS root accounts were enrolled via Electra's operator access, with exactly one matching key entry and no-op follow-ups. - Existing upstream stdenv deprecation warnings were reviewed. ### Remaining live evidence - Activate the browser and SSH configuration on Vega and exercise SSH from Hermes's normal terminal context, including the newly enrolled VPS accounts. - Activate adaptive batching on Lyra and confirm fresh Redview worker behavior. - Gather the required genuine deployment and no-op follow-up before closing the related issues. 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.
Refs #321, #322. Select the Nix browser runtime ahead of Hermes PM downloads and let Redview account for shared GPU memory.
refactor(hermes): consume SSH destinations from the profile repository
All checks were successful
Build and Push Attic Cache / test (pull_request) Successful in 1m37s
Build and Push Attic Cache / build (pull_request) Has been skipped
Build and Push Attic Cache / pin-lifecycle (pull_request) Has been skipped
Build and Push Attic Cache / remediate (pull_request) Has been skipped
Build and Push Attic Cache / notify-remediation (pull_request) Has been skipped
Build and Push Attic Cache / record-remediation-notify-failure (pull_request) Has been skipped
AI pull-request review / review (pull_request) Successful in 30m48s
fca8907f50
clankbot left a comment

Automated code review

Reviewed commit: fca8907f500d7a84a7713f4d68cafbcb14813db6

Verdict: 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 ... keyFiles assertion is satisfiable. No evaluated-config regression was demonstrated. The remaining actionable issues are runtime trust-boundary properties of the generated SSH configuration that nix flake check cannot gate: an unguarded Include of a mutable, agent-authored profile file.

Blocking findings

None.

Important findings

  • Unguarded Include of the mutable profile ssh/config makes every Hermes ssh invocation fail while that file is absent (modules/services/hermes-fleet-ssh.nix:36; medium confidence)
    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 preStart git clone/pull of cfg.gitRepo into ${cfg.stateDir}/profile in modules/services/hermes.nix, and the pull is best-effort (git ... pull --ff-only || true). modules/services/hermes-fleet-ssh.nix also links ${sshDirectory}/config to this file, and modules/services/hermes.nix sets HOME=${cfg.stateDir} in hermes-agent's serviceConfig.Environment, so plain ssh invocations - including the preStart GIT_SSH_COMMAND profile pull itself - read this file. docs/hermes-fleet-ssh.md treats publishing the profile branch feat/fleet-ssh-profile as 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/*.conf with 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/config exists.

Suggestions

  • The agent-authored profile file can override the fleet's noninteractive/no-forwarding defaults (modules/services/hermes-fleet-ssh.nix:36; medium confidence)
    Include ${sshCfg.profileConfig} precedes the Host * block that supplies ForwardAgent no, BatchMode yes, ConnectTimeout 10, StrictHostKeyChecking accept-new and 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-options from 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 -o options in the wrapper) so the mutable file cannot override them.

Tests and validation

  • No configured deterministic checks.

Questions

  • Does the profile repository's default branch contain ssh/config before feat/fleet-ssh-profile is published? The nimmo/hermes repository is not in this checkout, so the ordering assumption in docs/hermes-fleet-ssh.md cannot be verified here.
  • Do the profile's HostKeyAlias values 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.
  • Does ssh -G emit forwardagent no as a default value? If so, the check's grep -q '^forwardagent no$' root-options is vacuous and does not prove the fleet config sets it, unlike the identitiesonly yes / identityagent none greps.
  • Are agent_browser_runnable and _agent_browser_candidate_present (and os) 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.
  • Is pkgs.agent-browser present in the pinned nixpkgs? No Nix evaluation was run, so modules/common/hermes-browser-package.nix's lib.getExe pkgs.agent-browser was not resolved.

Review limitations

  • No Nix evaluation, build, or nix flake check was run; the review container has no Nix toolchain, so all evaluation claims are read from source rather than observed.
  • The nimmo/hermes profile repository (ssh/config, ssh/README.md) is not part of this checkout, so destination aliases, remote accounts, and HostKeyAlias pairings were not inspected.
  • Upstream hermes-agent package sources and the built store paths were not inspected; the browser overlay's patch application and runtime behaviour were not exercised.
  • Upstream Redview behaviour (automatic batch sizing from free VRAM) is not in this checkout; the TAG_BATCH_SIZE removal was verified only as having no remaining reference in this repository (grep shows only the README.md prose at README.md:313).
  • Live deployment evidence (Vega activation, Hermes terminal SSH checks, VPS root-account logins, Lyra Redview worker behaviour) is outside the supplied evidence.
  • Secret material was not decrypted or disclosed; secrets/hermes-fleet-ssh.yaml was inspected only for its recipient set and structure against the .sops.yaml rule.

Diff coverage

  • .sops.yaml: reviewed — included in a context-limited batch
  • README.md: reviewed — included in a context-limited batch
  • docs/hermes-fleet-ssh.md: reviewed — included in a context-limited batch
  • flake.nix: reviewed — included in a context-limited batch
  • keys/hermes-fleet-known-hosts: reviewed — included in a context-limited batch
  • keys/hermes-fleet.pub: reviewed — included in a context-limited batch
  • modules/common/hermes-browser-package.nix: reviewed — included in a context-limited batch
  • modules/common/hermes-browser-tools.patch: reviewed — included in a context-limited batch
  • modules/services/hermes-fleet-ssh.nix: reviewed — included in a context-limited batch
  • modules/services/hermes.nix: reviewed — included in a context-limited batch
  • modules/services/redview.nix: reviewed — included in a context-limited batch
  • scripts/check-hermes-fleet-ssh.nix: reviewed — included in a context-limited batch
  • secrets/hermes-fleet-ssh.yaml: reviewed — included in a context-limited batch
  • users/nimmo.nix: reviewed — included in a context-limited batch
Review metadata
  • Reviewer: forgejo-ai-review v1
  • Model: strata/strata
  • Guidance loaded: .forgejo/ai-review.md, .forgejo/ai-review.yml, AGENTS.md, docs/auto-update-remediation.md, docs/hermes-fleet-ssh.md, docs/nova-remote-builder.md, README.md
  • Commits considered: 3
  • Previous automated review: none found
  • Findings: 2
<!-- forgejo-ai-review:v1 --> ## Automated code review Reviewed commit: `fca8907f500d7a84a7713f4d68cafbcb14813db6` ## Verdict: 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 ... keyFiles` assertion is satisfiable. No evaluated-config regression was demonstrated. The remaining actionable issues are runtime trust-boundary properties of the generated SSH configuration that `nix flake check` cannot gate: an unguarded Include of a mutable, agent-authored profile file. ### Blocking findings None. ### Important findings - **Unguarded Include of the mutable profile ssh/config makes every Hermes ssh invocation fail while that file is absent** (modules/services/hermes-fleet-ssh.nix:36; medium confidence) 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 preStart `git clone`/`pull` of `cfg.gitRepo` into `${cfg.stateDir}/profile` in modules/services/hermes.nix, and the pull is best-effort (`git ... pull --ff-only || true`). modules/services/hermes-fleet-ssh.nix also links `${sshDirectory}/config` to this file, and modules/services/hermes.nix sets `HOME=${cfg.stateDir}` in hermes-agent's serviceConfig.Environment, so plain ssh invocations - including the preStart `GIT_SSH_COMMAND` profile pull itself - read this file. docs/hermes-fleet-ssh.md treats publishing the profile branch `feat/fleet-ssh-profile` as 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/*.conf` with 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/config` exists. ### Suggestions - **The agent-authored profile file can override the fleet's noninteractive/no-forwarding defaults** (modules/services/hermes-fleet-ssh.nix:36; medium confidence) `Include ${sshCfg.profileConfig}` precedes the `Host *` block that supplies `ForwardAgent no`, `BatchMode yes`, `ConnectTimeout 10`, `StrictHostKeyChecking accept-new` and 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-options` from 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 `-o` options in the wrapper) so the mutable file cannot override them. ### Tests and validation - No configured deterministic checks. ### Questions - Does the profile repository's default branch contain `ssh/config` before `feat/fleet-ssh-profile` is published? The `nimmo/hermes` repository is not in this checkout, so the ordering assumption in docs/hermes-fleet-ssh.md cannot be verified here. - Do the profile's `HostKeyAlias` values 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. - Does `ssh -G` emit `forwardagent no` as a default value? If so, the check's `grep -q '^forwardagent no$' root-options` is vacuous and does not prove the fleet config sets it, unlike the `identitiesonly yes` / `identityagent none` greps. - Are `agent_browser_runnable` and `_agent_browser_candidate_present` (and `os`) 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. - Is `pkgs.agent-browser` present in the pinned nixpkgs? No Nix evaluation was run, so modules/common/hermes-browser-package.nix's `lib.getExe pkgs.agent-browser` was not resolved. ### Review limitations - No Nix evaluation, build, or `nix flake check` was run; the review container has no Nix toolchain, so all evaluation claims are read from source rather than observed. - The `nimmo/hermes` profile repository (ssh/config, ssh/README.md) is not part of this checkout, so destination aliases, remote accounts, and HostKeyAlias pairings were not inspected. - Upstream `hermes-agent` package sources and the built store paths were not inspected; the browser overlay's patch application and runtime behaviour were not exercised. - Upstream Redview behaviour (automatic batch sizing from free VRAM) is not in this checkout; the TAG_BATCH_SIZE removal was verified only as having no remaining reference in this repository (grep shows only the README.md prose at README.md:313). - Live deployment evidence (Vega activation, Hermes terminal SSH checks, VPS root-account logins, Lyra Redview worker behaviour) is outside the supplied evidence. - Secret material was not decrypted or disclosed; secrets/hermes-fleet-ssh.yaml was inspected only for its recipient set and structure against the .sops.yaml rule. ### Diff coverage - `.sops.yaml`: **reviewed** — included in a context-limited batch - `README.md`: **reviewed** — included in a context-limited batch - `docs/hermes-fleet-ssh.md`: **reviewed** — included in a context-limited batch - `flake.nix`: **reviewed** — included in a context-limited batch - `keys/hermes-fleet-known-hosts`: **reviewed** — included in a context-limited batch - `keys/hermes-fleet.pub`: **reviewed** — included in a context-limited batch - `modules/common/hermes-browser-package.nix`: **reviewed** — included in a context-limited batch - `modules/common/hermes-browser-tools.patch`: **reviewed** — included in a context-limited batch - `modules/services/hermes-fleet-ssh.nix`: **reviewed** — included in a context-limited batch - `modules/services/hermes.nix`: **reviewed** — included in a context-limited batch - `modules/services/redview.nix`: **reviewed** — included in a context-limited batch - `scripts/check-hermes-fleet-ssh.nix`: **reviewed** — included in a context-limited batch - `secrets/hermes-fleet-ssh.yaml`: **reviewed** — included in a context-limited batch - `users/nimmo.nix`: **reviewed** — included in a context-limited batch <details><summary>Review metadata</summary> - Reviewer: forgejo-ai-review v1 - Model: strata/strata - Guidance loaded: .forgejo/ai-review.md, .forgejo/ai-review.yml, AGENTS.md, docs/auto-update-remediation.md, docs/hermes-fleet-ssh.md, docs/nova-remote-builder.md, README.md - Commits considered: 3 - Previous automated review: none found - Findings: 2 </details>
fix(hermes): preserve SSH safety settings across profile updates
All checks were successful
Build and Push Attic Cache / test (pull_request) Successful in 1m33s
Build and Push Attic Cache / build (pull_request) Has been skipped
Build and Push Attic Cache / pin-lifecycle (pull_request) Has been skipped
Build and Push Attic Cache / remediate (pull_request) Has been skipped
Build and Push Attic Cache / notify-remediation (pull_request) Has been skipped
Build and Push Attic Cache / record-remediation-notify-failure (pull_request) Has been skipped
AI pull-request review / review (pull_request) Successful in 22m7s
c364d29ea8
Author
Owner

Addressed review 70 in c364d29.

  • Valid: the mutable profile could override scalar safety settings because it was included first. Infrastructure identity/agent, noninteractive, forwarding, timeout and host-trust settings now precede the Include; profile destination accounts still precede the fallback user. The regression fixture deliberately supplies contrary values and verifies they cannot override the infrastructure settings. This also makes the ForwardAgent check meaningful rather than testing an OpenSSH default. OpenSSH uses the first configured scalar value: https://man.openbsd.org/ssh_config
  • Bootstrap isolation: both GIT_SSH_COMMAND and the startup clone/pull command now use -F /dev/null with the explicit Git identity and noninteractive/no-forwarding options, so mutable fleet configuration cannot affect the profile update path.
  • Not reproduced: an absent literal Include does not make OpenSSH fail. A direct ssh -G test exited 0, and the permanent flake regression now checks the generated configuration with an absent profile. No placeholder file or single-use migration is needed.
  • The profile prerequisite is published to nimmo/hermes main at aad7557. Deployment documentation now records that fact rather than describing publication as a future step. All 31 profile aliases were checked against the infrastructure host-key pins.
  • Pinned browser source verification: browser_tool_install.py imports os and agent_browser_runnable (defined in hermes_constants.py), and defines _agent_browser_candidate_present. The package evaluates and prior native browser canary passed.

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.

Addressed review 70 in c364d29. - Valid: the mutable profile could override scalar safety settings because it was included first. Infrastructure identity/agent, noninteractive, forwarding, timeout and host-trust settings now precede the Include; profile destination accounts still precede the fallback user. The regression fixture deliberately supplies contrary values and verifies they cannot override the infrastructure settings. This also makes the ForwardAgent check meaningful rather than testing an OpenSSH default. OpenSSH uses the first configured scalar value: https://man.openbsd.org/ssh_config - Bootstrap isolation: both GIT_SSH_COMMAND and the startup clone/pull command now use -F /dev/null with the explicit Git identity and noninteractive/no-forwarding options, so mutable fleet configuration cannot affect the profile update path. - Not reproduced: an absent literal Include does not make OpenSSH fail. A direct ssh -G test exited 0, and the permanent flake regression now checks the generated configuration with an absent profile. No placeholder file or single-use migration is needed. - The profile prerequisite is published to nimmo/hermes main at aad7557. Deployment documentation now records that fact rather than describing publication as a future step. All 31 profile aliases were checked against the infrastructure host-key pins. - Pinned browser source verification: browser_tool_install.py imports os and agent_browser_runnable (defined in hermes_constants.py), and defines _agent_browser_candidate_present. The package evaluates and prior native browser canary passed. 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.
clankbot left a comment

Automated code review

Reviewed commit: c364d29ea8499244a7b95a12bb691e406a170e87

Verdict: 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.yaml rule secrets/hermes(-fleet-ssh)?\.yaml$ exactly; users/nimmo.nix reaches all four registered nixosConfigurations (vega, lena, lyra directly; electra via modules/profiles/gui.nix:24), which is what scripts/check-hermes-fleet-ssh.nix asserts; 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 on TAG_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

  • Browser overlay is anchored to fixed line offsets in a floating, auto-updated input (modules/common/hermes-browser-tools.patch:3; medium confidence)
    The overlay is applied unconditionally in postInstall as patch --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 from hermes-agent.url = "github:NousResearch/hermes-agent" (flake.nix:37), which has no ref or revision pin, and lib/auto-update-policy.nix:241 lists hermes-agent as a normal auto-update groups entry with hosts = [ "vega" ]; the only pinned entry in that file (line 248) is nixpkgs-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 - makes patch fail in postInstall and 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/pins contract (or move hermes-agent out of the auto-update groups) so the offset-sensitive patch is validated before acceptance, or rewrite the overlay so it does not depend on upstream line offsets - e.g. shadow tools.browser_tool_install with a repo-owned wrapper module that reads HERMES_AGENT_BROWSER and 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 in git-options (flake.nix:284-287). A command-line -i overrides IdentityFile from 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.uk exclusion were removed or inverted, or the fleet identity were otherwise injected, nix flake check would 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.uk and require that no identityfile line names /run/secrets/hermes-fleet-ssh-key; keep the explicit -i invocation only as a separate positive assertion about identity selection, and add a positive assertion that a fleet destination resolves identityfile /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, IdentitiesOnly and IdentityAgent, followed by Include ${sshCfg.profileConfig} (line 46). 'First obtained value wins' applies to the scalar options, but IdentityFile is list-valued and accumulates across matching blocks, so a profile Host block supplying its own IdentityFile adds a second identity that IdentitiesOnly yes will 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/config must not set IdentityFile and 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

  • No configured deterministic checks.

Questions

  • Does upstream tools/browser_tool_install.py import os at module scope and define agent_browser_runnable and _agent_browser_candidate_present, with a validate parameter in the enclosing function, at the patched call site? The supplied patch context shows only """ and import pm, so a NameError at runtime is possible but not demonstrable from the supplied material.
  • Does the nimmo/hermes profile ssh/config at aad7557 reach each destination under exactly the bare names pinned in keys/hermes-fleet-known-hosts (electra, lena, vega, lyra, nova, media1, de.nimmog.uk, pangolin-vps, nimmog.uk), or via matching HostKeyAlias values? The check fixture only exercises a synthetic HostKeyAlias fixture, so a mismatch would mean accept-new appends a duplicate entry instead of using the pin.
  • Is Redview's tagger free-VRAM sizing bounded on Lyra's shared GPU with the persistent Qwen encoder plus four concurrent workers, or does it need an explicit ceiling now that TAG_BATCH_SIZE is removed? The redview flake input source was not supplied.

Review limitations

  • No Nix evaluation, build, or deployment was performed; nix flake check passing is taken from the pull-request text, not from supplied tool output.
  • The upstream hermes-agent package definition was not supplied, so old.passthru.hermesVenv, old.passthru.python.sitePackages, the assumed $out/bin/hermes entry point, the presence of tools/{__init__,browser_tool_install}.py in the venv, and the single-output assumption behind $out/lib/hermes-nixos-browser could not be verified.
  • The nixpkgs attributes pkgs.agent-browser and pkgs.chromium and the executables produced by lib.getExe for them were not supplied, so the runtime browser command lines and Chromium's usability on headless Vega could not be verified.
  • The nimmo/hermes profile repository (including ssh/config at 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.
  • The redview flake input source was not supplied, so the tagger's behaviour when TAG_BATCH_SIZE is unset could not be confirmed; no supplied check asserts on that variable, so no defect is reported for that change.
  • Live runtime behaviour (Hermes terminal SSH, native browser navigation, Redview worker batching, VPS root-account logins) remains evidence per the documentation and was not exercised here.

Diff coverage

  • .sops.yaml: reviewed — included in a context-limited batch
  • README.md: reviewed — included in a context-limited batch
  • docs/hermes-fleet-ssh.md: reviewed — included in a context-limited batch
  • flake.nix: reviewed — included in a context-limited batch
  • keys/hermes-fleet-known-hosts: reviewed — included in a context-limited batch
  • keys/hermes-fleet.pub: reviewed — included in a context-limited batch
  • modules/common/hermes-browser-package.nix: reviewed — included in a context-limited batch
  • modules/common/hermes-browser-tools.patch: reviewed — included in a context-limited batch
  • modules/services/hermes-fleet-ssh.nix: reviewed — included in a context-limited batch
  • modules/services/hermes.nix: reviewed — included in a context-limited batch
  • modules/services/redview.nix: reviewed — included in a context-limited batch
  • scripts/check-hermes-fleet-ssh.nix: reviewed — included in a context-limited batch
  • secrets/hermes-fleet-ssh.yaml: reviewed — included in a context-limited batch
  • users/nimmo.nix: reviewed — included in a context-limited batch
Review metadata
  • Reviewer: forgejo-ai-review v1
  • Model: strata/strata
  • Guidance loaded: .forgejo/ai-review.md, .forgejo/ai-review.yml, AGENTS.md, docs/auto-update-remediation.md, docs/hermes-fleet-ssh.md, docs/nova-remote-builder.md, README.md
  • Commits considered: 4
  • Previous automated review: none found
  • Findings: 3
<!-- forgejo-ai-review:v1 --> ## Automated code review Reviewed commit: `c364d29ea8499244a7b95a12bb691e406a170e87` ## Verdict: 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.yaml` rule `secrets/hermes(-fleet-ssh)?\.yaml$` exactly; `users/nimmo.nix` reaches all four registered nixosConfigurations (vega, lena, lyra directly; electra via `modules/profiles/gui.nix:24`), which is what `scripts/check-hermes-fleet-ssh.nix` asserts; 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 on `TAG_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 - **Browser overlay is anchored to fixed line offsets in a floating, auto-updated input** (modules/common/hermes-browser-tools.patch:3; medium confidence) The overlay is applied unconditionally in `postInstall` as `patch --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 from `hermes-agent.url = "github:NousResearch/hermes-agent"` (flake.nix:37), which has no ref or revision pin, and `lib/auto-update-policy.nix:241` lists `hermes-agent` as a normal auto-update `groups` entry with `hosts = [ "vega" ]`; the only `pinned` entry in that file (line 248) is `nixpkgs-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 - makes `patch` fail in `postInstall` and 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/pins` contract (or move `hermes-agent` out of the auto-update `groups`) so the offset-sensitive patch is validated before acceptance, or rewrite the overlay so it does not depend on upstream line offsets - e.g. shadow `tools.browser_tool_install` with a repo-owned wrapper module that reads `HERMES_AGENT_BROWSER` and 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 in `git-options` (flake.nix:284-287). A command-line `-i` overrides `IdentityFile` from 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.uk` exclusion were removed or inverted, or the fleet identity were otherwise injected, `nix flake check` would 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.uk` and require that no `identityfile` line names `/run/secrets/hermes-fleet-ssh-key`; keep the explicit `-i` invocation only as a separate positive assertion about identity selection, and add a positive assertion that a fleet destination resolves `identityfile /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`, `IdentitiesOnly` and `IdentityAgent`, followed by `Include ${sshCfg.profileConfig}` (line 46). 'First obtained value wins' applies to the scalar options, but `IdentityFile` is list-valued and accumulates across matching blocks, so a profile `Host` block supplying its own `IdentityFile` adds a second identity that `IdentitiesOnly yes` will 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/config` must not set `IdentityFile` and 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 - No configured deterministic checks. ### Questions - Does upstream `tools/browser_tool_install.py` import `os` at module scope and define `agent_browser_runnable` and `_agent_browser_candidate_present`, with a `validate` parameter in the enclosing function, at the patched call site? The supplied patch context shows only `"""` and `import pm`, so a NameError at runtime is possible but not demonstrable from the supplied material. - Does the `nimmo/hermes` profile `ssh/config` at aad7557 reach each destination under exactly the bare names pinned in `keys/hermes-fleet-known-hosts` (electra, lena, vega, lyra, nova, media1, de.nimmog.uk, pangolin-vps, nimmog.uk), or via matching `HostKeyAlias` values? The check fixture only exercises a synthetic `HostKeyAlias fixture`, so a mismatch would mean `accept-new` appends a duplicate entry instead of using the pin. - Is Redview's tagger free-VRAM sizing bounded on Lyra's shared GPU with the persistent Qwen encoder plus four concurrent workers, or does it need an explicit ceiling now that `TAG_BATCH_SIZE` is removed? The `redview` flake input source was not supplied. ### Review limitations - No Nix evaluation, build, or deployment was performed; `nix flake check` passing is taken from the pull-request text, not from supplied tool output. - The upstream `hermes-agent` package definition was not supplied, so `old.passthru.hermesVenv`, `old.passthru.python.sitePackages`, the assumed `$out/bin/hermes` entry point, the presence of `tools/{__init__,browser_tool_install}.py` in the venv, and the single-output assumption behind `$out/lib/hermes-nixos-browser` could not be verified. - The nixpkgs attributes `pkgs.agent-browser` and `pkgs.chromium` and the executables produced by `lib.getExe` for them were not supplied, so the runtime browser command lines and Chromium's usability on headless Vega could not be verified. - The `nimmo/hermes` profile repository (including `ssh/config` at 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. - The `redview` flake input source was not supplied, so the tagger's behaviour when `TAG_BATCH_SIZE` is unset could not be confirmed; no supplied check asserts on that variable, so no defect is reported for that change. - Live runtime behaviour (Hermes terminal SSH, native browser navigation, Redview worker batching, VPS root-account logins) remains evidence per the documentation and was not exercised here. ### Diff coverage - `.sops.yaml`: **reviewed** — included in a context-limited batch - `README.md`: **reviewed** — included in a context-limited batch - `docs/hermes-fleet-ssh.md`: **reviewed** — included in a context-limited batch - `flake.nix`: **reviewed** — included in a context-limited batch - `keys/hermes-fleet-known-hosts`: **reviewed** — included in a context-limited batch - `keys/hermes-fleet.pub`: **reviewed** — included in a context-limited batch - `modules/common/hermes-browser-package.nix`: **reviewed** — included in a context-limited batch - `modules/common/hermes-browser-tools.patch`: **reviewed** — included in a context-limited batch - `modules/services/hermes-fleet-ssh.nix`: **reviewed** — included in a context-limited batch - `modules/services/hermes.nix`: **reviewed** — included in a context-limited batch - `modules/services/redview.nix`: **reviewed** — included in a context-limited batch - `scripts/check-hermes-fleet-ssh.nix`: **reviewed** — included in a context-limited batch - `secrets/hermes-fleet-ssh.yaml`: **reviewed** — included in a context-limited batch - `users/nimmo.nix`: **reviewed** — included in a context-limited batch <details><summary>Review metadata</summary> - Reviewer: forgejo-ai-review v1 - Model: strata/strata - Guidance loaded: .forgejo/ai-review.md, .forgejo/ai-review.yml, AGENTS.md, docs/auto-update-remediation.md, docs/hermes-fleet-ssh.md, docs/nova-remote-builder.md, README.md - Commits considered: 4 - Previous automated review: none found - Findings: 3 </details>
test(hermes): verify fleet identity selection and document additive keys
Some checks failed
Build and Push Attic Cache / test (pull_request) Successful in 1m23s
Build and Push Attic Cache / build (pull_request) Has been skipped
Build and Push Attic Cache / pin-lifecycle (pull_request) Has been skipped
Build and Push Attic Cache / remediate (pull_request) Has been skipped
Build and Push Attic Cache / notify-remediation (pull_request) Has been skipped
Build and Push Attic Cache / record-remediation-notify-failure (pull_request) Has been skipped
AI pull-request review / review (pull_request) Failing after 30m11s
fc10bb224c
Author
Owner

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:

  1. GNU patch is context-based, not fixed-offset-only. Prepending 20 lines to the actual pinned browser_tool_install.py still applies the existing patch successfully (reported offset 22). Nearby upstream API/context changes can legitimately require maintenance, but edits above the function do not inherently break it, and freezing the auto-updated input is not justified by this claim.
  2. -i does not discard configured IdentityFile entries. A direct ssh -G test emits both the command-line identity and the config identity. Removing !git.nimmog.uk from the actual generated config makes the existing -i guard detect /run/secrets/hermes-fleet-ssh-key, so the claimed unreachable guard is reachable. The additional no--i and positive fleet checks now make the intended coverage explicit.

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.

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: 1. GNU patch is context-based, not fixed-offset-only. Prepending 20 lines to the actual pinned browser_tool_install.py still applies the existing patch successfully (reported offset 22). Nearby upstream API/context changes can legitimately require maintenance, but edits above the function do not inherently break it, and freezing the auto-updated input is not justified by this claim. 2. -i does not discard configured IdentityFile entries. A direct ssh -G test emits both the command-line identity and the config identity. Removing !git.nimmog.uk from the actual generated config makes the existing -i guard detect /run/secrets/hermes-fleet-ssh-key, so the claimed unreachable guard is reachable. The additional no--i and positive fleet checks now make the intended coverage explicit. 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.
Author
Owner

The automated review run for fc10bb2 failed 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.

The automated review run for fc10bb2 failed 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.
Author
Owner

Completed the user-requested five-minute review polling window (13:39–14:39 UTC). Valid documentation/identity-test improvements are published in fc10bb2 and 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.

Completed the user-requested five-minute review polling window (13:39–14:39 UTC). Valid documentation/identity-test improvements are published in fc10bb2 and 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.
clankbot left a comment

Automated code review

Reviewed commit: fc10bb224c87c5f0192b8a8b6752ddd0ef0d4cd4

Verdict: 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

  • Browser overlay patches upstream hermes-agent source at a fixed line context with no guard, under an auto-updated input (modules/common/hermes-browser-package.nix:19; medium confidence)
    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

  • No configured deterministic checks.

Questions

  • Do the profile's HostKeyAlias values in nimmo/hermes ssh/config exactly match the aliases pinned in keys/hermes-fleet-known-hosts (electra, lena, vega, lyra, nova, media1, de.nimmog.uk, pangolin-vps, totalgeek.co.uk, nimmog.uk)? The profile repository is not in this checkout, so a mismatch would mean the pinned keys are never consulted and StrictHostKeyChecking accept-new would silently enrol a new entry.
  • Is pkgs.agent-browser present in the current nixpkgs revision, and does lib.getExe resolve for it and for pkgs.chromium? modules/common/hermes-browser-package.nix is the only reference to either attribute in this checkout, so neither name nor its resolvability under Vega's service sandbox could be verified.
  • Does Redview's tagger actually size batches from free VRAM when TAG_BATCH_SIZE is unset? Nothing in this checkout demonstrates that behaviour (modules/services/redview.nix now carries only a comment), and scripts/check-redview-v2-production.nix asserts no tagger environment settings at all; should that check gain a deterministic assertion for the tagger environment?

Review limitations

  • No Nix tooling was available, so 'nix flake check', the new checks.x86_64-linux.hermes-fleet-ssh derivation and scripts/check-hermes-fleet-ssh.nix were not executed; the claim that flake check passes is taken as stated.
  • The hermes-agent flake input is external: bin/hermes, passthru.hermesVenv, passthru.python.sitePackages, and the source around line 64 of tools/browser_tool_install.py (including agent_browser_runnable, _agent_browser_candidate_present and 'import os') could not be inspected, so the overlay's assumptions and the patch's applicability remain unverified.
  • The nimmo/hermes profile repository (ssh/config, ssh/README.md, commit aad7557) is not in this checkout, so destination aliases, routes, HostKeyAlias values and the three root account rules were not cross-checked against the generated fleet-ssh.conf or the pinned host keys.
  • pkgs.agent-browser and pkgs.chromium attributes and executable names were not inspected; no repository file other than modules/common/hermes-browser-package.nix references them.
  • No runtime or live evidence was supplied for Vega activation, Hermes terminal-context SSH, the newly enrolled VPS accounts, or Lyra's Redview tagger behaviour; the 'Remaining live evidence' items in the PR text are unexecuted.
  • Non-NixOS provisioning (ssh-copy-id enrolment on Nova, media1, nimmog-de), Mass-storage DSM and the Windows Desktop exclusion are described only in prose; nothing in this checkout controls them.

Diff coverage

  • .sops.yaml: reviewed — included in a context-limited batch
  • README.md: reviewed — included in a context-limited batch
  • docs/hermes-fleet-ssh.md: reviewed — included in a context-limited batch
  • flake.nix: reviewed — included in a context-limited batch
  • keys/hermes-fleet-known-hosts: reviewed — included in a context-limited batch
  • keys/hermes-fleet.pub: reviewed — included in a context-limited batch
  • modules/common/hermes-browser-package.nix: reviewed — included in a context-limited batch
  • modules/common/hermes-browser-tools.patch: reviewed — included in a context-limited batch
  • modules/services/hermes-fleet-ssh.nix: reviewed — included in a context-limited batch
  • modules/services/hermes.nix: reviewed — included in a context-limited batch
  • modules/services/redview.nix: reviewed — included in a context-limited batch
  • scripts/check-hermes-fleet-ssh.nix: reviewed — included in a context-limited batch
  • secrets/hermes-fleet-ssh.yaml: reviewed — included in a context-limited batch
  • users/nimmo.nix: reviewed — included in a context-limited batch
Review metadata
  • Reviewer: forgejo-ai-review v1
  • Model: strata/strata
  • Guidance loaded: .forgejo/ai-review.md, .forgejo/ai-review.yml, AGENTS.md, docs/auto-update-remediation.md, docs/hermes-fleet-ssh.md, docs/nova-remote-builder.md, README.md
  • Commits considered: 5
  • Previous automated review: none found
  • Findings: 3
<!-- forgejo-ai-review:v1 --> ## Automated code review Reviewed commit: `fc10bb224c87c5f0192b8a8b6752ddd0ef0d4cd4` ## Verdict: 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 - **Browser overlay patches upstream hermes-agent source at a fixed line context with no guard, under an auto-updated input** (modules/common/hermes-browser-package.nix:19; medium confidence) 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 - No configured deterministic checks. ### Questions - Do the profile's HostKeyAlias values in nimmo/hermes ssh/config exactly match the aliases pinned in keys/hermes-fleet-known-hosts (electra, lena, vega, lyra, nova, media1, de.nimmog.uk, pangolin-vps, totalgeek.co.uk, nimmog.uk)? The profile repository is not in this checkout, so a mismatch would mean the pinned keys are never consulted and StrictHostKeyChecking accept-new would silently enrol a new entry. - Is pkgs.agent-browser present in the current nixpkgs revision, and does lib.getExe resolve for it and for pkgs.chromium? modules/common/hermes-browser-package.nix is the only reference to either attribute in this checkout, so neither name nor its resolvability under Vega's service sandbox could be verified. - Does Redview's tagger actually size batches from free VRAM when TAG_BATCH_SIZE is unset? Nothing in this checkout demonstrates that behaviour (modules/services/redview.nix now carries only a comment), and scripts/check-redview-v2-production.nix asserts no tagger environment settings at all; should that check gain a deterministic assertion for the tagger environment? ### Review limitations - No Nix tooling was available, so 'nix flake check', the new checks.x86_64-linux.hermes-fleet-ssh derivation and scripts/check-hermes-fleet-ssh.nix were not executed; the claim that flake check passes is taken as stated. - The hermes-agent flake input is external: bin/hermes, passthru.hermesVenv, passthru.python.sitePackages, and the source around line 64 of tools/browser_tool_install.py (including agent_browser_runnable, _agent_browser_candidate_present and 'import os') could not be inspected, so the overlay's assumptions and the patch's applicability remain unverified. - The nimmo/hermes profile repository (ssh/config, ssh/README.md, commit aad7557) is not in this checkout, so destination aliases, routes, HostKeyAlias values and the three root account rules were not cross-checked against the generated fleet-ssh.conf or the pinned host keys. - pkgs.agent-browser and pkgs.chromium attributes and executable names were not inspected; no repository file other than modules/common/hermes-browser-package.nix references them. - No runtime or live evidence was supplied for Vega activation, Hermes terminal-context SSH, the newly enrolled VPS accounts, or Lyra's Redview tagger behaviour; the 'Remaining live evidence' items in the PR text are unexecuted. - Non-NixOS provisioning (ssh-copy-id enrolment on Nova, media1, nimmog-de), Mass-storage DSM and the Windows Desktop exclusion are described only in prose; nothing in this checkout controls them. ### Diff coverage - `.sops.yaml`: **reviewed** — included in a context-limited batch - `README.md`: **reviewed** — included in a context-limited batch - `docs/hermes-fleet-ssh.md`: **reviewed** — included in a context-limited batch - `flake.nix`: **reviewed** — included in a context-limited batch - `keys/hermes-fleet-known-hosts`: **reviewed** — included in a context-limited batch - `keys/hermes-fleet.pub`: **reviewed** — included in a context-limited batch - `modules/common/hermes-browser-package.nix`: **reviewed** — included in a context-limited batch - `modules/common/hermes-browser-tools.patch`: **reviewed** — included in a context-limited batch - `modules/services/hermes-fleet-ssh.nix`: **reviewed** — included in a context-limited batch - `modules/services/hermes.nix`: **reviewed** — included in a context-limited batch - `modules/services/redview.nix`: **reviewed** — included in a context-limited batch - `scripts/check-hermes-fleet-ssh.nix`: **reviewed** — included in a context-limited batch - `secrets/hermes-fleet-ssh.yaml`: **reviewed** — included in a context-limited batch - `users/nimmo.nix`: **reviewed** — included in a context-limited batch <details><summary>Review metadata</summary> - Reviewer: forgejo-ai-review v1 - Model: strata/strata - Guidance loaded: .forgejo/ai-review.md, .forgejo/ai-review.yml, AGENTS.md, docs/auto-update-remediation.md, docs/hermes-fleet-ssh.md, docs/nova-remote-builder.md, README.md - Commits considered: 5 - Previous automated review: none found - Findings: 3 </details>
Author
Owner

Implemented the valid follow-ups from review 72 in 6c73318.

  • Browser overlay now checks the upstream tool files, executable entry point and discovery function marker, and emits explicit hermes-browser overlay diagnostics on missing/incompatible source or patch failure.
  • Expanded the patch context around the discovery function and disabled GNU patch fuzz. Line shifts still apply, but changed context fails explicitly. Tests showed that the former short hunk could apply with fuzz even after context changed; this is now prevented.
  • Gateway startup warns when the fleet SSH profile is missing, explaining that aliases and approved account rules are unavailable. It remains bootstrap-compatible and does not stop the isolated Git update path.
  • The unanchored-grep claim is invalid: grep -Fxq already requires an exact whole-line match (-x). No change to that assertion is needed.

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.

Implemented the valid follow-ups from review 72 in 6c73318. - Browser overlay now checks the upstream tool files, executable entry point and discovery function marker, and emits explicit hermes-browser overlay diagnostics on missing/incompatible source or patch failure. - Expanded the patch context around the discovery function and disabled GNU patch fuzz. Line shifts still apply, but changed context fails explicitly. Tests showed that the former short hunk could apply with fuzz even after context changed; this is now prevented. - Gateway startup warns when the fleet SSH profile is missing, explaining that aliases and approved account rules are unavailable. It remains bootstrap-compatible and does not stop the isolated Git update path. - The unanchored-grep claim is invalid: grep -Fxq already requires an exact whole-line match (-x). No change to that assertion is needed. 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.
fix(hermes): diagnose browser overlay drift and missing SSH profiles
Some checks failed
Build and Push Attic Cache / test (pull_request) Successful in 1m25s
Build and Push Attic Cache / build (pull_request) Has been skipped
Build and Push Attic Cache / pin-lifecycle (pull_request) Has been skipped
Build and Push Attic Cache / remediate (pull_request) Has been skipped
Build and Push Attic Cache / notify-remediation (pull_request) Has been skipped
Build and Push Attic Cache / record-remediation-notify-failure (pull_request) Has been skipped
AI pull-request review / review (pull_request) Has been cancelled
6c733186d4
Author
Owner

The review for 6c73318 failed 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.

The review for 6c73318 failed 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.
clankbot left a comment

Automated code review

Reviewed commit: 6c733186d4e33ef37a0e4e308b9403f832ec0dc9

Verdict: 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-ssh module, scripts/check-hermes-fleet-ssh.nix assertions, the flake.nix ssh -G fixture, the .sops.yaml scope 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 new secrets/hermes-fleet-ssh.yaml), and the keys/hermes-fleet.pub authorization in users/nimmo.nix (reached by all four registered configurations: vega/lyra/lena import it directly, electra via modules/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: the ssh -G fixture 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 -G fixture 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-hosts and UserKnownHostsFile /tmp/ignored-user-hosts under Host * (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$' and grep -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.md states that infrastructure settings precede the include so the profile cannot override them, calling out only IdentityFile as accumulating, and separately promises that 'changed keys are rejected'.
    Impact: If OpenSSH accumulates GlobalKnownHostsFile/UserKnownHostsFile across included files rather than taking the first value, a profile Host * 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 for userknownhostsfile /tmp/ignored-user-hosts), and either name the known-hosts keywords as accumulating exceptions in docs/hermes-fleet-ssh.md or 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 postInstall guards test only file presence (if [ ! -f "$upstream_tools/$file" ]), the entry point (if [ ! -x "$out/bin/hermes" ]), a fixed-string grep for def _find_agent_browser(, and patch --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 copied tools/__init__.py. Nothing checks that tools.browser_tool_install resolves to the patched copy under $browser_tools rather than to the unpatched copy in the venv.
    Impact: An upstream layout change (module loaded by absolute path, tools no longer a top-level package, or an import path that bypasses sys.path ordering) would leave a clean build and a clean nix flake check while the patched HERMES_AGENT_BROWSER branch 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 assert tools.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

  • No configured deterministic checks.

Questions

  • pkgs.agent-browser has no definition in this repository (packages/ contains no such package and flake.nix declares no overlays), so its existence depends entirely on the pinned nixpkgs. Can you confirm pkgs.agent-browser and pkgs.chromium both evaluate in the pinned package set? A missing attribute would be an evaluation error in modules/common/hermes-browser-package.nix, reached from modules/services/hermes.nix for every host that enables Hermes.
  • The supplied patch to tools/browser_tool_install.py reads only HERMES_AGENT_BROWSER; is AGENT_BROWSER_EXECUTABLE_PATH (also set by wrapProgram) consumed by the pinned hermes-agent revision, and is that variable name correct for it?
  • Does the profile repository's ssh/config at aad7557 contain only Host-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 the Include is placed after that block.
  • Could TAG_BATCH_SIZE also be supplied by the SOPS redview-env environment file (config.sops.secrets."redview-env".path, listed in environmentFiles immediately 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.
  • Is checks.x86_64-linux.hermes-fleet-ssh actually built in the validation path used for this MR, or is only the Nix-level assertion file scripts/check-hermes-fleet-ssh.nix exercised? Only the latter would leave the ssh -G precedence proof (profile inclusion, ForwardAgent no/BatchMode yes/ConnectTimeout 10 overriding the profile, the Host * !git.nimmog.uk exclusion, the missing-Include bootstrap path) unexecuted.

Review limitations

  • No Nix evaluation, build, or nix flake check was run; the reported passing checks come only from the pull-request text.
  • The pinned hermes-agent package sources (flake.lock rev 2b50c8c5…, NousResearch) are not in this checkout, so the overlay's patch context, upstream tools/__init__.py, the definitions of agent_browser_runnable/_agent_browser_candidate_present, whether os is imported in tools/browser_tool_install.py, and AGENT_BROWSER_EXECUTABLE_PATH handling could not be inspected.
  • The nimmo/hermes profile repository (including ssh/config at aad7557) is not in this checkout, so the profile's actual rules could not be checked against the infrastructure block.
  • The Redview application is an external input; its adaptive batch algorithm and any default for TAG_BATCH_SIZE could not be inspected, so the initial review's GPU over-commit concern is neither confirmed nor refuted here.
  • SOPS-managed values in secrets/hermes-fleet-ssh.yaml and secrets/redview-env were not decrypted, so key material and any additional Redview environment overrides are unverified.
  • Live evidence cited in the pull request (canary browser run, mesh logins on Nova/media1/nimmog-de, VPS root enrollment, Electra operator access) cannot be confirmed from the supplied repository material.

Diff coverage

  • .sops.yaml: reviewed — included in a context-limited batch
  • README.md: reviewed — included in a context-limited batch
  • docs/hermes-fleet-ssh.md: reviewed — included in a context-limited batch
  • flake.nix: reviewed — included in a context-limited batch
  • keys/hermes-fleet-known-hosts: reviewed — included in a context-limited batch
  • keys/hermes-fleet.pub: reviewed — included in a context-limited batch
  • modules/common/hermes-browser-package.nix: reviewed — included in a context-limited batch
  • modules/common/hermes-browser-tools.patch: reviewed — included in a context-limited batch
  • modules/services/hermes-fleet-ssh.nix: reviewed — included in a context-limited batch
  • modules/services/hermes.nix: reviewed — included in a context-limited batch
  • modules/services/redview.nix: reviewed — included in a context-limited batch
  • scripts/check-hermes-fleet-ssh.nix: reviewed — included in a context-limited batch
  • secrets/hermes-fleet-ssh.yaml: reviewed — included in a context-limited batch
  • users/nimmo.nix: reviewed — included in a context-limited batch
Review metadata
  • Reviewer: forgejo-ai-review v1
  • Model: strata/strata
  • Guidance loaded: .forgejo/ai-review.md, .forgejo/ai-review.yml, AGENTS.md, docs/auto-update-remediation.md, docs/hermes-fleet-ssh.md, docs/nova-remote-builder.md, README.md
  • Commits considered: 6
  • Previous automated review: none found
  • Findings: 2
<!-- forgejo-ai-review:v1 --> ## Automated code review Reviewed commit: `6c733186d4e33ef37a0e4e308b9403f832ec0dc9` ## Verdict: 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-ssh` module, `scripts/check-hermes-fleet-ssh.nix` assertions, the `flake.nix` `ssh -G` fixture, the `.sops.yaml` scope 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 new `secrets/hermes-fleet-ssh.yaml`), and the `keys/hermes-fleet.pub` authorization in `users/nimmo.nix` (reached by all four registered configurations: vega/lyra/lena import it directly, electra via `modules/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: the `ssh -G` fixture 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 -G` fixture 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-hosts` and `UserKnownHostsFile /tmp/ignored-user-hosts` under `Host *` (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$'` and `grep -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.md` states that infrastructure settings precede the include so the profile cannot override them, calling out only `IdentityFile` as accumulating, and separately promises that 'changed keys are rejected'. Impact: If OpenSSH accumulates `GlobalKnownHostsFile`/`UserKnownHostsFile` across included files rather than taking the first value, a profile `Host *` 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 for `userknownhostsfile /tmp/ignored-user-hosts`), and either name the known-hosts keywords as accumulating exceptions in `docs/hermes-fleet-ssh.md` or 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 `postInstall` guards test only file presence (`if [ ! -f "$upstream_tools/$file" ]`), the entry point (`if [ ! -x "$out/bin/hermes" ]`), a fixed-string grep for `def _find_agent_browser(`, and `patch --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 copied `tools/__init__.py`. Nothing checks that `tools.browser_tool_install` resolves to the patched copy under `$browser_tools` rather than to the unpatched copy in the venv. Impact: An upstream layout change (module loaded by absolute path, `tools` no longer a top-level package, or an import path that bypasses `sys.path` ordering) would leave a clean build and a clean `nix flake check` while the patched `HERMES_AGENT_BROWSER` branch 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 assert `tools.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 - No configured deterministic checks. ### Questions - `pkgs.agent-browser` has no definition in this repository (`packages/` contains no such package and `flake.nix` declares no overlays), so its existence depends entirely on the pinned nixpkgs. Can you confirm `pkgs.agent-browser` and `pkgs.chromium` both evaluate in the pinned package set? A missing attribute would be an evaluation error in `modules/common/hermes-browser-package.nix`, reached from `modules/services/hermes.nix` for every host that enables Hermes. - The supplied patch to `tools/browser_tool_install.py` reads only `HERMES_AGENT_BROWSER`; is `AGENT_BROWSER_EXECUTABLE_PATH` (also set by `wrapProgram`) consumed by the pinned hermes-agent revision, and is that variable name correct for it? - Does the profile repository's `ssh/config` at `aad7557` contain only `Host`-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 the `Include` is placed after that block. - Could `TAG_BATCH_SIZE` also be supplied by the SOPS `redview-env` environment file (`config.sops.secrets."redview-env".path`, listed in `environmentFiles` immediately 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. - Is `checks.x86_64-linux.hermes-fleet-ssh` actually built in the validation path used for this MR, or is only the Nix-level assertion file `scripts/check-hermes-fleet-ssh.nix` exercised? Only the latter would leave the `ssh -G` precedence proof (profile inclusion, `ForwardAgent no`/`BatchMode yes`/`ConnectTimeout 10` overriding the profile, the `Host * !git.nimmog.uk` exclusion, the missing-Include bootstrap path) unexecuted. ### Review limitations - No Nix evaluation, build, or `nix flake check` was run; the reported passing checks come only from the pull-request text. - The pinned `hermes-agent` package sources (flake.lock rev `2b50c8c5…`, NousResearch) are not in this checkout, so the overlay's patch context, upstream `tools/__init__.py`, the definitions of `agent_browser_runnable`/`_agent_browser_candidate_present`, whether `os` is imported in `tools/browser_tool_install.py`, and `AGENT_BROWSER_EXECUTABLE_PATH` handling could not be inspected. - The `nimmo/hermes` profile repository (including `ssh/config` at `aad7557`) is not in this checkout, so the profile's actual rules could not be checked against the infrastructure block. - The Redview application is an external input; its adaptive batch algorithm and any default for `TAG_BATCH_SIZE` could not be inspected, so the initial review's GPU over-commit concern is neither confirmed nor refuted here. - SOPS-managed values in `secrets/hermes-fleet-ssh.yaml` and `secrets/redview-env` were not decrypted, so key material and any additional Redview environment overrides are unverified. - Live evidence cited in the pull request (canary browser run, mesh logins on Nova/media1/nimmog-de, VPS root enrollment, Electra operator access) cannot be confirmed from the supplied repository material. ### Diff coverage - `.sops.yaml`: **reviewed** — included in a context-limited batch - `README.md`: **reviewed** — included in a context-limited batch - `docs/hermes-fleet-ssh.md`: **reviewed** — included in a context-limited batch - `flake.nix`: **reviewed** — included in a context-limited batch - `keys/hermes-fleet-known-hosts`: **reviewed** — included in a context-limited batch - `keys/hermes-fleet.pub`: **reviewed** — included in a context-limited batch - `modules/common/hermes-browser-package.nix`: **reviewed** — included in a context-limited batch - `modules/common/hermes-browser-tools.patch`: **reviewed** — included in a context-limited batch - `modules/services/hermes-fleet-ssh.nix`: **reviewed** — included in a context-limited batch - `modules/services/hermes.nix`: **reviewed** — included in a context-limited batch - `modules/services/redview.nix`: **reviewed** — included in a context-limited batch - `scripts/check-hermes-fleet-ssh.nix`: **reviewed** — included in a context-limited batch - `secrets/hermes-fleet-ssh.yaml`: **reviewed** — included in a context-limited batch - `users/nimmo.nix`: **reviewed** — included in a context-limited batch <details><summary>Review metadata</summary> - Reviewer: forgejo-ai-review v1 - Model: strata/strata - Guidance loaded: .forgejo/ai-review.md, .forgejo/ai-review.yml, AGENTS.md, docs/auto-update-remediation.md, docs/hermes-fleet-ssh.md, docs/nova-remote-builder.md, README.md - Commits considered: 6 - Previous automated review: none found - Findings: 2 </details>
Author
Owner

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.

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.
Author
Owner

Review 73 now reports Ready to merge with no blocking or important findings. Verified the advisory concerns against actual tool behavior:

  • ssh -G emits all GlobalKnownHostsFile/UserKnownHostsFile values on a single line, so the existing exact-line assertions already reject additional profile paths. A two-path formatting probe confirmed this. Negative path assertions would be redundant for the current gate.
  • Using the actual built Hermes interpreter in an isolated temporary home, tools.browser_tool_install.file resolved to the patched overlay and _find_agent_browser(validate=False) selected HERMES_AGENT_BROWSER's native executable. This confirms current runtime selection; a permanent shadowing test remains a future coverage suggestion, not a demonstrated defect.

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.

Review 73 now reports Ready to merge with no blocking or important findings. Verified the advisory concerns against actual tool behavior: - ssh -G emits all GlobalKnownHostsFile/UserKnownHostsFile values on a single line, so the existing exact-line assertions already reject additional profile paths. A two-path formatting probe confirmed this. Negative path assertions would be redundant for the current gate. - Using the actual built Hermes interpreter in an isolated temporary home, tools.browser_tool_install.__file__ resolved to the patched overlay and _find_agent_browser(validate=False) selected HERMES_AGENT_BROWSER's native executable. This confirms current runtime selection; a permanent shadowing test remains a future coverage suggestion, not a demonstrated defect. 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.
Author
Owner

Pre-merge validation completed with current main 2e865c3 combined with reviewed head 6c73318 in 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 revision 6c73318; 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.

Pre-merge validation completed with current main 2e865c3 combined with reviewed head 6c73318 in 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 revision 6c73318; 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.
nimmo merged commit 07c7c058aa into main 2026-10-13 20:33:18 +01:00
Sign in to join this conversation.
No reviewers
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
nimmo/nixos-config!325
No description provided.