Repository navigation
Commit ceebc74
🚨 Refuse a retained root publication this version cannot read (#939)
Review of 3fc3f29 found that core consumed a retained publication without
parsing it. `publish()` discarded what `retain()` handed back, and `retain()`
returned the durable operation's stored value unread — so on a continuation a
record this version cannot read was accepted as history: the live operand was
bound over it, the suffix no record describes ran, and a completion was
appended on top. The CLI projector parses the same bytes and refuses them,
which is exactly why its parser cannot be the only enforcement: the trusted
host reaches `executeInstalled()` directly.
`publish()` now reads back what the journal holds and parses it before the
caller binds and before any later work. Live, the record parsed is the one just
written and the check is free; on a continuation it is the retained record, and
an unreadable one raises `StaleInputError` — the same classification a stale
loop terminal raises, so it escapes as the run's own durability failure rather
than becoming a document error that a printing boundary could absorb.
One record contract serves both readers. `parseRootBindingRecord()` holds the
version, the binding name, its agreement with the effect name replayed under,
and the closed outcome; the event reader applies it after its own event checks.
Two readings of one persisted shape would be two contracts, and the day they
disagreed is the day a history one of them refused continued through the other.
A recognized retained outcome stays authoritative: parsing reads it and never
refreshes it from today's operand, so an entry whose eligibility changed on
reconstruction still replays the positions it recorded. Ordinary execution,
legacy old-mode continuation and entry-local non-JSON behavior are unchanged.
The review also named four frozen assertions the evidence had not supplied, and
each is completed in the row that already owned it rather than in a new one:
- P3 now writes an ordinary component capture inside the `<Each>` iteration,
inside two spawned branches and inside an admitted generated fragment. Each
runs — five retained symbol reads and the fragment's own admission prove it —
and none publishes, reaches the root binding map or reaches the successor.
- P9 gains the malformed-version representative on the core continuation path,
a record whose binding disagrees with the effect name it replayed under, and
the incompatible-retention comparison at core's own owned admission in both
directions over a history that holds its terminal, each with a sound control.
- P2 mutates a member one level down rather than a scalar, so the retained
value's detachment is pinned at that depth in the entry's own binding, in the
next entry and at the position that retained the first publication.
- G2 opens the completed-prefix execution it then asserts is unchanged, so an
append to the history being inspected would be caught rather than hidden
behind an untouched copy.
Co-Authored-By: Claude Opus 5 <[email protected]>1 parent 3fc3f29 commit ceebc74
3 files changed
Lines changed: 394 additions & 40 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
88 | 88 | | |
89 | 89 | | |
90 | 90 | | |
| 91 | + | |
91 | 92 | | |
92 | 93 | | |
93 | 94 | | |
| |||
3997 | 3998 | | |
3998 | 3999 | | |
3999 | 4000 | | |
| 4001 | + | |
| 4002 | + | |
| 4003 | + | |
| 4004 | + | |
4000 | 4005 | | |
4001 | 4006 | | |
4002 | 4007 | | |
| |||
4024 | 4029 | | |
4025 | 4030 | | |
4026 | 4031 | | |
| 4032 | + | |
| 4033 | + | |
| 4034 | + | |
| 4035 | + | |
| 4036 | + | |
| 4037 | + | |
| 4038 | + | |
| 4039 | + | |
| 4040 | + | |
| 4041 | + | |
| 4042 | + | |
| 4043 | + | |
| 4044 | + | |
| 4045 | + | |
| 4046 | + | |
| 4047 | + | |
| 4048 | + | |
| 4049 | + | |
| 4050 | + | |
| 4051 | + | |
| 4052 | + | |
| 4053 | + | |
| 4054 | + | |
| 4055 | + | |
| 4056 | + | |
4027 | 4057 | | |
4028 | 4058 | | |
4029 | 4059 | | |
| |||
4131 | 4161 | | |
4132 | 4162 | | |
4133 | 4163 | | |
4134 | | - | |
| 4164 | + | |
4135 | 4165 | | |
4136 | 4166 | | |
4137 | 4167 | | |
4138 | 4168 | | |
4139 | 4169 | | |
4140 | 4170 | | |
4141 | | - | |
4142 | | - | |
| 4171 | + | |
| 4172 | + | |
4143 | 4173 | | |
4144 | 4174 | | |
4145 | 4175 | | |
| |||
4149 | 4179 | | |
4150 | 4180 | | |
4151 | 4181 | | |
4152 | | - | |
| 4182 | + | |
4153 | 4183 | | |
4154 | 4184 | | |
4155 | 4185 | | |
4156 | 4186 | | |
4157 | | - | |
| 4187 | + | |
4158 | 4188 | | |
4159 | 4189 | | |
4160 | 4190 | | |
| |||
4180 | 4210 | | |
4181 | 4211 | | |
4182 | 4212 | | |
4183 | | - | |
| 4213 | + | |
| 4214 | + | |
| 4215 | + | |
| 4216 | + | |
4184 | 4217 | | |
4185 | | - | |
4186 | | - | |
| 4218 | + | |
| 4219 | + | |
| 4220 | + | |
| 4221 | + | |
| 4222 | + | |
| 4223 | + | |
4187 | 4224 | | |
4188 | | - | |
| 4225 | + | |
4189 | 4226 | | |
4190 | 4227 | | |
4191 | 4228 | | |
4192 | 4229 | | |
4193 | | - | |
| 4230 | + | |
| 4231 | + | |
| 4232 | + | |
| 4233 | + | |
| 4234 | + | |
| 4235 | + | |
| 4236 | + | |
| 4237 | + | |
| 4238 | + | |
| 4239 | + | |
4194 | 4240 | | |
4195 | 4241 | | |
4196 | 4242 | | |
| |||
4202 | 4248 | | |
4203 | 4249 | | |
4204 | 4250 | | |
4205 | | - | |
| 4251 | + | |
| 4252 | + | |
| 4253 | + | |
| 4254 | + | |
| 4255 | + | |
| 4256 | + | |
| 4257 | + | |
| 4258 | + | |
| 4259 | + | |
| 4260 | + | |
| 4261 | + | |
4206 | 4262 | | |
4207 | 4263 | | |
4208 | 4264 | | |
| |||
4216 | 4272 | | |
4217 | 4273 | | |
4218 | 4274 | | |
| 4275 | + | |
| 4276 | + | |
| 4277 | + | |
| 4278 | + | |
4219 | 4279 | | |
4220 | 4280 | | |
4221 | 4281 | | |
| |||
4235 | 4295 | | |
4236 | 4296 | | |
4237 | 4297 | | |
4238 | | - | |
4239 | | - | |
4240 | | - | |
4241 | | - | |
4242 | | - | |
4243 | | - | |
4244 | | - | |
4245 | | - | |
4246 | | - | |
4247 | | - | |
| 4298 | + | |
| 4299 | + | |
| 4300 | + | |
| 4301 | + | |
| 4302 | + | |
| 4303 | + | |
| 4304 | + | |
| 4305 | + | |
| 4306 | + | |
| 4307 | + | |
| 4308 | + | |
| 4309 | + | |
| 4310 | + | |
| 4311 | + | |
| 4312 | + | |
| 4313 | + | |
| 4314 | + | |
| 4315 | + | |
4248 | 4316 | | |
4249 | 4317 | | |
4250 | 4318 | | |
4251 | 4319 | | |
4252 | 4320 | | |
4253 | | - | |
| 4321 | + | |
4254 | 4322 | | |
4255 | 4323 | | |
4256 | 4324 | | |
| |||
4672 | 4740 | | |
4673 | 4741 | | |
4674 | 4742 | | |
| 4743 | + | |
| 4744 | + | |
| 4745 | + | |
| 4746 | + | |
4675 | 4747 | | |
4676 | 4748 | | |
4677 | 4749 | | |
| |||
4682 | 4754 | | |
4683 | 4755 | | |
4684 | 4756 | | |
4685 | | - | |
4686 | | - | |
| 4757 | + | |
| 4758 | + | |
| 4759 | + | |
| 4760 | + | |
4687 | 4761 | | |
4688 | 4762 | | |
4689 | 4763 | | |
4690 | | - | |
4691 | | - | |
4692 | | - | |
4693 | | - | |
| 4764 | + | |
4694 | 4765 | | |
4695 | 4766 | | |
| 4767 | + | |
4696 | 4768 | | |
4697 | 4769 | | |
4698 | 4770 | | |
| 4771 | + | |
4699 | 4772 | | |
4700 | | - | |
| 4773 | + | |
4701 | 4774 | | |
4702 | 4775 | | |
4703 | 4776 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
41 | | - | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
42 | 46 | | |
43 | 47 | | |
44 | 48 | | |
| |||
128 | 132 | | |
129 | 133 | | |
130 | 134 | | |
131 | | - | |
| 135 | + | |
| 136 | + | |
132 | 137 | | |
133 | 138 | | |
134 | 139 | | |
| |||
137 | 142 | | |
138 | 143 | | |
139 | 144 | | |
140 | | - | |
141 | | - | |
142 | | - | |
143 | | - | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
144 | 164 | | |
145 | 165 | | |
146 | 166 | | |
| |||
278 | 298 | | |
279 | 299 | | |
280 | 300 | | |
281 | | - | |
| 301 | + | |
282 | 302 | | |
283 | 303 | | |
284 | 304 | | |
| |||
288 | 308 | | |
289 | 309 | | |
290 | 310 | | |
291 | | - | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
292 | 343 | | |
293 | 344 | | |
294 | 345 | | |
| |||
306 | 357 | | |
307 | 358 | | |
308 | 359 | | |
309 | | - | |
| 360 | + | |
310 | 361 | | |
311 | 362 | | |
312 | 363 | | |
| |||
0 commit comments