Conversation
Nix's ssh-ng/ssh build-hook trusted-client fast path sends BuildDerivation with the derivation content inline and never uploads a .drv file, so hydra-ad-hoc's previous Builds-row-and-wait flow could never load it and the client hung forever. Add an AdHocService.SubmitDerivation RPC that lets hydra-queue-runner dispatch such a derivation straight to a machine, bypassing Steps/Queues/Builds entirely, with a minimal UUID-keyed completion path back to hydra-ad-hoc. Also flip hydra-ad-hoc's trust_level() to NotTrusted: this makes Nix take the .drv-uploading build_paths path for input-addressed derivations instead of the inline fast path, so those get Hydra's normal dedup, previous-failure caching, and wake-on-completion for free. Content-addressed derivations still use the new inline path, since Nix takes that fast path for CA derivations regardless of trust. Known gaps: the new hydra-ad-hoc -> hydra-queue-runner gRPC client has no TLS config, so it cannot connect when the queue runner has mTLS enabled; and plain ssh:// (the legacy protocol) always behaves as trusted with no way to signal otherwise, so it keeps using the inline path even for input-addressed derivations. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
hydra-ad-hoc's build_derivation handler (the ssh-ng/ssh trusted-client fast path) failed on any fixed-output derivation with "invalid nixbase32 hash at position N": harmonia's read_derivation_output/ write_derivation_output hardcoded Base::NixBase32 for a CAFixed output's hash, but real Nix's derivation::write/parseDerivation (aterm.cc) encode that hash as hex (Base16) -- the same ATerm writer is shared between .drv files on disk and the BuildDerivation wire RPC, and both use hex there. Already fixed upstream in nix-community/harmonia#1177 (merged 2026-08-27, e6a597b): the write side now uses Base::Hex, and the read side auto-detects the encoding by length instead of assuming one fixed base, matching how Nix's own hash parsing behaves. Bumping the pin picks this up with no source changes needed on our side. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
- subprojects/hydra-ad-hoc/Cargo.toml: toml.workspace was alphabetically misplaced after tonic-prost instead of before tonic. - subprojects/hydra-manual/src/architecture.md: regenerate to include the new hydra-ad-hoc -> hydra-proto edge added by the queue-runner client this branch introduces. Verified with `nix flake check` (all checks green) after both fixes. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Also needed a harmonia bump.
WIP: is this the right direction to go in?