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

nordisk/holger

.nornir/vec-to-bytes-migration.md

holger Vec<u8> → Bytes migration plan (zero-copy fetch path)

Shovel-ready plan for the audit HIGH "core trait returns owned Vec<u8>". ** = not yet done.

The seam

RepositoryBackendTrait::fetch (traits/src/lib.rs:160) returns Option<Vec<u8>>; change to Option<bytes::Bytes>.

Why it's worth it

Blast radius (26 impls, ~25 call sites)

Safe landing order

  1. Trait seam (fetch/fetch_many/HolgerObject::fetch → Bytes).
  2. Hot path first: RustRepoZnippy::fetch → Bytes + drop the grpc.rs stream conversion; run tests.
  3. Remaining 13 znippy backends.
  4. file-rust + file-oci.
  5. proxy + upstream + test mocks.
  6. Callers (LocalHolger:99, UI data:270, fetch_many callers).
  7. (later, separate) handle_http2_request body + ConnectorTrait::download_asset — not on the fetch hot path.

Build breaks: none expected (deref-compatible). One commit per phase; tests after each. Source: read-only scout 2026-06-28.