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

nordisk/znippy

.nornir/plan.md

plan — znippy

The planning spine: the single source of truth for what's next, the locked decisions behind what is, and the working order. The docs describe what exists (.nornir/design.md = the map; .nornir/{benching,random-access}.md = the territory); this file is the live worklist. Supersedes the frozen legacy/TODO_NOW.md + legacy/backlog.md (kept only as history — do not add to them).

Convention: this is the nornir plan.md "spine" (see nornir/.nornir/docs-generation.md §Doc taxonomy). One source per fact — decisions live here; the docs link to them.


Laws (locked)

  1. Zero-copy channel communication. Inter-thread messages are slot indices / ChunkMeta, never payloads. (Design law 1.)
  2. No allocation in the hot path. Reused compress/decompress buffers, long-lived codec context. (Design law 2.)
  3. Deterministic checksums independent of core count. blake3 bound to chunk_seq order, over the original (pre-compression) bytes. (Design law 3.)
  4. Writer is concurrent; compressors never wait on the index. Workers pwrite their own payload at an AtomicU64 cursor; the finalizer only builds the Arrow index from ChunkMeta. (Design law 4.)
  5. No-barrier Gatling pipeline — ever. One global slice queue, no slot-completion barrier (the lbzip2-v1 bug). Decided 2026-05-24.
  6. Benchmark-first for any performance change. Baseline the OLD code, change it, re-run the SAME bench, compare on the same machine; proceed only if not slower (>10% same-machine = release-gate fail). The bench suite is nornir's (xtask/examples/nornir-bench.rs), not criterion — see .nornir/benching.md. Applies squarely to all of #7.
  7. Public/private hygiene. znippy is public; nornir is private. Never copy nornir's internal docs into znippy/.nornir. znippy's own docs follow nornir's doc conventions but carry only znippy content.

Done (0.9.x)


Open work

Priority order. Each perf item is gated by Law 6 (baseline first).

Bounded / ready

Large / standalone (still benchmark-first)

Blocked on upstream


Working order / release gate

Publish bottom-up per CLAUDE.md §Release procedure; gates per workspace_znippy/release/SPEC.md (bench → no >10% same-machine regression → history append → docs fresh → tag → publish). The README's <!-- nornir:gen --> tables regenerate from the warehouse — never hand-edited.


Session checkpoint 2026-06-10 — in-flight work LANDED + RELEASED

RELEASED 2026-06-10 (master 5c017bb): znippy-zoomies 0.1.9 (xml+json scanners, additive) and znippy-iceberg 0.1.1 (#5b reader + durable skade catalog, additive — znippy-cli's ^0.1 dep unaffected) published to crates.io; tags zoomies-v0.1.9 + iceberg-v0.1.1 pushed to codeberg. Other workspace crates unchanged at 0.9.1 (not republished). Sibling releases the same day: skade-katalog 0.1.4, nornir 0.4.4. Full bench-gate/docs-render (SPEC gates 2–5) NOT run — these are additive feature/scanner releases with no perf change; the bench harness (xtask→nornir dev-dep) is unaffected. Original pre-release checkpoint below.


Session checkpoint 2026-06-10 — in-flight work LANDED, release pending

All three in-flight streams from the 2026-06-09 checkpoint are finished, green, and on master (5983058 merge + fix(xtask) doctest on top):

Cargo.lock note (resolved): the big crypto/server tree (russh/tonic/axum/ quinn/aws-lc) is legit — it is nornir's transitive tree, pulled as a dev dep of xtask/ljar/lzip-parallel (the bench harness). Not in any published crate's runtime closure. The 2026-06-09 "investigate origin" caution is closed.

Full cargo test --workspace is GREEN (lib + integration + doctests). Only remaining work: the release itself (bench-gate → version bump → tag → cargo publish bottom-up → push to codeberg). Release order per CLAUDE.md §Release procedure / WORKSPACE.md.

Open question for the human (auto-authorized "YES on all" this session): versions chosen by the agent — see the release checkpoint appended at run time.


Session checkpoint 2026-06-09 (late) — in-flight work

Two background agents were launched on F7 and may have left UNCOMMITTED work (they were instructed not to commit; review before committing):

#5b is READY TO IMPLEMENT (deliberately not started — agent F7a owns the main tree's build): skade 0.1.0 is on crates.io. Steps are in the #5b entry above. Use skade = "0.1.0" (version-only; sibling repo) in znippy-iceberg.

Done this session (all pushed, master 7158b85): store-if-incompressible; .nornir/ doc model (design map + plan spine + inflate chapter); iceberg write backend (--meta-format/--warehouse) + compress_stream_with_sink; selective extract (--type/--repo); B6 (library decode_chunk_into + binary candidate-offset pipeline, A/B 7.12→6.70 s); linflate refill_slow corruption fix; B7 reality (linflate IS the SIMD DEFLATE; deleted ljar's diverged fork; linflate_* nornir scorecard 1.33–1.39× vs miniz); skade analyzed, verified, published to crates.io by us; workspace_znippy created+registered+pushed; nornir wishes/mcp_todo coordination files.

Still open elsewhere: _st bench refresh + docs-render-all (nornir agent); F6 spatial archive (roadmap); pre-existing dirty Cargo.lock at session start (left uncommitted on purpose — investigate origin before committing).


2026-06-11 — stree (static search tree) benched + perf-fixed

Worried about the Ragnar-derived id-lookup tree (znippy-zoomies/src/stree.rs). Found the article ("Static search trees: 40× faster than binary search", curiouscoding.nl) and reproduced his comparison.

Follow-up (same day): tried const B=16 (two-cache-line node) per request. All tests green but it regresses the batched path (best ns/q B=8→B=16: 8 MB 40→47, 128 MB 68→82, 1 GB 104→120 default) — P-way batching already hides the miss latency fewer levels would save, leaving only B=16's doubled node cost. Helps serial-only (1 GB serial 580→457) but production is batched. Reverted to B=8; count_lt_avx2 left B-agnostic so it's a one-line flip. Ragnar credit strengthened in the module header + stree.md. NOTE: couldn't re-run the full nornir suite — the sibling ../../nornir working tree is mid-edit by another agent and currently fails to compile (viz/model.rs gix mismatch); benched via a throwaway znippy-zoomies example instead (no nornir dep). Cargo.lock shows only a skade 0.4.6→0.4.8 path-dep bump, unrelated.