Commit 790769c
fix(mag): guard /compact enqueue from feedback-digest throw (PR #494 review)
Wrap the tryQueueFeedbackDigest("ludics") call in magBriefing() with
try/catch so a queue-lock timeout or state-file write failure inside
the digest path can no longer suppress the unconditional /compact
enqueue. The auto-compact-after-checkpoints contract (task-a00fc0d9)
requires /compact after every briefing; the round-1 swap exposed that
contract to digest-side failures because /compact moved below the
digest call.
Add a regression test that spies on queueRequest to throw on the
feedback-digest action and asserts (a) /compact still lands in
mag/queue.jsonl as the second entry, and (b) the failure is logged.
Mutation-verified: removing the try/catch makes the new test fail.
Addresses Codex review comment on src/mag.ts:3320.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent ebb5630 commit 790769c
2 files changed
Lines changed: 54 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
74 | 116 | | |
75 | 117 | | |
76 | 118 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3317 | 3317 | | |
3318 | 3318 | | |
3319 | 3319 | | |
3320 | | - | |
3321 | | - | |
3322 | | - | |
| 3320 | + | |
| 3321 | + | |
| 3322 | + | |
| 3323 | + | |
| 3324 | + | |
| 3325 | + | |
| 3326 | + | |
| 3327 | + | |
| 3328 | + | |
| 3329 | + | |
| 3330 | + | |
3323 | 3331 | | |
3324 | 3332 | | |
3325 | 3333 | | |
| |||
0 commit comments