Repository navigation
Commit d3fb8c8
fix: [#834] address coderabbit — set _subscribed=true only after successful Bus.subscribe
Reviewer flagged that setting `_subscribed = true` BEFORE calling
`Bus.subscribe` means a single throw permanently disables retry — the
deleted-session counter eviction silently stops working for that process.
The previous justification ("silent retry would noisily re-throw every
call") was conservative-by-default but the wrong default: `Bus.subscribe`
is robust enough that throws are exceptional, and the cost of "every
todowrite logs a quiet error" is lower than "the daemon-mode memory
fix is silently disabled".
Flipped the order so `_subscribed` is set inside the try block after a
successful subscribe. On failure, `_subscribed` stays false and the
next todowrite call retries. Comment updated to match.
12/12 tests pass; marker check clean; no behavior change in the happy
path (one Bus.subscribe call, idempotent on subsequent invocations).
Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>1 parent 33aa344 commit d3fb8c8
1 file changed
Lines changed: 9 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
46 | 45 | | |
47 | 46 | | |
48 | 47 | | |
49 | | - | |
50 | 48 | | |
51 | 49 | | |
52 | 50 | | |
53 | 51 | | |
| 52 | + | |
54 | 53 | | |
55 | | - | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
56 | 57 | | |
57 | 58 | | |
58 | 59 | | |
| |||
0 commit comments