This repository was archived by the owner on Aug 17, 2026. It is now read-only.
Repository navigation
Commit 1228ccc
authored
chore(scripts): install-local.sh smoke-test before binary swap (anomalyco#258) (#19)
Add a smoke-test step that runs BEFORE the freshly-built binary replaces
the brew Cellar binary. Catches the class of regression where the build
succeeds at the bundler layer but the produced binary crashes at
module-load / plugin-resolution / config-read — the surface that
silently shipped a U.length crash 2026-05-27 (PR #14-17 era) and went
undetected for ~1h because already-running tabs kept their mmap'd old
binary.
Two layers, both cheap (~0.7s total on a healthy binary):
1. `--version` — catches module-load + top-level import crashes
2. `debug info` — catches plugin-resolution + config-load
regressions (exercises the same module graph the
TUI mount path does)
If either layer fails — non-zero exit, OR exit 0 with TypeError /
ReferenceError / SyntaxError / fatal-error / U.length / 'Cannot read
prop' on stderr — the install aborts and the working brew binary stays
put. The build output is preserved at $SRC_BIN for inspection.
`--skip-smoke` flag provided for emergency overrides (rebuild loops on
a known-broken state where the new binary is wanted despite a smoke
fail).
`timeout` wrapper detection: macOS doesn't ship coreutils by default,
so `timeout`/`gtimeout` are detected at runtime; absent both, the smoke
runs unwrapped (the commands themselves exit fast, so the wrapper is
belt-and-suspenders, not load-bearing).
Verified locally with three integration cases against the in-script
smoke block:
- Healthy gruntcode binary → proceeds to install
- Crashing fake-bin → refused + exit 1, install aborted
- Stealth crash (exit 0 + TypeError on stderr) → refused + exit 1
- `--skip-smoke` → smoke skipped, install proceeds
Help text + doc-comment header updated; new `Smoke-test (pre-install
verification)` section explains what the smoke does + how to disable.
Closes anomalyco#258.1 parent c144a1d commit 1228ccc
1 file changed
Lines changed: 93 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
35 | 48 | | |
36 | 49 | | |
37 | 50 | | |
| |||
41 | 54 | | |
42 | 55 | | |
43 | 56 | | |
| 57 | + | |
44 | 58 | | |
45 | 59 | | |
46 | 60 | | |
47 | 61 | | |
| 62 | + | |
48 | 63 | | |
49 | | - | |
| 64 | + | |
50 | 65 | | |
51 | 66 | | |
52 | 67 | | |
| |||
128 | 143 | | |
129 | 144 | | |
130 | 145 | | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
131 | 222 | | |
132 | 223 | | |
133 | 224 | | |
| |||
0 commit comments