protocol: keep session order and daemon identity on one authority #343
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
Due date
No due date set.
Dependencies
No dependencies set
Reference
natsukium/felis!343
Loading…
Reference in a new issue
No description provided.
Delete branch "issue-333"
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?
Closes #333
No public operation can produce
protocol_mismatch: it named awire-generation mismatch the preface refuses before a verb runs, so the
token sat in the machine vocabulary with a
#[allow(dead_code)]and nocall site. The comment beside it called the token frozen in
v1, butthat freeze is against a consumer that cannot exist yet —
v1isunreleased and no producer exists in the workspace — so removing it now
is the same pre-release break the proto batch makes, not a
vbump.A token for this class comes back under the normal additive
machine-output policy once a public operation can raise one.
Refs #333.
A public 1.0 daemon always stamps a creation sequence, so the optional
SessionInfo.sequenceand the id-order fallback it fed only described adaemon that predates the field — a peer no released build can be. Making
the field required puts one order under the switch ring:
0, which isalso what an omitted field writes, is refused at decode instead of
quietly demoting a row.
OpsStatusReplyrepeated the build string and the wire pair thatWelcome.identityand the preface's accept already establish on everyconnection, which left a client with two authorities for one fact and no
rule for which to believe. The connector now keeps the accepted major
and the daemon's own minor (not the effective minor: against a newer
daemon the two differ, and the report is about the daemon) and composes
DaemonStatusfrom the handshake plus the live reply, sofelis daemon statusfills the same JSON keys from the same numbers andits output is unchanged in both formats.
Rejected: keeping the copy so one message carries the whole report. The
reply is read on a connection whose handshake the same client conducted,
so the copy can name nothing the client does not already hold.
The unknown-mode second decode in
serve.rsstays and is recorded aswhat it is: a diagnostic that recovers the raw enum number for a peer
not honoring the send-side contract, not a compatibility fallback. A
conforming client refuses a mode above the effective minor before
Hello, so ordinary skew never reaches that path.Refs #333.
Review
pi luna and sol reviews both passed. Non-blocking findings folded: the "optional fields" explanation no longer lists
sequence, the pool comment and session-lifecycle rationale drop the absent-sequence wording,from_halvesstates that it models same-build peers, and the daemon-ahead connector test assertsdaemon_minor. Cascade after rebasing onto #341/#342: thefelis-jsonv1 session row'ssequenceis required (schema regenerated).just proto-compat, fmt-check, prose-check, clippy--all-featuresand the Windows cross clippy pass locally; the workspace test run shows only the pre-existing socket-path-length failures on this machine. The Criterion regression gate is a known-flaky bench job and fails on every PR.