RenewalLosingDevice

A ReturnDevice whose link can lose the pass renewals its host sends, and that counts what it lost and what it carried (#3745).

The two lists are what a row asserts its rig fired on: lostRenewals says the host signed a renewal and the device never got it, and deliveredPasses says which passes the device could hold at all. A row reads the newest delivered pass as the one the device holds, so a harness must count every pass its links carried to the device, on a Welcome or a renewal, from every process.

Properties

Link copied to clipboard
abstract val deliveredPasses: List<Grant>

Every pass a link of this device carried to it, on a Welcome or a renewal, oldest first.

Link copied to clipboard
abstract val heals: Int

How many times this device's rooms healed their seam in place through their own re-weave.

Link copied to clipboard
abstract val lostRenewals: List<Grant>

Every renewal a link of this device lost, as its host signed it, oldest first.

Functions

Link copied to clipboard
abstract suspend fun drop()

Tear the running process's link. Its room reads the tear and starts its own reconnect; every re-weave it attempts fails until restore.

Link copied to clipboard
abstract suspend fun impostor(): RoomFactory

A factory for a different device — a key of its own — whose rooms present this device's peer id.

Link copied to clipboard
abstract suspend fun kill(socketCloses: Boolean = true)

End the running process without a goodbye, as an operating system kills an app: its rooms send nothing more.

Link copied to clipboard
abstract suspend fun launch(reusePeerId: Boolean = false): RoomFactory

Start a process on this device and return its factory. Rooms the factory makes prove this device's key.

Link copied to clipboard
abstract suspend fun launchBeside(): RoomFactory

Start a second process on this device while the one launch started is still running — a second tab over the same key store — and return its factory. Rooms it makes prove this device's key under a fresh peer id of their own, so the host meets a known key under a new id with every seat of that key still connected (Decided 30).

Link copied to clipboard
abstract fun loseRenewals()

From now on, the link of the process launch started loses every us.tractat.kuilt.session.admit.AdmitMessage.GrantRenewal its host sends, after the host's send returned, and carries every other frame as before. The host sees nothing go wrong. A process launched later is not affected.

Link copied to clipboard
abstract suspend fun restore()

Let this device's link come back: the room's next re-weave heals the same seam, under the same peer id.