OverviewFilesCommitsIssuesDocsReleasesPeers

atproto-bridge commits / ca65bf9

smoke: test the runtime production actually runs, not whatever is on PATH
The gate shelled out to `bare` from PATH. Nothing in production runs that binary: pgh launchers exec a runtime out of the tree store, and the supervisor picks its own. Measured 2026-08-17 -- PATH was v1.28.0 while the live membrane on stortron ran v1.28.7 from pgh/runtime/bare. So "smoke OK" was evidence about a build that never executes the closure. That is the same shape of blind spot as the gate being dark in the first place (#46): it reported success about something other than the thing being shipped. Resolution order, most-production-like first: SMOKE_BARE explicit override (pin in CI, or bisect by hand) <store>/apps/pgh-sidecar/runtime/bare <store>/apps/pgh/runtime/bare bare on PATH LOUD fallback -- passing there does not establish that the closure boots in production Both the version AND the resolved binary path are now printed, so the output can never again imply it tested production when it did not. No version bump: this is the dev gate, nothing that ships changes, and hosts have no reason to reinstall. The CI publish will be skipped on the unchanged version, which is the correct outcome rather than a phantom redeploy. Verified all three paths: default bare v1.28.7 via pgh runtime (as production runs) SMOKE_BARE bare v1.28.0 via SMOKE_BARE fallback bare v1.28.0 via PATH — ⚠ NOT the runtime production uses Separately confirmed the bare-module >=1.29.4 floor is genuinely inert, as smoke.mjs:51-54 already documented: it lives in pds/node_modules and is never required, because Bare uses its own bundled module system. The membrane boots and serves 200s on 1.28.x. The scan stays advisory. Refs: hyper-social #47 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
ca65bf9f2f87f5d4270d5ab8673fb5f214feddbd
by plankatron <fleeky@gmail.com> · 2026-08-17T21:58:53.000Z

Changed files (1) +36 -8

scripts/smoke.mjs +36 -8
……@@ -51,12 +51,39 @@ function engineFloor () {
5151// >=1.29.4 yet the membrane boots on 1.28.0, because the runtime uses its own bundled copy and the one
5252// in node_modules is never required. So gating on the scan would fail a working install. The scan's job
5353// is to EXPLAIN a boot failure, which is where its value was in the first place.
54function preflight () {
55 let have = null
56 try { have = execFileSync('bare', ['-v'], { encoding: 'utf8' }).trim().replace(/^v/, '') } catch {
57 throw new Error('`bare` is not on PATH — install it with `npm i -g bare-runtime`')
54// WHICH bare. The gate used to shell out to `bare` from PATH — but nothing in production runs that
55// binary. pgh launchers exec a runtime out of the tree store, and the supervisor picks its own; on
56// 2026-08-17 PATH was v1.28.0 while the live membrane ran v1.28.7 out of pgh/runtime/bare. So "smoke
57// OK" was evidence about a build that never executes the closure, which is the same shape of blind
58// spot as the gate being dark in the first place (#46).
59//
60// Resolution order, most-production-like first. SMOKE_BARE overrides everything so a specific build
61// can be pinned in CI or bisected by hand.
62const RUNTIME_CANDIDATES = [
63 process.env.SMOKE_BARE,
64 process.env.HOME && `${process.env.HOME}/.local/share/store/apps/pgh-sidecar/runtime/bare`,
65 process.env.HOME && `${process.env.HOME}/.local/share/store/apps/pgh/runtime/bare`
66].filter(Boolean)
67
68function resolveBare () {
69 for (const bin of RUNTIME_CANDIDATES) {
70 try {
71 const v = execFileSync(bin, ['-v'], { encoding: 'utf8' }).trim().replace(/^v/, '')
72 return { bin, have: v, source: bin === process.env.SMOKE_BARE ? 'SMOKE_BARE' : 'pgh runtime (as production runs)' }
73 } catch { /* not installed on this box — try the next */ }
74 }
75 try {
76 const v = execFileSync('bare', ['-v'], { encoding: 'utf8' }).trim().replace(/^v/, '')
77 // Deliberately loud. Passing here does NOT establish that the closure boots in production.
78 return { bin: 'bare', have: v, source: 'PATH — ⚠ NOT the runtime production uses' }
79 } catch {
80 throw new Error('no bare runtime found — install one (`npm i -g bare-runtime`) or set SMOKE_BARE=<path>')
5881 }
59 return { have, need: engineFloor() }
82}
83
84function preflight () {
85 const { bin, have, source } = resolveBare()
86 return { bin, have, source, need: engineFloor() }
6087}
6188
6289// Appended to a boot failure: if a dep declares a floor above the running bare, say so explicitly.
……@@ -80,10 +107,11 @@ function req (path, { host, method = 'GET', body } = {}) {
80107 })
81108}
82109
83const { have, need } = preflight()
84console.log(`smoke: bare v${have}${need ? ` (dependency floor >=${need.version} from ${need.pkg})` : ''}`)
110const { bin, have, source, need } = preflight()
111console.log(`smoke: bare v${have} via ${source}`)
112console.log(`smoke: runtime ${bin}${need ? ` (advisory floor >=${need.version} from ${need.pkg} — see engineFloor)` : ''}`)
85113
86const child = spawn('bare', ['index.js'], {
114const child = spawn(bin, ['index.js'], {
87115 cwd: new URL('..', import.meta.url).pathname,
88116 env: {
89117 ...process.env,