Run the gates against the thing people download - #167
Conversation
Closes #166. MSMS_SMOKE_WORLDS had been failing against every packaged build since at least v0.2.5 — the released v0.2.5 binary fails it too — and nobody knew, for two compounding reasons. **Nothing could be read.** A packaged app is built for the Windows GUI subsystem, so it has no console attached and every console.log goes nowhere. A packaged gate could only ever say "1": no assertion name, no context. The transcript now goes to `msms-data/logs/smoke.log` as well, truncated per run. That alone turned an opaque exit code into the actual defect in one run, and it is why the rest of this commit exists. **Four gates read the repository at runtime.** They assert things about the CODE rather than about a running process — every declared IPC channel has a handler, the bundled bridge jar matches the plugin.yml it was built from, every route in the router appears in the documented surface, the checked-in openapi.json is current. None of that exists in a packaged app: it is an asar of built JavaScript, extracted to a temp folder with no `src` in it. So they threw ENOENT and took their whole gate down, after having already passed everything they could genuinely test. They now skip when there is no source tree, and SAY SO in the transcript. The guard is itself guarded, because "skip when the file is missing" is one careless edit away from "skip always", and a check that silently stops running is what this project keeps finding: - `skipNoSource` refuses to skip when a source tree IS present, and fails the gate instead. That catches an inverted or unconditional guard. - `sourceRoot` fails the gate when it is standing in the repository and the file it probes for has moved, rather than reporting "packaged" and disabling every source-derived check at once. Both proved failable: renaming the probe target fails a dev run with "this is the repository but src/shared/ipc.ts is missing, so the source-tree probe would disable every source-derived check". `npm run gates` and `npm run gates:packaged` run all eleven, so this is a release step rather than something done by hand once. dev build 11/11 pass packaged binary 11/11 pass (was 2 failing: WORLDS and WEB)
Self reviewThe first fix was in the wrong place, and the gate told meI first installed the transcript tee at module scope, so it would also capture the single-instance-lock failure. It wrote nothing in a packaged run while That leaves the lock failure uncovered by the transcript, so that one message goes through I do not have a root cause for the module-scope write failing, and I am not claiming one. What I have is a working placement and a reason to prefer it. If it matters later, the reproduction is in the issue. The silent catch nearly cost another hour
Running all eleven gates found a second instance of the same bugI fixed the IPC cross-check, confirmed Deliberately not done
ScopeNo product code changes in this PR — |
Closes #166.
MSMS_SMOKE_WORLDShad been failing against every packaged build since at least v0.2.5 — the released v0.2.5 binary fails it too — and nobody knew, for two compounding reasons.Nothing could be read
A packaged app is built for the Windows GUI subsystem: no console is attached, so every
console.loggoes nowhere. A packaged gate could only ever report1— no assertion name, no context, nothing to act on.The transcript now also goes to
msms-data/logs/smoke.log, truncated per run. That alone turned an opaque exit code into the actual defect on the first run:Everything below is downstream of being able to see that.
Four gates read the repository at runtime
They assert things about the code rather than about a running process:
src/shared/ipc.ts,register.ts,preload/index.tsbridge/src/main/resources/plugin.yml(x2)src/main/web/server.tsdocs/openapi.jsonNone of that exists in a packaged app — it is an asar of built JavaScript extracted to a temp folder with no
srcin it. So they threwENOENTand took their whole gate down, after having already passed everything they could genuinely test. The failure was 100% test harness and 0% product, which is exactly why it survived so long: the app was fine.They now skip when there is no source tree, and say so in the transcript rather than vanishing.
The guard is itself guarded
"Skip when the file is missing" is one careless edit from "skip always", and a check that silently stops running is the failure this project keeps finding (#157 had a fixture that made a real assertion vacuous). So:
skipNoSourcerefuses to skip when a source tree IS present and fails the gate instead. That catches an inverted or unconditional guard.sourceRootfails the gate when it is standing in the repository and the file it probes for has moved, rather than answering "packaged" and disabling every source-derived check at once.Proved failable — renaming the probe target fails a dev run:
A release step, not a one-off
npm run gatesandnpm run gates:packagedrun all eleven and print the transcript of anything that fails, so the packaged binary gets checked from now on instead of being assumed.Found while verifying the v0.3.0 artifacts; the product code is untouched by this PR.