{
"id": "xyz.quasigod.lab.letta.lock",
"defs": {
"main": {
"key": "literal:self",
"type": "record",
"record": {
"type": "object",
"required": [
"holder",
"nonce",
"expiresAt"
],
"properties": {
"nonce": {
"type": "string",
"maxLength": 64,
"description": "Random value proving ownership; read back to confirm the holder is still the writer before releasing."
},
"holder": {
"type": "string",
"maxLength": 256,
"description": "Identifier of the backend instance holding the lock."
},
"expiresAt": {
"type": "string",
"format": "datetime",
"description": "TTL deadline. A lock past its deadline is treated as a crashed writer and stolen."
}
}
},
"description": "Held-writer lock record. Writers coordinate through this record: acquire (put), work, release (delete); an expired lock is stolen by the next writer. This is the in-process fast-path guard; cross-device safety against stray concurrent writes comes from per-record CAS (swapRecord) on data records."
}
},
"$type": "com.atproto.lexicon.schema",
"lexicon": 1,
"description": "Advisory single-writer lock for the space. One instance per space, fixed rkey `self`."
}