refactor: carry the connection's role in its phase #84
No reviewers
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!84
Loading…
Reference in a new issue
No description provided.
Delete branch "refactor/driver-phases-46"
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?
Fixes #46.
Phasestopped atSteady, so one state served a welcomed connectionwaiting to attach, an attached session, and a notification observer.
Kind-level admission had to be permissive enough for all three, and each
call site made up the difference by hand: the daemon's pre-attach loop
refused a second opener, the attached pump refused a second
Attach, theobserver loop refused everything but a cancel, and the client decoded
uncorrelated session replies straight off a kind match, past the driver's
direction and phase columns. A peer reading the arm table saw none of that.
The phase splits into
Setup | Attached | Observing, each arm declares itsphases in the same table
felis.protorestates, and the driver admits everyinbound frame against it once: the kind fold before the body decodes, the
arm's own row after. The hand guards go with it, and
DriverError::OutOfPhasenames the phases an arm does belong to. Mode is checked before phase so a
surface the connection never asked for is answered with a typed
Conn::Refusedrather than told to wait for a state it can never reach.Doc cascade:
docs/reference/ipc.mdgains the "Connection phases" ladder andtransition table beside the arm table's
phasescolumn; the explanation twindocs/explanation/architecture/ipc.mdrecords why the ladder is data thedriver owns rather than a typestate (the driver is shared behind a mutex in
the GUI and behind
&mutin three daemon loops) and why there is noClosingphase; REQ-114 in
docs/reference/spec.mdnow names the out-of-phase frameand the ladder;
CHANGELOG.mdrecords the wire-visiblephasescolumn change.Verified: just check green (fmt, clippy, nextest, deny); reviewed by
plan/correctness/docs lenses and pi sol.