Your browser sucks, JavaScript disabled! Gunnar's console needs JavaScript and WebAssembly. Git over SSH on port 2222 does not.

nordisk/dwarves

.nornir/add-warehouse-ssh-populate-design.md

Add warehouse (SSH) → Populate — dwarves control over nornir's warehouse — design

Class: design · Function axis: f0 the whole (Add + Populate) · f1 SSH validation + descriptor synth · f2 the Workspaces gRPC client · f3 the AddWarehouse form model · f4 the selector-header UI wiring. Strict: states only what the feature IS. Sibling how-to: guide; zero-knowledge: for-idiots (to be rendered by the Loki bencher nornir docs book).

dwarves' warehouse header can now add a warehouse from an SSH git remote and populate it — the exact affordance nornir's own menu has, mirrored into the dwarves cockpit.

Architecture (amended doctrine)

The warehouse is nornir's (it owns the future/present/history). dwarves reaches it by gRPC to nornir-server, never directly to skade. So "Add warehouse (SSH) → Populate" is a thin gRPC client in dwarves driving nornir's existing Workspaces RPCs — the UI lives in dwarves, the warehouse-WRITE (clone the SSH members, build the Iceberg warehouse) happens in nornir. One-directional dwarves → nornir; no crate cycle (dwarves never links the nornir crate — the <guest>-embed pattern, same as nornir-funnel-embed / the Telemetry submit path).

No new nornir RPC was needed — nornir already exposes the full seam: Workspaces.Register{lazy=false} (record + EAGER populate: clone members + build the warehouse inline) and Workspaces.Fetch{force} (re-sync). dwarves consumes them.

The function map (f0)

part lives in what it is
f1 SSH + descriptor nornir-warehouse-embed/src/lib.rs validate_ssh_remote (L6: accept git@host:owner/repo.git / ssh://…, REJECT HTTPS) · repo_name_from_ssh · descriptor_for_ssh (synthesize a one-member nornir-workspace.toml)
f2 Workspaces client same crate + proto/workspaces.proto trimmed nornir.v1.Workspaces subset (List/Register/Fetch, byte-identical field numbers) → add_warehouse_by_ssh (Register eager) · populate_warehouse (Fetch force) · list_warehouses
f3 form model same crate AddWarehouse — the drivable state_json/update_json core (name + ssh_url → Add → Populate), all server I/O injected in tests
f4 UI wiring dwarves-gui/src/warehouse_select.rs WarehouseSelector::with_add_source grows an ➕ Add… control; a successful register commit_added → folds the warehouse into the picker + selects it (tabs re-bind)

Why it is shaped this way

Place in the constellation

The "active warehouse" spine (217055c) gains its onboarding door: a user with a bare SSH remote can register + populate a warehouse from dwarves without touching nornir's CLI — dwarves the cockpit, nornir the warehouse.

Deferred