← Commit history

battery: re-pin every session it uses at teardown, so a stale pin from a prior run cannot fail the next one with profile_mismatch

John Lauer ·95fb680ea3 ·21d ago ·parent 9f174ca
1 file changed +6
tools/verb-battery.mjs+6
@@ -389,6 +389,12 @@ if (import.meta.url === `file://${process.argv[1]}`) {   // Idempotency means every run starts from zero.   call('nbrowser_close_window', { sessionId: SID, includeSpawned: true });   call('nbrowser_close_window', { sessionId: SID + '-l1' });+  // Closing the window does NOT drop the session's profile PIN, and a pin left by a run that used a+  // different profile makes every later verb fail profile_mismatch (laptop, 2026-10-21). Re-pin to the+  // profile THIS run will drive, so a run is never poisoned by the one before it.+  for (const sid of [SID, SID + '-l1', SID + '-min', SID + '-noprof', SID + '-dead', SID + '-cdpblock', SID + '-demo']) {+    call('nbrowser_pin_session', { sessionId: sid, profile: PROFILE });+  }   // WARM-UP: a daily run can land seconds after ab auto-respawned the bridge (self-update), before   // any extension SW has re-dialed. Wake the profile and give it up to 30s - readiness cold-starts   // are an ab lifecycle fact, not a verb regression.