8000 Bind API for creating gcroots · Issue #31 · nixidae/nixidae · GitHub
[go: up one dir, main page]

Skip to content

Bind API for creating gcroots #31

Closed
Closed

Description

@Lillecarl
No description provided.

Activity

  1. Lillecarl commented on Aug 6, 2026

    @Lillecarl
    ContributorAuthor

    This looks satisfied already, from ansinix's side at least.

    AsyncStore carries all three shapes of root (protocols.py:484-503):

    • add_temp_root(path) — lives as long as the store connection
    • add_perm_root(path, gc_root) — writes the symlink into the gcroots dir, so it needs root
    • add_indirect_root(path) — registers a symlink the caller already made, which is the unprivileged path and what nix build --out-link uses

    plus find_roots(censor=...) to read them back. Both engines implement them.

    ansinix now uses add_indirect_root for exactly the case the API is for: it evaluates a fleet in Ansible's main process and builds in forked workers minutes later, and in between nothing else references those derivations — so a collector, possibly one ansinix itself configured on the machine, can take them.

    Worth closing unless there was a fourth thing meant here.

  2. Lillecarl commented on Aug 16, 2026

    @Lillecarl
    ContributorAuthor

    This is done, and has been for a while. The issue carried no body, so here is
    what exists, layer by layer, as of ci-develop.

    The L1 bindings. nanopynix_bindings/store.pyi:

    def add_temp_root(self, path: StorePath) -> None: ...
    def add_perm_root(self, store_path: StorePath, gc_root: str) -> str: ...
    def add_indirect_root(self, path: str) -> None: ...

    The core objects. nanopynix/_core/_objects.py:447-453 wraps all three.

    The wire. nanopynix-proto/store.proto:30-31 declares AddPermRoot and
    AddIndirectRoot, and rpc/worker/_worker_store.py:309,315 serves them.

    Both engines. rpc/client/store.py:418 and inproc/_impl.py:1083,1093.

    Tests. Eighteen references across five modules, including
    bindings/test_l1_store_bindings.py, inproc/test_inproc.py and
    test_error_boundaries.py.

    store_impl.py:40 names add_perm_root and add_indirect_root among the
    operations a Python store cannot implement, and that is a different
    statement: those are LocalFSStore virtuals rather than nix::Store ones, so
    a StoreImpl cannot override them. Calling them on a real store works, which
    is what this issue asked for.

    Closing. Reopen if the surface you had in mind was something other than these
    three calls -- an owning handle that releases the root, say, or a find_roots
    counterpart on the public API.

  3. added
    source: nanopynix
    on Oct 19, 2026
  4. added theissue type on Oct 19, 2026
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: nanopynix

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      0