8000 pynixd: AddToStoreNar and AddToStore drop the daemon's log lines on the daemon route · Issue #1161 · nixidae/nixidae · GitHub
[go: up one dir, main page]

Skip to content

pynixd: AddToStoreNar and AddToStore drop the daemon's log lines on the daemon route #1161

Open

Description

@Lillecarl

On the daemon route, DaemonWrites.add_to_store (op 39) and add_to_store_from_dump (op 7) read the response with ReadContext.from_conn(conn) and no client (pynixd/store/daemon_writes.py). With no client, buffer_logs is on, so every STDERR_NEXT the daemon sends lands in response.logs. The handlers then build a new response and return it, and the buffered lines go nowhere.

nix-daemon sends those lines to its client as they come: the daemon's logger is the tunnel during addToStore (daemon.cc:943, daemon.cc:420). A warning the daemon prints while it adds a path (a signature warning, for example) reaches a nix copy client of nix-daemon and does not reach one of pynixd.

Op 44's per-path forward (handlers/_import.py, forward_one_path) already streams them with logs=ctx.proxy.client.

Fix: pass the client as the log sink on both routes, and add a parity test where the daemon warns during an AddToStoreNar. This changes wire bytes, so it stays out of the store-engine refactor (#1155).


Assisted-By: Claude Opus 5.5

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      0