Commit e97b4dc
committed
Make session persistence and doc sync boundaries explicit
Session persistence was still coupled tightly to doc generation inside
saveSession and deleteSession. This pass extracts small internal helpers
for normalization, raw file writes, docs synchronization, and raw file
removal so the boundary is explicit while public behavior stays the same.
Constraint: saveSession() and deleteSession() had to preserve current observable behavior under the runtime tests
Constraint: This pass had to remain internal to session persistence and avoid a broader lifecycle redesign
Rejected: Introduce a new public persistence API now | broader call-site migration than needed for this cleanup pass
Rejected: Leave file persistence and docs sync interleaved inline | weaker separation of concerns and harder future changes
Confidence: high
Scope-risk: narrow
Reversibility: clean
Directive: Keep raw session file persistence and docs synchronization separable so future lifecycle changes can move them independently if needed
Tested: bun test tests/runtime.test.ts
Tested: bun run check
Not-tested: Manual host-level save/reset flows outside automated tests1 parent 3d113a6 commit e97b4dc
2 files changed
Lines changed: 42 additions & 14 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 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 | + | |
11 | 39 | | |
12 | 40 | | |
13 | 41 | | |
| |||
24 | 52 | | |
25 | 53 | | |
26 | 54 | | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
39 | 58 | | |
40 | 59 | | |
41 | 60 | | |
42 | 61 | | |
43 | | - | |
44 | | - | |
| 62 | + | |
| 63 | + | |
45 | 64 | | |
46 | 65 | | |
47 | 66 | | |
| |||
0 commit comments