[v0.1.x/Proto] Give stream opening one phase-correct helper instead of three hand-rolled sequences #199
Labels
No labels
priority/P0
priority/P1
priority/P2
release/v0.1.0
status/blocked
status/planned
type/bug
type/design
type/test-gap
type/tracker
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
natsukium/felis#199
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What
Give the three hand-rolled "open a stream" call sites one shared, phase-correct helper so a caller cannot send a
StreamOpenerarm without its envelope.felis bridgealready has a privateopen_stream(&msg)(crates/felis-cli/src/cli_bridge.rs);cli_notifications.rs(sessions notifications subscribe) andcli_sessions.rs(rows / search streams) each re-derive the same sequence (allocate the next unopened stream id,send_correlated, register the stream with the driver) with the ordering rule repeated inline.Why it is not part of #196
#196 makes
CheckedFrame::encoderefuse aStreamOpenersent without an envelope, so the mistake becomes a typed local error instead of a silent EOF. It does not give callers the right way to do it. That helper cannot be a single genericConnection::open_stream:Driver::observing()is Observer-side andPhase::Setup-only (it debug-asserts on the phase), whileRegion::RowsandSearch::Queryopen streams fromAttached. The shape is therefore per surface (or asubscribe_notificationsverb onConnectionbeside the existing attached-phase openers), and hoisting the bridge helper touches three CLI call sites with a control-surfaces/cli doc cascade of its own.Acceptance criteria
felis-client-coreowns "next unopened stream id +send_correlated+ register";cli_bridge.rs,cli_notifications.rs, andcli_sessions.rscall it and the inline ordering comments disappear.Setup(Observer) andAttached, and that the raw sequence is no longer reachable from the CLI crate.docs/reference/ipc.mdnames the helper where it describes stream opening from the client side; no wire, CLI, or config change, so no CHANGELOG.Split from #196.