Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
87 commits
Select commit Hold shift + click to select a range
d1b4a8c
build(cyclestore): pin private replication dependencies
ketor Nov 28, 2026
015a9a9
feat(cyclestore): add canonical records and framed journal
ketor Nov 28, 2026
637d354
feat(cyclestore): add dynamic DFS coverage index
ketor Nov 28, 2026
9da391c
build(cyclestore): isolate dependency build side effects
ketor Nov 28, 2026
bdda6e5
fix(cyclestore): close identity and replay counterexamples
ketor Nov 28, 2026
62ca4d2
Merge branch 'cyclestore/s1-index' into cyclestore/dev
ketor Nov 28, 2026
7f28e3c
Merge branch 'cyclestore/deps' into cyclestore/dev
ketor Nov 28, 2026
d3fad70
feat(cyclestore): add durable RocksDB record store
ketor Nov 28, 2026
a721c72
merge(cyclestore): integrate S1 index and private dependencies
ketor Nov 28, 2026
be262d4
fix(cyclestore): close S1 semantic projection gaps
ketor Nov 28, 2026
e4aa803
Add CycleStore S3 raft scaffold
ketor Nov 28, 2026
aa5a6cd
Merge branch 'cyclestore/s1-index' into cyclestore/dev
ketor Nov 28, 2026
db46f2d
feat(cyclestore): add lookup commit state machine
ketor Nov 28, 2026
a89f3b4
Merge branch 'cyclestore/s2-core' into cyclestore/s3-braft
ketor Nov 28, 2026
25d43db
merge(cyclestore): close S1 semantic projection gaps
ketor Nov 28, 2026
4de4e29
Integrate CycleStore business with braft
ketor Nov 28, 2026
e427472
Assert business snapshot fence highwater
ketor Nov 28, 2026
f8ec6c9
test(cyclestore): prove full S0 FSM differential semantics
ketor Nov 28, 2026
e094f5e
Merge branch 'cyclestore/s2-core' into cyclestore/dev
ketor Nov 28, 2026
e43400e
Merge branch 'cyclestore/s3-braft' into cyclestore/dev
ketor Nov 28, 2026
87f2ca7
fix(cyclestore): scope module tests outside core glob
ketor Nov 28, 2026
745e93d
merge(cyclestore): synchronize integrated development baseline
ketor Nov 28, 2026
b3ba134
merge(cyclestore): register focused FSM tests
ketor Nov 28, 2026
25b4d8e
test(cyclestore): bind fixture indices to applied state
ketor Nov 28, 2026
ed8ffe9
feat(vllm): add CycleStore shadow adapter
ketor Nov 28, 2026
1395a68
test(cyclestore): close primitive fuzzing gaps
ketor Nov 28, 2026
54c9781
test(cyclestore): report durable fuzz progress
ketor Nov 28, 2026
8f58080
Harden raft FSM and snapshot binding
ketor Nov 28, 2026
70a1e24
Gate fault boundaries and verify snapshots
ketor Nov 29, 2026
3a3400a
cyclestore-s2-reviewfix
ketor Nov 29, 2026
2e14067
Merge branch 'cyclestore/dev' into cyclestore/s3-braft
ketor Nov 29, 2026
a0ee271
Merge commit '3a3400ad4056949b52da2881c14a4a3dd3336899' into cyclesto…
ketor Nov 29, 2026
06f624e
Merge branch 'cyclestore/s1-index' into cyclestore/dev
ketor Nov 29, 2026
ecf3dfc
Merge branch 'cyclestore/s2-core' into cyclestore/dev
ketor Nov 29, 2026
a545f19
Merge branch 'cyclestore/s3-braft' into cyclestore/dev
ketor Nov 29, 2026
cf6c5df
Enable fault hook and fix snapshot evidence path
ketor Nov 29, 2026
8e13243
test(cyclestore): register snapshot and raft fault targets
ketor Nov 29, 2026
d91f3cf
Merge branch 'cyclestore/s3-braft' into cyclestore/dev
ketor Nov 29, 2026
b14976f
Fix harness helper scopes and json types
ketor Nov 29, 2026
fa4e769
Align retention assertions with delivered semantics
ketor Nov 29, 2026
d4ed37f
Normalize recovered FINAL apply index comparison
ketor Nov 29, 2026
d8bc6c3
Merge branch 'cyclestore/s3-braft' into cyclestore/dev
ketor Nov 29, 2026
cb646b7
test: bind real store faults to fresh restart logs
Nov 29, 2026
8286f11
feat(cyclestore): reuse validated evidence capabilities
Nov 29, 2026
bd38714
Merge remote-tracking branch 'upstream/main' into cyclestore/dev
ketor Nov 29, 2026
da174ef
merge: advance adapter onto PR1 evidence capabilities
ketor Nov 29, 2026
111e95b
fix(vllm): align shadow adapter with PR1 evidence semantics
ketor Nov 29, 2026
3ce4941
test(cyclestore): close capability evidence harness gaps
Nov 29, 2026
fe96b53
fix(vllm): close shadow lifecycle and evidence gaps
ketor Nov 29, 2026
c4fb4f8
fix(vllm): preserve PUT evidence and retry budget
ketor Nov 29, 2026
05e8c2e
Merge branch 'cyclestore/s4-capability' into cyclestore/s4-integrated
ketor Nov 29, 2026
9c7b265
Merge branch 'cyclestore/s4-adapter' into cyclestore/s4-integrated
ketor Nov 29, 2026
7428170
test(rdma): synchronize quarantine release probe
ketor Nov 29, 2026
cbf3f99
Fix owned process argv capture startup race
ketor Nov 29, 2026
4c7ff6c
merge: carry final PR1 candidate into S4 integration
ketor Nov 29, 2026
4db634e
merge: align S4 integration with current upstream main
ketor Nov 29, 2026
6ee88cc
fix(vllm): degrade clearly without prefill hook
ketor Nov 29, 2026
949edd1
merge: integrate upstream hook compatibility onto PR2
ketor Nov 29, 2026
6c0eb5a
fix(vllm): degrade missing prefill hooks during admission
ketor Nov 29, 2026
4ec71dd
feat(vllm): propagate hook support across multi boundary
ketor Nov 29, 2026
82c5e39
test(vllm): cover actual multi hook configurations
ketor Nov 29, 2026
2f9024d
test(cache): wait for terminal health after flush drops
ketor Nov 29, 2026
131e2f4
fix(cyclestore): isolate checkpoint metadata
ketor Nov 29, 2026
fc5d7ca
fix(cyclestore): sync new journal parent directory
ketor Nov 29, 2026
b583a80
Fix owned process startup failure cleanup
ketor Nov 29, 2026
6fd65f8
fix(cyclestore): preserve FSM boundaries for invalid commands and no-…
ketor Nov 29, 2026
92032bb
test: verify CycleStore review fixes against current main
ketor Nov 29, 2026
1fd76ca
Merge commit '2f9024d5e80ebe92b3f40786e06c529402220b20' into integrat…
ketor Nov 29, 2026
9e8f551
fix(cache): enforce shadow evidence identity
ketor Nov 29, 2026
836a5af
fix(cyclestore): replay exact capability operations
ketor Nov 29, 2026
c06848f
test: preserve verified CycleStore evidence coverage
ketor Nov 29, 2026
2139744
test: bind capability helpers to integrated sources
ketor Nov 29, 2026
391b817
fix(cyclestore): preserve final replay and journal semantics
ketor Nov 29, 2026
4bf64ed
fix(cyclestore): reject malformed full commits deterministically
ketor Nov 29, 2026
26bca9a
fix(cyclestore): bind exact replay to stored capabilities
ketor Nov 29, 2026
b5ea03a
fix(cyclestore): persist final capability replay watermark
ketor Nov 29, 2026
4e00a65
fix(cyclestore): retain exact capability replay history
ketor Nov 29, 2026
384106e
fix(cyclestore): classify authenticated replay conflicts
ketor Nov 29, 2026
3e1867c
merge: connect PR634 candidate to actual PR631 main
ketor Nov 29, 2026
a1086b8
test: keep current capability lookup fixture valid
ketor Nov 29, 2026
c24dde4
test: advance capability refresh past recovery highwater
ketor Nov 29, 2026
e5fdd74
fix: authenticate replayed capability origins
ketor Nov 29, 2026
830aa22
fix(cyclestore): preserve replay and negative-final identity
ketor Nov 29, 2026
802927a
fix(cyclestore): bind FINAL capability replay to operation
ketor Nov 29, 2026
b3b92a7
fix(cyclestore): preserve cap-only FINAL request boundary
ketor Nov 29, 2026
f6b2fc9
fix(cyclestore): preserve FINAL conflict semantics
ketor Nov 29, 2026
83f517f
test(cyclestore): retain generation replacement expiry timing
ketor Nov 29, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
79 changes: 79 additions & 0 deletions integration/vllm/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,85 @@ LMCache connector access logs, so one setting covers every integration. Format:
| `share_across_dp_sizes` | `false` | Leave the data-parallel size out of the object identity, so deployments of different DP sizes share objects (every DP replica writes the same bytes). Changes every key: objects stored so far are not found once after turning it on. |
| `lookup_rpc_port` | (ipc auto) | port for the rank-0 scheduler-side prefix-lookup RPC; set only if the default IPC socket name collides. |

