Skip to content

Session initiation protocol v2 - #98

Merged
plotnick merged 7 commits into
flensingfrom
session-v2
Oct 21, 2026
Merged

plotnick merged 7 commits into
flensingfrom
session-v2

Conversation

@plotnick

@plotnick plotnick commented Oct 18, 2026 •

Copy link
Copy Markdown
Collaborator

Fixes #91. Adds a signer-assigned session sequence number, which allows sessions to be totally ordered across all racks, networks, and restarts. This lets us drop several overly complex pieces of machinery, primarily the Universe flip-flop detection and its associated Bloom filter (see #79). Depends on oxidecomputer/permission-slip#349 for the signer-side pieces.

Nonce and session ID handling has also been reworked (RFD 620 update coming soon). The sush-nonce is now derived (hashed over) both a client nonce and a server nonce to ensure that no side-channel is leaked from the rack via nonce selection. SessionId instances now come only from SessionPreimage::session_id, which hashes over the baseboard ID, all of the nonces, and the sequence number, thus committing each session to exactly those parameters. Gossiped SessionRequest::Start messages include just the preimage, so the session ID must be correctly re-derived by each server.

The boundary record format changed to drop the bloom filter and add the sequence number, so added a new v1 and conversion routine from v0; we'll see if the migration machinery works soon!

The client signer now uses permslip's new session authentication (see oxidecomputer/permission-slip#348). And the session start and job start client commands now assume a relay flow when PERMSLIP_URL is unset.

plotnick and others added 5 commits October 18, 2026 07:42
The client and server now each contribute a session nonce, and the
sush nonce becomes their hash, which neither party chose alone.
SessionSeq carries the signer's wall clock reading as an opaque,
totally ordered sequence number, spoken as three codephrase words.

Sequence numbers are not yet included in the session IDs, but will
be shortly.

Co-Authored-By: Claude Mythos 5 <noreply@anthropic.com>
The rack serves a fresh server nonce per fetch, the client mixes in
its own nonce and stashes it, the signer's nonce and sequence number
come back through the operator, and the rack verifies the v2 session
id over them all before gossiping Start(id, seq). The state machine
carries the seq but does not yet order by it.

Co-Authored-By: Claude Mythos 5 <noreply@anthropic.com>
Session starts gossip the id's preimage, so every sled derives the id
and the sequence number it commits to; a forged pairing of id and
sequence number is inexpressible. Adoption and the execution floor
follow the signer-assigned order: a start wins the session slot by
exceeding the active (sequence number, id) pair, and a job runs only
when its session exceeds the committed sequence number, resumes the
committed session, or arrives live on a sled with no record.

The order is total and global, so the causal machinery it replaces is
gone: the starts/started lattice, concurrent-session annihilation, the
executed-version join, the burned-universe Bloom set, session hops,
in-memory floors, and the gossiped error events. Boundary records move
to v1, with the sequence number in the committed job; v0 records
convert with a floor of zero.

Co-Authored-By: Claude Mythos 5 <noreply@anthropic.com>
Co-Authored-By: Claude Mythos 5 <noreply@anthropic.com>
Co-Authored-By: Claude Mythos 5 <noreply@anthropic.com>
@plaidfinch

Copy link
Copy Markdown
Collaborator

I looked through this on a call with @plotnick and I think this looks good. I'm good with merging when it's passed CI.

Co-Authored-By: Claude Mythos 5 <noreply@anthropic.com>
This was previously allowed in the state machine, but not actually
supported end-to-end (e.g., the server nonce wouldn't match). But
it's semantically problematic to allow, so just forbid it.

Co-Authored-By: Claude Mythos 5 <noreply@anthropic.com>
@plotnick plotnick mentioned this pull request Oct 21, 2026
@plotnick
plotnick merged commit 2a5bc97 into flensing Oct 21, 2026
5 checks passed
@plotnick
plotnick deleted the session-v2 branch October 21, 2026 20:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants