Commit a5b5a7d
committed
refactor(daemon): drop the vestigial close-time rollback, add router-level #1391 coverage
Review feedback on #1392 (thymikee), P2 items:
- The close-time save-script failure's session.actions rollback
(finalizeOrdinaryCloseScript) was left over from an earlier design
where a failed save could keep the session alive for retry. It
never does now — runCloseTeardownAndRelease always tears the
session down regardless of the outcome — so there is no surviving
session for a later write to duplicate the close action on. Drop
the rollback; the durable events.ndjson entry (which the rollback
never touched anyway) and the in-memory action now agree, both
accurately recording that the close happened.
- Add a request-router-level regression (request-router-typed-error.test.ts,
alongside the existing repair-close BLOCKER 2 test it mirrors) proving
the normalized JSON error shape a real client sees: top-level
retriable:false, details.reason/path preserved, and the session torn
down — not just that handleCloseCommand throws the right AppError
when called directly.1 parent 85a6c4f commit a5b5a7d
2 files changed
Lines changed: 51 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
| 2 | + | |
2 | 3 | | |
3 | 4 | | |
4 | 5 | | |
| |||
167 | 168 | | |
168 | 169 | | |
169 | 170 | | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
251 | 251 | | |
252 | 252 | | |
253 | 253 | | |
254 | | - | |
255 | | - | |
256 | | - | |
257 | | - | |
258 | | - | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
259 | 263 | | |
260 | 264 | | |
261 | 265 | | |
| |||
264 | 268 | | |
265 | 269 | | |
266 | 270 | | |
267 | | - | |
268 | 271 | | |
269 | 272 | | |
270 | 273 | | |
| |||
278 | 281 | | |
279 | 282 | | |
280 | 283 | | |
281 | | - | |
282 | 284 | | |
283 | 285 | | |
284 | 286 | | |
| |||
0 commit comments