Commit 138604a
authored
W99 contract gate — session lifecycle operations (#415)
Adds §7.4 to the core contract: listSaves, branchSession, deleteSave, the
three operations issues #266, #276, #277, #280 and #281 record two hosts
having invented for themselves.
Two decisions the design did not determine, both recorded in 90-decisions.md:
A branch retains its source's gameId and mints only a new sessionId, via
RecordIdSource. W99.2 asks for both a new id and a byte-identical replay
through the fork point; gameId is an envelope field, so those cannot both
hold literally. Issue #266's own criteria settle it — the identifier it
wants from a port is the unguessable session id, not gameId. The cost is
that gameId now names a lineage rather than a playthrough, which the
idempotent profile upsert and the {config, actionLog} fixture shape both
already absorb.
StoredSaveRecord gains a Clock-stamped savedAt, and the save list sorts by
it. savedAtSeq counts actions within one session, so it is not a total
order across a player's saves; without a real stamp the tiebreak is a
random UUID, and no host could retire the shadow index the operation
exists to replace.
Also registers invalid_fork_point, adds the per-saveId lock domain, and
moves the API coverage checklist from ten operations to thirteen.1 parent d7ca8eb commit 138604a
5 files changed
Lines changed: 687 additions & 20 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
37 | 55 | | |
38 | 56 | | |
39 | 57 | | |
| |||
0 commit comments