Commit 32cab9d
authored
## Coverage guard for #3111 — "Docker-driver gateway is healthy"
false-positive
This PR adds an E2E regression test that fails on `main` today. It is
intentional that **this test will be red on `main` and nightly will go
red** until the fix for #3111 lands.
### The gap
Issue #3111 reports that on Ubuntu 22.04 the onboard flow prints:
```
Starting OpenShell Docker-driver gateway...
Gateway log: ~/.local/state/nemoclaw/openshell-docker-gateway/openshell-gateway.log
✓ Docker-driver gateway is healthy ← false positive
```
while the gateway log shows the binary never actually ran:
```
openshell-gateway: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.38' not found
openshell-gateway: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.39' not found
```
The underlying NemoClaw bug is **platform-independent**:
- `startGateway()` (`src/lib/onboard.ts:5500+`) spawns the gateway
binary with `detached: true` and `child.unref()`. When the binary
crashes, the detached child becomes a **zombie**, and `isPidAlive()`
(`process.kill(pid, 0)`) returns true for zombies — so the poll loop
doesn't break.
- `registerDockerDriverGatewayEndpoint()` (`src/lib/onboard.ts:4347`) is
**metadata-only**: `openshell gateway add --local --name nemoclaw <url>`
writes the endpoint to the config; it does NOT probe the endpoint.
- `isGatewayHealthy()` (`src/lib/state/gateway.ts:99`) is a **string
match on `openshell status` and `openshell gateway info` output**, not
a live health check.
Result: on any Linux host where the gateway binary fails to start for
any reason (GLIBC mismatch, missing shared lib, permissions, OOM,
CDI-spec error, corrupted binary…), onboard reports
`✓ Docker-driver gateway is healthy` and proceeds to the next onboard
step, which then fails with a confusing `Connection refused` downstream.
There is an existing `openshell-gateway-upgrade-e2e` test covering the
**stale-gateway-replaced** path for PR #3001, but no test covers the
**gateway-binary-crashes** path that is the root issue in #3111.
### What this test does
`test/e2e/test-gateway-health-honest.sh`:
1. Installs the real `openshell` + `openshell-gateway` binaries via
`scripts/install-openshell.sh` (same setup path as the existing
upgrade test).
2. Drops a sabotage shim at `$STATE_DIR/openshell-gateway-sabotage` that
exits immediately with the same GLIBC-style stderr reported in #3111.
3. Invokes `startGateway(null)` via a Node heredoc, with
`NEMOCLAW_OPENSHELL_GATEWAY_BIN` pointing at the shim.
4. Asserts:
- **Primary:** the onboard output does NOT contain
`"Docker-driver gateway is healthy"`.
- **Corroborating:** the node process exits non-zero (≠ 0).
- **Corroborating:** onboard surfaces a user-visible failure line
(`failed to start`, `crash`, `exit`, `not found`, or a thrown
exception).
- **Corroborating:** no live non-zombie gateway process remains
after the simulated crash.
The test runs on `ubuntu-latest` and does not require an Ubuntu 22.04
runner — it exercises the NemoClaw-side bug class, not the
OpenShell-side
GLIBC packaging choice. The GLIBC compatibility concern is an OpenShell
team issue and is out of scope for this coverage guard.
### Expected CI behavior
| Ref | Nightly job `gateway-health-honest-e2e` |
|---|---|
| **this PR** | PR checks don't run nightly, so this PR's CI is green
(modulo the usual unit/lint suite). |
| **main (after merge)** | **FAILS.** Primary assertion trips: onboard
logs `✓ Docker-driver gateway is healthy`. |
| **any branch that fixes #3111** | PASSES. |
### The red-nightly tradeoff
Once merged, the nightly badge will go red on
`gateway-health-honest-e2e`
until #3111 is fixed. That is the point — the failing test is the
executable acceptance criterion for the fix. A subsequent PR authored
via
`/skill:nemoclaw-issue-kickoff 3111` will produce the fix with this test
as its definition-of-done.
### Expected failure output on main
```
[FAIL] Onboard reported '✓ Docker-driver gateway is healthy' although
the gateway binary crashed on startup (#3111 false-positive health check)
[DIAG] start log tail:
Starting OpenShell Docker-driver gateway...
Gateway log: /home/runner/.local/state/nemoclaw/openshell-docker-gateway/openshell-gateway.log
✓ Docker-driver gateway is healthy
__onboard_startGateway_returned_successfully__
[DIAG] gateway log tail:
openshell-gateway-sabotage: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.38' not found
openshell-gateway-sabotage: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.39' not found
```
### Wiring
- New file: `test/e2e/test-gateway-health-honest.sh` (~170 LOC, modeled
after `test/e2e/test-openshell-gateway-upgrade.sh`)
- New job: `gateway-health-honest-e2e` in
`.github/workflows/nightly-e2e.yaml`
(6 edits: comment, inputs.jobs description, new job block, 3 needs
arrays)
### References
- Issue #3111 (NV QA / UAT / Platform: Brev / Platform: Ubuntu / Docker
/ bug)
- NVB#6150133
- PR #3001 (merged; introduced the affected code path)
- Existing test being modeled:
`test/e2e/test-openshell-gateway-upgrade.sh`
- Relevant source:
- `src/lib/onboard.ts` — `startGateway`, `startGatewayWithOptions`,
`isPidAlive`, `registerDockerDriverGatewayEndpoint`
- `src/lib/state/gateway.ts` — `isGatewayHealthy`
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **Tests**
* Added an end-to-end test that verifies gateway start failure is
detected, exposes user-visible error output, and ensures no lingering
gateway processes remain.
* **Chores**
* Integrated the new test into the nightly pipeline as a selectable job,
including artifact upload on failure and inclusion in failure reporting,
PR comments, and the nightly scorecard.
* **Documentation**
* Updated nightly workflow job selection documentation and added a
review-tool entry linking the test to the nightly job.
[](https://app.coderabbit.ai/change-stack/NVIDIA/NemoClaw/pull/3362)
[](https://app.coderabbit.ai/change-stack/NVIDIA/NemoClaw/pull/3362)
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
1 parent 419f895 commit 32cab9d
3 files changed
Lines changed: 313 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
492 | 492 | | |
493 | 493 | | |
494 | 494 | | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
495 | 513 | | |
496 | 514 | | |
497 | 515 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
25 | 30 | | |
26 | 31 | | |
27 | 32 | | |
| |||
67 | 72 | | |
68 | 73 | | |
69 | 74 | | |
70 | | - | |
| 75 | + | |
71 | 76 | | |
72 | 77 | | |
73 | 78 | | |
| |||
1290 | 1295 | | |
1291 | 1296 | | |
1292 | 1297 | | |
| 1298 | + | |
| 1299 | + | |
| 1300 | + | |
| 1301 | + | |
| 1302 | + | |
| 1303 | + | |
| 1304 | + | |
| 1305 | + | |
| 1306 | + | |
| 1307 | + | |
| 1308 | + | |
| 1309 | + | |
| 1310 | + | |
| 1311 | + | |
| 1312 | + | |
| 1313 | + | |
| 1314 | + | |
| 1315 | + | |
| 1316 | + | |
| 1317 | + | |
| 1318 | + | |
| 1319 | + | |
| 1320 | + | |
| 1321 | + | |
| 1322 | + | |
| 1323 | + | |
| 1324 | + | |
| 1325 | + | |
| 1326 | + | |
| 1327 | + | |
| 1328 | + | |
| 1329 | + | |
| 1330 | + | |
| 1331 | + | |
| 1332 | + | |
| 1333 | + | |
| 1334 | + | |
| 1335 | + | |
| 1336 | + | |
| 1337 | + | |
| 1338 | + | |
| 1339 | + | |
| 1340 | + | |
| 1341 | + | |
| 1342 | + | |
| 1343 | + | |
| 1344 | + | |
| 1345 | + | |
| 1346 | + | |
| 1347 | + | |
| 1348 | + | |
| 1349 | + | |
1293 | 1350 | | |
1294 | 1351 | | |
1295 | 1352 | | |
| |||
1861 | 1918 | | |
1862 | 1919 | | |
1863 | 1920 | | |
| 1921 | + | |
1864 | 1922 | | |
1865 | 1923 | | |
1866 | 1924 | | |
| |||
1952 | 2010 | | |
1953 | 2011 | | |
1954 | 2012 | | |
| 2013 | + | |
1955 | 2014 | | |
1956 | 2015 | | |
1957 | 2016 | | |
| |||
2091 | 2150 | | |
2092 | 2151 | | |
2093 | 2152 | | |
| 2153 | + | |
2094 | 2154 | | |
2095 | 2155 | | |
2096 | 2156 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 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 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 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 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 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 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
0 commit comments