Commit dbc2824
committed
Keep latest session selection tied to real session recency
The next repo-local sweep target was ROADMAP ultraworkers#72: the `latest`
managed-session alias could depend on filesystem mtime before the
session's own persisted recency markers, which made the selection
path vulnerable to coarse or misleading file timestamps. The fix
promotes `updated_at_ms` into the summary/order path, keeps CLI
wrappers in sync, and locks the mtime-vs-session-recency case with
regression coverage.
Constraint: Preserve existing managed-session storage layout while changing only the ordering signal
Rejected: Keep sorting by filesystem mtime and just sleep longer in tests | hides the semantic ordering bug instead of fixing it
Confidence: high
Scope-risk: narrow
Reversibility: clean
Directive: Any future managed-session ordering change must keep runtime and CLI summary structs aligned on the same recency fields
Tested: cargo fmt --all --check; cargo clippy --workspace --all-targets -- -D warnings; cargo test --workspace; architect review APPROVE
Not-tested: Cross-filesystem behavior where persisted session JSON cannot be read and fallback ordering uses mtime only1 parent f309ff8 commit dbc2824
3 files changed
Lines changed: 48 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
515 | 515 | | |
516 | 516 | | |
517 | 517 | | |
| 518 | + | |
| 519 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
144 | 144 | | |
145 | 145 | | |
146 | 146 | | |
147 | | - | |
148 | | - | |
149 | | - | |
150 | | - | |
151 | | - | |
152 | | - | |
| 147 | + | |
153 | 148 | | |
154 | 149 | | |
155 | 150 | | |
| |||
260 | 255 | | |
261 | 256 | | |
262 | 257 | | |
| 258 | + | |
263 | 259 | | |
264 | 260 | | |
265 | 261 | | |
| |||
279 | 275 | | |
280 | 276 | | |
281 | 277 | | |
| 278 | + | |
282 | 279 | | |
283 | 280 | | |
284 | 281 | | |
| |||
322 | 319 | | |
323 | 320 | | |
324 | 321 | | |
| 322 | + | |
325 | 323 | | |
326 | 324 | | |
327 | 325 | | |
328 | 326 | | |
329 | 327 | | |
330 | 328 | | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
331 | 339 | | |
332 | 340 | | |
333 | 341 | | |
| |||
598 | 606 | | |
599 | 607 | | |
600 | 608 | | |
| 609 | + | |
| 610 | + | |
| 611 | + | |
| 612 | + | |
| 613 | + | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
| 617 | + | |
| 618 | + | |
| 619 | + | |
| 620 | + | |
| 621 | + | |
| 622 | + | |
| 623 | + | |
| 624 | + | |
| 625 | + | |
| 626 | + | |
| 627 | + | |
| 628 | + | |
| 629 | + | |
| 630 | + | |
| 631 | + | |
| 632 | + | |
| 633 | + | |
| 634 | + | |
| 635 | + | |
| 636 | + | |
| 637 | + | |
601 | 638 | | |
602 | 639 | | |
603 | 640 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3122 | 3122 | | |
3123 | 3123 | | |
3124 | 3124 | | |
| 3125 | + | |
3125 | 3126 | | |
3126 | 3127 | | |
3127 | 3128 | | |
| |||
4711 | 4712 | | |
4712 | 4713 | | |
4713 | 4714 | | |
| 4715 | + | |
4714 | 4716 | | |
4715 | 4717 | | |
4716 | 4718 | | |
| |||
4726 | 4728 | | |
4727 | 4729 | | |
4728 | 4730 | | |
| 4731 | + | |
4729 | 4732 | | |
4730 | 4733 | | |
4731 | 4734 | | |
| |||
0 commit comments