8000 pynixd: detect the builder-rpc-v0 feature so a remote store can present it · Issue #13 · nixidae/nixidae · GitHub
[go: up one dir, main page]

Skip to content

pynixd: detect the builder-rpc-v0 feature so a remote store can present it #13

Closed

Description

@Lillecarl

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:

    accepted = resp.result.status != BuildResultStatus.INPUT_REJECTED
    

    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

  1. added a commit that references this issue on Nov 17, 2026
    f218720
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    source: pynixd

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      0