### CycleStore shadow (default off)

`cyclestore_shadow` is a separate, observation-only namespace. Missing config or
`{"mode":"off"}` constructs no CycleStore client, starts no executor, emits no
RPC, and leaves RETAIN usage and physical LOAD/SAVE behavior unchanged. Shadow
mode requires explicit transport, audit and complete-layout configuration:

```json
"cyclestore_shadow": {
"mode": "shadow",
"controller_binary": "/path/to/dfkv_cycle_controller",
"address": "127.0.0.1:60200",
"request_dir": "/path/to/audit/requests",
"queue_capacity": 256,
"rpc_timeout_ms": 15000,
"required_contributors": ["worker:0"],
"layout": {"layout_digest": "<64-hex-stable-engine-layout-digest>"}
}
```

Requests must independently carry `kv_transfer_params.dfkv_cyclestore` with
`schema_version=1`, stable `operation_id`, authenticated `scope_id`,
`cache_domain_id`, and `requested_ttl`. `request_id` remains only `attempt_id`;
there is no silent request-id fallback. The adapter forms versioned
operation/receipt envelopes beside `dfkv_cache_usage`; it never puts logical
C'/W'/U' into RETAIN accounting, customer billing, or physical RETAIN fields.

Admission runs on every eligible reuse level, including all-local hits with no
LOAD. A commit needs **both** finalized prefill execution and every configured
full-rank/PP/KDA evidence contributor. `request_finished` and SAVE completion do
not replace either term. Production prefill notification requires the companion
`cyclestore/s4-vllm-hook` patch against the explicitly selected vLLM baseline;
unpatched upstream vLLM does not already provide this event.

MultiConnector forwards the finalized prefill event to every child **only where
that optional companion hook actually exists**, including non-preferred dfkv
children whose physical hit requires no LOAD or SAVE. Upstream MultiConnector
versions without `on_prefill_executed` are an explicitly **unsupported**
environment: the optional `DfkvMultiConnector` wrapper propagates the actual
outer parent's hook capability to its real inner `DfkvStoreConnector` (which
keeps its own name), then admission fixes `unsupported_prefill_hook` after
physical lookup, never a prefill fallback/new operation/Commit. Choosing plain
MultiConnector without such parent-boundary compatibility does not make it
supported. Direct connector behavior and unrelated
RETAIN traffic are unchanged. Tests that
exercise a positive Multi fan-out must use the real companion or an equivalently
reviewed test-only forwarder; injected support does not imply upstream support.
`physical.write_tokens` and `committed_complete_pages` come from terminal
physical completion evidence, never `candidate_pages * page_size`; a full
physical hit with zero SAVE writes zero tokens. Logical cached must not exceed
physical cached, and positive FINAL receipts require logicalCommitApplied plus
an allowlisted outcome, aligned path identity, digest, apply and accepted data.

Finished journals bind scope/domain/root, the complete lookup request digest,
canonical/full-page evidence digests, original prefill and immutable publication.
A reused attempt id with another operation is rejected before any new RPC. Commit
transport loss replays exactly the original token/path/prefill for at most three
attempts; pending retry evidence can be recovered by a fresh coordinator, while
close never reopens it. Response audit-write errors are separate degradation
markers and cannot erase a received response. A monotonic worker enforces the
publication deadline without another admission poll. PD consumers emit only a
reference with `publication_emitted=false`; this does not claim producer envelope
transport or Msh streaming support.

