You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Reuse cached retrieved-document KV blocks inside changing prompt layouts with selective cross-block recomputation across hanzo-engine and hanzoai/index. Measure TTFT and answer-quality parity against full prefill.
Scope & Canonical Architecture
Distinct from hanzoai/engine#51 prefix-only caching.
Canonical stack boundaries MUST stay intact (vfs -> hanzoai/s3 -> visor, Cloud owning lifecycle & billing, Enso routing models, Zen generating outputs, Kai returning structured non-generative decisions). Reported figures in referenced FAST/conference papers belong strictly to the original authors' environments and MUST NOT be treated as Hanzo expectations until reproduced here.
Research-to-PR Acceptance Contract (0 of 6 requirements)
1. Paper & License Audit: Link primary paper/code, summarize design, and verify license compatibility (prefer Apache-2.0/MIT for production merges; clean-room implementation or research-only report otherwise) and patent restrictions.
2. Matched Baselines: Provide reproducible upstream baseline and identical Hanzo baseline scripts/configs.
3. Falsifiable Hypothesis: Document target metrics and expected failure modes up front.
4. Deliverable: Submit bounded implementation PR (Implementation Bounty) or documented reproducible experiment including valid negative results (Research Bounty).
5. Evidence & Safety: Include correctness, concurrency, multi-tenant isolation, security, and regression tests appropriate to the subsystem.
6. Measurements & HIP Update: Publish raw before/after measurements, methodology, and status update against HIP-1345.
hanzo-kv-fabric/src/composition.rs: CompositionPlanner — per-chunk reuse/recompute decisions with signed position shifts, clamped selective-recompute windows (CacheBlend head-window recompute), fail-closed reasons (UnknownChunk, EmptyChunk, AmbiguousDuplicate, OffsetOverflow), reusable/recompute token accounting, and prompt-order violation counting the scheduler can enforce.
hanzo-kv-fabric/examples/composition_bench.rs: two-turn RAG session with shuffled retrieval order + one fresh document.
11 new tests: cargo test -p hanzo-kv-fabric — 14/14 pass on this tree (11 new + 3 upstream), zero warnings.
Measured (release build, identical workload for baseline and planner):
Acceptance contract: (1) ✔ CacheBlend (arXiv 2405.16444) audit — concept-only, clean-room, no reference code consulted; (2) ✔ strict prefix cache on the identical workload is the baseline; (3) ✔ hypotheses + failure modes in the module docs; (4) ✔ this bounded PR; (5) ✔ tests above; (6) partial — compute reduction measured at fabric level; attention-path mask/window enforcement and the HIP-1345 §2.4 update are Phase 2.
The planner input is deliberately decoupled from any directory implementation, so the scheduler can feed it from a segment directory lookup, a document store, or tests. No new dependencies, no workspace changes.
Activity
breezesamuel commentedon Nov 17, 2026
Claiming this bounty as first-mover.
Starting initial research phase:
• Primary paper/code audit + license compatibility check
• Matched baseline design draft
• Falsifiable hypothesis formulation
Publishing methodology document within 24h.
— breezesamuel
breezesamuel commentedon Nov 17, 2026
Deliverable: Draft PR #105 (composition planner, fabric tier, Phase 1)
#105
hanzo-kv-fabric/src/composition.rs:CompositionPlanner— per-chunk reuse/recompute decisions with signed position shifts, clamped selective-recompute windows (CacheBlend head-window recompute), fail-closed reasons (UnknownChunk,EmptyChunk,AmbiguousDuplicate,OffsetOverflow), reusable/recompute token accounting, and prompt-order violation counting the scheduler can enforce.hanzo-kv-fabric/examples/composition_bench.rs: two-turn RAG session with shuffled retrieval order + one fresh document.cargo test -p hanzo-kv-fabric— 14/14 pass on this tree (11 new + 3 upstream), zero warnings.Measured (release build, identical workload for baseline and planner):
Acceptance contract: (1) ✔ CacheBlend (arXiv 2405.16444) audit — concept-only, clean-room, no reference code consulted; (2) ✔ strict prefix cache on the identical workload is the baseline; (3) ✔ hypotheses + failure modes in the module docs; (4) ✔ this bounded PR; (5) ✔ tests above; (6) partial — compute reduction measured at fabric level; attention-path mask/window enforcement and the HIP-1345 §2.4 update are Phase 2.
The planner input is deliberately decoupled from any directory implementation, so the scheduler can feed it from a segment directory lookup, a document store, or tests. No new dependencies, no workspace changes.
zeekay commentedon Nov 21, 2026
Duplicate of #90; continue there. Open PRs are retargeted.