Support ALL and LATEST data on shared native follow sessions
Expose canonical follow_data(SessionFollow, from) on the pooled native session client and gRPC/HTTP adapters. It preserves SessionData payloads, attention, accepted/durable watermarks and resume cuts for ALL and LATEST. Typed ALL follows use the same pool; only LATEST permits jumps under backpressure. Both context-test shutdown waits have one-second liveness bounds.
Internal streams stay concrete through projection and instrumentation, with one box at each public boundary. Path validation uses borrowed StreamPath::validate, avoiding a discarded owned copy, including on typed follows.
Allocation accounting
The 10k paired qualification retains 10,000 live follows per arm, alternates their opening order, and counts allocations in every poll of each real opening future. Each arm records 10,000 pending polls plus its completing polls. Earlier boxing-only accounting remains as a separate precise projection check.
| Measurement | Reviewed shape | Final implementation |
|---|---|---|
| 10,000 openings, allocations | 100,001 | 70,001 |
| 10,000 openings, bytes | 94,986,944 | 94,606,944 |
| 128 completing projection polls, allocations | 384 | 128 |
| 128 completing projection polls, bytes | 71,680 | 67,584 |
The removed cost is three allocations and 38 bytes per follow on this six-byte path: two internal boxes plus one discarded path copy. The reviewed arm restores those exact operations over the real registration/cursor path. An independent isolated measurement establishes the path-copy cost; it is not inferred from the production inverse. Separate negative controls restore the boxes and restore the path copy during opening; each must fail the same corresponding budget assertion.
The accounting includes opening-future polls only. Service tasks, dialing and prebuilt caller inputs are outside those scoped counts; no claim of total process allocation is made. allocation-counter already exists in the workspace and adds no production allocator.
Validation
- Windows
lb.ps1 cargo check --locked -p acyclic-stream --features local,http --lib --testspassed in 5.08 s, excluding 105 s slot wait. - One focused bb1 build, debug,
local,http: 54 native session tests in 3.122 s, 14 gRPC tests in 0.315 s, 2 HTTP tests in 0.064 s. All pass. Log:/home/var/log/buildbox/2026-10-16T155629141Z-144839.log. - Saturated LATEST exhausts actual credit, preserves attention and proves ALL sibling progress. Move/reconnect resumes consumed cuts; ALL metadata matches independently supplied frames. Invalid modes and checked LATEST fail before any Session RPC.
- Existing verification: 22 Loom/property checks in 0.615 s, 4 contract/property checks in 0.004 s, 20,000 ASan fuzz runs in 1 s. The production cursor lock is modeled with consumption/fencing races and a split-check negative control; shrinking/fuzz oracles assert independent wire semantics and exact seed outcomes. Logs:
/home/var/log/buildbox/2026-10-16T121403512Z-3786681.log,/home/var/log/buildbox/2026-10-16T121724961Z-3812230.log. The allocation delta changes no parser or concurrency transition. - The 10k swarm still proves eight Sessions/connections total, zero actor channels, exact delivery and linear encoded-byte bounds. Current eight-node delta p50/p99: 1.293506 / 1.846477 ms.
Append-to-follower loopback diagnostics, milliseconds (shared-host samples, no elapsed-time success gates):
| Path | Main #707 p50 / p99 | This head p50 / p99 |
|---|---|---|
| Memory | 0.001402 / 0.027161 | 0.001683 / 0.023095 |
| gRPC | 0.062234 / 0.207282 | 0.072580 / 0.155164 |
| HTTP session | not measured | 0.029414 / 0.053600 |
Decisions
- Reuse existing SessionFollow/SessionData/SessionLatestValue fields. No new application protocol, service, gateway, store or polling path. File-driven status/query state remains owned by the query client.
- ALL, LATEST and children share admission, credit, cancellation and recovery. Only the public stream boundary owns a box. Borrowed validation calls the same canonical path validator as owned construction.
- Allocation comparisons use real registration over warm Sessions. Counting scopes are synchronous future polls, so unrelated Tokio tasks cannot enter the measurement; per-arm admission and pool state starts identically.
- Reuse the existing transport/traffic fixture, wake-counted quiescence verifier and independent codec oracle. No Loom exploration caps; existing lock-order documentation and negative controls remain.
Live steps
- The inspected Cloud session transport at
f019b4a25e36151dd7d4a59c3b259b9b8fd80aeaaccepts only ALL follows. LATEST, children and checked-cursor qualification still require the platform implementation. - Deployed-service latency remains unqualified: no deployed endpoint/credential was available. Figures above are memory and loopback service measurements.
- Browser/TS consumption through the shared Rust WASM session is separate work in #722; the canonical interest-diff binding for the file-driven swarm client also remains subsequent work.
Main conflict resolution: merged origin/main at c4d46193c0a7c0e0c49a4ece4f6cd0a3a317d16d. The only conflict was the stream dependency list in Cargo.lock; both the allocation counter and main's canonical proto build helper are retained. No feature or production behavior changes were added.
Post-merge focused checks: 54 native sessions (3.122 s), 14 gRPC (0.365 s), 2 HTTP sessions (0.064 s), all passed from one debug/local,http build. Both 10k allocation counters and negative controls still pass unchanged. Windows lb.ps1 cargo check --locked -p acyclic-stream --features local,http --lib --tests passed in 10.60 s with no slot wait. Linux log: /home/var/log/buildbox/2026-10-16T160451965Z-167404.log.