Documentation
¶
Overview ¶
Package friend is the friend lane client: the part of a friend's supervised hook service (nova-hook.client.<name>) that takes her cards from the sprint server and tells her model once (the card the-friend-lane-is-a-client-with-no-local-state, v1.3, pulled forward by the owner on 2026-10-14).
The server (nova-sprint) owns every friend lane's record: the card it holds, its generation, the lease (lane_at, renewed by every ask and progress, the tick returning a card unheard past LaneGoneAfter), and the finish. The client holds a cache it rebuilds from the server's answers and nothing else: started in an empty directory it asks the server what each lane holds and resumes from that alone. The protocol is the fleet's: one `take --as friend.<name> --lane <n>` per lane (pkg/friend LaneTakeArgv, ParseLaneHold), and the model finishes through the server's own finish verb.
Liveness is the hook record's alone: the client asks, and so renews the leases, only while the model proves (Round's proven). A dead client renews nothing, and neither does a live client whose model stopped answering its challenges: the lease runs out and the server returns the card. The model is tla/FriendLaneClient.tla (OneLanePerCard, FinishedOnce, TakenStaysTaken, RestartResumes, DeadClientReleases, DeadModelReleases; witnesses MCFriendLaneClientBroken*.cfg).
Index ¶
Constants ¶
const Subject = "SPRINT CARDS "
Subject is the subject prefix of the one notice a round's new holds make.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
Name string
Width int
Ask Ask
Dir string
// contains filtered or unexported fields
}
Client is one friend's lane client. Name is her name (her row is friend.<name>), Width her lanes (lanes 1..Width are asked), Ask the server, Dir the brief cache (a directory the client may find empty at any start).
func (*Client) LaneArgv ¶
LaneArgv is lane n's ask: the fleet's lane take, its answer as JSON (the LANE line and the card's packet with its brief).
func (*Client) Notice ¶
Notice is the one bus message for a round's fresh holds: its subject and body, the body naming every card the server says she holds now, its brief and the verbs that finish it.
func (*Client) Round ¶
Round asks the server once for every lane, 1..Width, and answers every hold the server names and, of them, the ones this client has not told the model yet (fresh), lane order. Not proven, it asks nothing: an ask renews a lease, and only a proving model's lanes are renewed. A lane whose ask fails is skipped this round, its error kept; the server's record stands, and the next round asks again.