You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
pynixd: detect the builder-rpc-v0 feature so a remote store can present it #13
The capability probe should discover whether a store advertises builder-rpc-v0, so a remote or managed store can present the feature and pynixd can route cli/huggorm/drv builds to a Nix-master backend.
Why the ordinary probe does not work
A probe is one BuildDerivation, and every other feature is detected by Nix accepting the build. builder-rpc-v0 is the exception:
Store::Config::getDefaultSystemFeatures (libstore/store-api.cc) adds builder-rpc-v0 to system-features exactly when dynamic-derivations is on.
Nix rejects an input-addressed derivation that requires the feature at evaluation: derivation uses the builder-rpc-v0 feature, which may only be used with content-addressing derivations. So the trivial echo ... > $out probe reads a supporting store as unsupported.
What landed
KNOWN_FEATURES gained builder-rpc-v0 (9 -> 10).
_probe_features/_send_probe mark it gate_only: the probe is a floating content-addressed derivation (DerivationOutput(path="", method="nar", hash_digest=""), no out env var) whose builder produces nothing, and it is accepted unless the store refuses it as a missing system feature:
A store without the feature answers InputRejected naming the missing feature before it starts a builder; a store with it lets the build run, and the build then fails for a reason of its own. Nothing is exercised and no Nix client is involved.
Unit tests in pynixd/tests/unit/test_probe_builder_rpc_v0.py cover the shape, presence on the expected failure, absence on InputRejected, and that the ordinary probes keep the BUILT rule.
Still to do
End-to-end verification in vivarium: one guest with a master daemon plus dynamic-derivations (feature detected) against one with a release daemon (refused). A sandbox cannot start a managed nix-daemon (read-only /sys/fs/cgroup), so this runs in a VM.
Probing got one content-addressed build heavier per system per store, so a probe sweep is correspondingly slower.
Activity
Run the tests on every push