Commit 8cd09af
committed
refactor(runtime): hold the test doubles to the seal, and name corruption
Two terminal events was classified as `ambiguous`. Nothing is ambiguous
about it: a store seals a run on its first terminal, so a second one means
the ledger was written around the seal. It is `corrupt`, and the strict
recovery error now says what it found rather than that it was unsure.
The seal itself was an obligation only one double honoured, which is what
let that state look reachable in the first place. It is stated once now and
used by every RuntimeEventStore double, so a double cannot drift from the
SQLite store or from the interface.
Six fixtures were appending to a finished run through the API that forbids
it, using append as a way to write into the ledger rather than to test the
seal. They now seed the double directly, which is where a ledger shape no
supported store can produce belongs.
Generated-by: Claude Code1 parent 52ad1b3 commit 8cd09af
6 files changed
Lines changed: 88 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| 32 | + | |
32 | 33 | | |
33 | 34 | | |
34 | 35 | | |
| |||
186 | 187 | | |
187 | 188 | | |
188 | 189 | | |
| 190 | + | |
189 | 191 | | |
190 | 192 | | |
191 | 193 | | |
| |||
Lines changed: 43 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
Lines changed: 3 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
| 66 | + | |
66 | 67 | | |
67 | 68 | | |
68 | 69 | | |
| |||
1042 | 1043 | | |
1043 | 1044 | | |
1044 | 1045 | | |
1045 | | - | |
| 1046 | + | |
1046 | 1047 | | |
1047 | 1048 | | |
1048 | 1049 | | |
| |||
2394 | 2395 | | |
2395 | 2396 | | |
2396 | 2397 | | |
| 2398 | + | |
2397 | 2399 | | |
2398 | 2400 | | |
2399 | 2401 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
91 | 91 | | |
92 | 92 | | |
93 | 93 | | |
| 94 | + | |
94 | 95 | | |
95 | 96 | | |
96 | 97 | | |
| |||
6011 | 6012 | | |
6012 | 6013 | | |
6013 | 6014 | | |
6014 | | - | |
| 6015 | + | |
6015 | 6016 | | |
6016 | 6017 | | |
6017 | 6018 | | |
| |||
6708 | 6709 | | |
6709 | 6710 | | |
6710 | 6711 | | |
6711 | | - | |
| 6712 | + | |
6712 | 6713 | | |
6713 | 6714 | | |
6714 | 6715 | | |
| |||
10053 | 10054 | | |
10054 | 10055 | | |
10055 | 10056 | | |
10056 | | - | |
| 10057 | + | |
10057 | 10058 | | |
10058 | 10059 | | |
10059 | 10060 | | |
| |||
10122 | 10123 | | |
10123 | 10124 | | |
10124 | 10125 | | |
10125 | | - | |
| 10126 | + | |
10126 | 10127 | | |
10127 | 10128 | | |
10128 | 10129 | | |
| |||
10136 | 10137 | | |
10137 | 10138 | | |
10138 | 10139 | | |
10139 | | - | |
| 10140 | + | |
10140 | 10141 | | |
10141 | 10142 | | |
10142 | 10143 | | |
| |||
10467 | 10468 | | |
10468 | 10469 | | |
10469 | 10470 | | |
10470 | | - | |
| 10471 | + | |
10471 | 10472 | | |
10472 | 10473 | | |
10473 | 10474 | | |
| |||
13185 | 13186 | | |
13186 | 13187 | | |
13187 | 13188 | | |
| 13189 | + | |
| 13190 | + | |
| 13191 | + | |
| 13192 | + | |
| 13193 | + | |
| 13194 | + | |
| 13195 | + | |
| 13196 | + | |
| 13197 | + | |
| 13198 | + | |
| 13199 | + | |
13188 | 13200 | | |
13189 | 13201 | | |
13190 | 13202 | | |
| |||
13566 | 13578 | | |
13567 | 13579 | | |
13568 | 13580 | | |
| 13581 | + | |
| 13582 | + | |
| 13583 | + | |
| 13584 | + | |
| 13585 | + | |
| 13586 | + | |
| 13587 | + | |
| 13588 | + | |
| 13589 | + | |
| 13590 | + | |
| 13591 | + | |
13569 | 13592 | | |
13570 | 13593 | | |
13571 | 13594 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4592 | 4592 | | |
4593 | 4593 | | |
4594 | 4594 | | |
4595 | | - | |
| 4595 | + | |
4596 | 4596 | | |
4597 | | - | |
| 4597 | + | |
| 4598 | + | |
| 4599 | + | |
4598 | 4600 | | |
4599 | 4601 | | |
4600 | 4602 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
50 | | - | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
51 | 56 | | |
52 | 57 | | |
53 | 58 | | |
| |||
60 | 65 | | |
61 | 66 | | |
62 | 67 | | |
63 | | - | |
| 68 | + | |
64 | 69 | | |
65 | 70 | | |
66 | 71 | | |
| |||
0 commit comments