Commit 7d3bb7a
feat(runner): persist disableVersionHandoff opt-out in settings.json
The HAPI_DISABLE_VERSION_HANDOFF=1 env-var contract introduced by
feat/runner-skip-version-handoff-flag relies on every CLI invocation
inheriting the flag. That works for the systemd unit (drop-in sets it
once) but leaks badly: any terminal that runs `hapi runner start-sync`
without exporting the var sees mtime drift, kills the live runner, then
gets SIGTERM'd itself - leaving the machine offline. Today's 22:40 BST
incident reproduced exactly this pattern (operator-launched start-sync
at PID 65341, env dump shows no HAPI_DISABLE_VERSION_HANDOFF, fell
through to the mtime block, killed live runner PID 24935).
Add a persisted fallback: settings.runnerDisableVersionHandoff:true in
~/.hapi/settings.json gets the same effect as the env var. Once written
once, every CLI invocation from any context honors it without relying
on environment inheritance.
Env var still wins when set (operator override). Default off (npm
consumers see no behavior change).
Co-authored-by: Cursor <cursoragent@cursor.com>1 parent c1708e3 commit 7d3bb7a
3 files changed
Lines changed: 34 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
24 | 33 | | |
25 | 34 | | |
26 | 35 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
185 | 185 | | |
186 | 186 | | |
187 | 187 | | |
188 | | - | |
189 | | - | |
190 | | - | |
191 | | - | |
192 | | - | |
193 | | - | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
194 | 199 | | |
195 | 200 | | |
196 | 201 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
| 14 | + | |
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| |||
808 | 808 | | |
809 | 809 | | |
810 | 810 | | |
811 | | - | |
812 | | - | |
813 | | - | |
| 811 | + | |
| 812 | + | |
| 813 | + | |
| 814 | + | |
| 815 | + | |
| 816 | + | |
| 817 | + | |
| 818 | + | |
| 819 | + | |
| 820 | + | |
| 821 | + | |
| 822 | + | |
814 | 823 | | |
815 | | - | |
| 824 | + | |
816 | 825 | | |
817 | 826 | | |
818 | 827 | | |
| |||
0 commit comments