lease activation TS capability probe: hardcoded 2000ms timeout < cold-start on slow hosts blocks gate wiring (fomo-lin E2E) #1123

Open
opened 2026-08-08 21:23:24 +00:00 by scooby · 0 comments
Collaborator

Found during the promotion-branch E2E on fomo-lin (branch feat/lease-promotion-and-harness-isolation, rebased on next).

Symptom: mosaic __link-claude-settings (and any reseed) REFUSES to wire the enforcement hooks — 'activation half absent … refusing to wire a dead gate (#869)' — even though the CLI carries activation AND the broker+socket+launcher+daemon are all present and resolvable.

Root cause: leaseEnforcementActivatable() step (a) calls defaultCapabilityProbe() in commands/lease-activation-probe.ts, which does execFileSync(node, [cli.js, '__lease-capability'], { timeout: 2000 }). On fomo-lin (Debian 13, Node 22.23.2) that cold-start measures 5.1–5.5s, so the probe is KILLED by the 2000ms timeout and returns null → activatable=false → hooks stripped. Supervisor half verifies fine (launcher+daemon present, socket resolves); step (a) is the sole failure.

This is the TS-side sibling of the Python F9/#1118 timeout — and worse: (1) 2000ms is even further under the real 5s cold-start than the Python gate's 2.0s vs 2.6s; (2) the MOSAIC_LEASE_VERSION_PROBE_COMMAND override that mitigates the Python gate does NOT apply to this TS probe — there is no escape hatch. So on any host where node cli.js cold-start >2s, lease enforcement CANNOT be wired at all through the sanctioned path.

Fix options: raise/make-configurable the 2000ms timeout; warm-cache the capability at broker startup (the probe-once-in-broker design already adopted for gap 1 covers this if the TS path reads the cached result instead of re-spawning); or share one resolved-capability source between the Python and TS probes. Ties directly into HARNESS-HOMES gap 1 (pin node+mosaic, probe-once-at-startup).

Impact on the E2E: blocks step 2 (stand up gated seat) via the sanctioned path. Worked around on fomo-lin by locally bumping ONLY the installed dist copy's timeout (reversible; cannot mask a broken capability since the probe must still return valid {name,version}); promotion logic itself is unaffected and the E2E proceeds truthfully. Filed by scooby (fomo-lin greenfield). Evidence: stack branch greenfield/fomo-lin log.

Found during the promotion-branch E2E on fomo-lin (branch feat/lease-promotion-and-harness-isolation, rebased on next). **Symptom:** `mosaic __link-claude-settings` (and any reseed) REFUSES to wire the enforcement hooks — 'activation half absent … refusing to wire a dead gate (#869)' — even though the CLI carries activation AND the broker+socket+launcher+daemon are all present and resolvable. **Root cause:** `leaseEnforcementActivatable()` step (a) calls `defaultCapabilityProbe()` in `commands/lease-activation-probe.ts`, which does `execFileSync(node, [cli.js, '__lease-capability'], { timeout: 2000 })`. On fomo-lin (Debian 13, Node 22.23.2) that cold-start measures **5.1–5.5s**, so the probe is KILLED by the 2000ms timeout and returns null → activatable=false → hooks stripped. Supervisor half verifies fine (launcher+daemon present, socket resolves); step (a) is the sole failure. **This is the TS-side sibling of the Python F9/#1118 timeout** — and worse: (1) 2000ms is even further under the real 5s cold-start than the Python gate's 2.0s vs 2.6s; (2) the `MOSAIC_LEASE_VERSION_PROBE_COMMAND` override that mitigates the Python gate does NOT apply to this TS probe — there is no escape hatch. So on any host where `node cli.js` cold-start >2s, lease enforcement CANNOT be wired at all through the sanctioned path. **Fix options:** raise/make-configurable the 2000ms timeout; warm-cache the capability at broker startup (the probe-once-in-broker design already adopted for gap 1 covers this if the TS path reads the cached result instead of re-spawning); or share one resolved-capability source between the Python and TS probes. Ties directly into HARNESS-HOMES gap 1 (pin node+mosaic, probe-once-at-startup). **Impact on the E2E:** blocks step 2 (stand up gated seat) via the sanctioned path. Worked around on fomo-lin by locally bumping ONLY the installed dist copy's timeout (reversible; cannot mask a broken capability since the probe must still return valid {name,version}); promotion logic itself is unaffected and the E2E proceeds truthfully. Filed by scooby (fomo-lin greenfield). Evidence: stack branch greenfield/fomo-lin log.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: mosaicstack/stack#1123