The current client always sends complete `PathEvidence` for server validation;
it does not claim `EvidenceCapability` reuse, invented digest-cache verification,
or capability-client support. Full-evidence remains its required fallback path.
`LookupTokenPayload.requestedTtl` must match the requested enum before lookup
projection is accepted; unknown/clock/leader failures stay transport-unknown.

Each RPC currently invokes the same S3 C++ protobuf-JSON CLI in a fresh process;
no Python brpc binding is claimed. This favors wire fidelity over scheduler
startup latency; resident-client optimization and a performance/latency gate
were **not** implemented or measured. Lookup/transport failure degrades shadow
state to unknown without changing physical behavior. Late receipts are reconcile
records only and never rewrite the first publication. Chat streaming's existing
final usage chunk has no `kv_transfer_params`; this adapter does **not** claim
Msh headers or the Chat-streaming Router/Nexus path is connected.

Transfer threads are shut down through vLLM's connector `shutdown()` lifecycle
hook. Shutdown stops admission, cancels queued transfers with the same visible
save/load outcomes described above, waits for active native operations, joins
Expand Down
24 changes: 24 additions & 0 deletions integration/vllm/src/dfkv_vllm/connector.py
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,30 @@ def build_connector_meta(
finally:
self._finish_call()

def on_prefill_executed(self, request: Request, prefill_stats: Any) -> None:
"""Companion vLLM core hook; not present in unpatched upstream cores."""
self._begin_call()
try:
assert self.connector_scheduler is not None
self.connector_scheduler.on_prefill_executed(request, prefill_stats)
finally:
self._finish_call()

def mark_cyclestore_evidence_ready(
self, request_id: str, contributor: str, complete_pages: int,
physical_evidence_digest: bytes, put_completed_tokens: int | None = None,
committed_complete_pages: int | None = None, put_failed_tokens: int = 0,
) -> None:
"""Ingress for the operation-level full-rank/PP/KDA evidence aggregator."""
self._begin_call()
try:
assert self.connector_scheduler is not None
self.connector_scheduler.mark_cyclestore_evidence_ready(
request_id, contributor, complete_pages, physical_evidence_digest,
put_completed_tokens, committed_complete_pages, put_failed_tokens)
finally:
self._finish_call()

def request_finished(
self,
request: Request,
Expand Down
38 changes: 38 additions & 0 deletions integration/vllm/src/dfkv_vllm/cyclestore_multi_connector.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# SPDX-License-Identifier: Apache-2.0
"""Optional parent-boundary capability propagation for CycleStore shadow.

This wrapper changes no upstream vLLM method signatures. It preserves the
existing child configuration ``kv_connector="DfkvStoreConnector"`` and merely
provides an explicit opt-in outer type for deployments that need shadow support
in both legacy and companion environments.
"""

from vllm.distributed.kv_transfer.kv_connector.factory import KVConnectorFactory
from vllm.distributed.kv_transfer.kv_connector.v1.multi_connector import MultiConnector


def apply_prefill_hook_support(parent: MultiConnector) -> None:
"""Apply the actual outer MultiConnector's hook availability to dfkv only."""
unavailable = not callable(getattr(parent, "on_prefill_executed", None))
for child in parent._connectors:
scheduler = getattr(child, "connector_scheduler", None)
if scheduler is not None and hasattr(scheduler, "_prefill_hook_unavailable"):
scheduler._prefill_hook_unavailable = unavailable


class DfkvMultiConnector(MultiConnector):
"""Opt-in outer wrapper with an actual parent/child capability boundary."""

def __init__(self, *args, **kwargs) -> None:
super().__init__(*args, **kwargs)
apply_prefill_hook_support(self)


try:
KVConnectorFactory.register_connector(
"DfkvMultiConnector", __name__, DfkvMultiConnector.__name__)
except ValueError:
# Same module may be reloaded by vLLM's factory discovery. A different class
# registered for this unique name would indicate an integration error.
if KVConnectorFactory.get_connector_class_by_name("DfkvMultiConnector") is not DfkvMultiConnector:
raise
Loading