- bus-v1 section 12 amendment 2026-10-02: an rpc.call/rpc.reply/publish attachment may name the
sender's own unsealed writer; the router seals its declared prefix on admission (copy outside
the state lock), the writer becomes the sender's hold, and with recycle:true the staging
allocation comes back as a new writer in the reply. A refused sealing send releases every
writer it named. contractDigest changes.
- SDK: ArtifactWriter::into_unsealed, Responder::reply_sealing; no rpc.responder.release after an
admitted reply; delivery payloads moved, not cloned; Fields without hashing.
- Router: every frame encoded once (id spliced at selection); admitted payloads forwarded as
pre-encoded JSON instead of deep copies; seal copies via copy_file_range with a sized buffer;
client location resolution caches the store directories.
- fly-session: result attachments kept as delivered (no artifact.retain round trip per
attachment); reply artifacts sealed by the reply that carries them, writers recycled into a
capacity-bucketed pool.
- tests: sealing.rs; artifacts.rs updated to the amendment. examples/rtt.rs measures a round trip.
A delivery's attachments now name the read location their ownership
grants (bus-v1 section 12, amendment 2026-10-01; contractDigest changes),
so a delivered artifact is read without an artifact.open round trip. A
client attachment that carries one is refused as an unknown field.
SDK and router only, no wire change: staging allocation, seals and
read_all up to 256 KiB run in place instead of on the blocking pool;
Artifact::is_hold tells an explicit hold from a delivery's handle; an
envelope is encoded from borrowed parts and decoded without copying its
body.
The write gate was one mutex the writer held across every synchronous transport
poll, and close_conn took that same mutex before reclaiming a connection's
owners. Under a transport that accepts a byte per poll the writer re-acquired it
hundreds of times while teardown queued behind it, so teardown could be starved
for a whole frame and the delivery completed just before its owner was
reclaimed. bus-v1 section 9 puts release and route-health control out of reach of
telemetry starvation; tests/sol_rereview_regressions.rs's poll-gate regression
failed 6 release runs out of 6 alone, and about one debug run in five.
The gate now separates "teardown has begun" from "a poll is in progress": a
mutex plus a condvar. begin_close sets closing once without waiting, then waits
for the poll already in progress and records whether it left a frame half
written. The writer brackets each poll with enter_poll (refused once closing)
and leave_poll(bytes) instead of holding a lock across it, so teardown's window
is one poll rather than a frame, and no byte follows it. close_conn no longer
holds the gate across reclamation. Every item is pub(crate): no public
signature changed.
The regression test no longer synchronises with a sleep. The shutdown thread
announces itself on a channel, and what follows is structural: teardown cannot
pass the gate until the held poll returns, which only release() allows. Its
delivery is 50 KB now, which a writer resuming a byte per poll cannot finish
inside the window, so the test observes the ordering instead of a coin toss and
asserts the two legal shapes of the stream: cut short with nothing appended, or
never begun with exactly the closing notices following.