readiness reports ready:true on an unroutable pending-* connection (drives then fail 'not connected'; no-profile route hangs 30s)
nbrowser_readiness reports ready:true off a pending-* connection that NO drive verb can actually use — the user is told "ready", then every drive fails "extension not connected".
Found verifying issue #22 on a second machine (ConfRoomROG, ab 2.0.59, nb 0.3.4, ext 0.2.0). Sequence, all within seconds:
nbrowser_readiness -> ready:true, state:"ready", profiles:["pending-4"],
extensionVersions:{"pending-4":"unknown"},
hint: "nbe is connected (1 profile(s)) and current (v0.2.0); drive it with nbrowser_open_window"
nbrowser_demo {profile:"pending-4"} -> "native browser extension not connected" (43ms)
nbrowser_open_window {no profile} -> Request timed out (30s)
nbrowser_resolve_profiles -> readiness now ready:false, profiles:[]
So pending-* (an extension socket that connected but whose profile identity has not resolved to a real Chrome profile) counts toward readiness, but targetConn cannot route to it. Three separate bad outcomes from one root:
- Readiness lies.
ready:true+ "drive it with nbrowser_open_window" is exactly the wrong instruction. For a public release this is the worst kind of bug: the probe we tell every AI to trust as the cold-start check is confidently wrong. - Failure modes are inconsistent — with an explicit
profileit fails fast and correctly (43ms); with no profile it hangs the full 30s and the caller learns nothing. resolve_profilesdoesn't repair it, it just drops the connection entirely (ready:false, profiles:[]) — so there is no recovery path short of the SW re-dialing.
Proposed fix: ready must mean drivable. Exclude pending-* from the readiness profile list and from ready; when the only connection(s) are pending, report state:"resolving" with a hint that the extension has dialed but its profile identity has not resolved yet (and that nbrowser_wake_profile / opening any window in that profile completes it). Separately, routing to a pending/unroutable connection should fail fast with extension_not_connected, never hang for the timeout.
Related: 0.2.6 already fixed a neighbouring pending-* bug (sessions pinned to a pending pseudo-profile were poisoned forever). Same root cause family — pending-* is being treated as a real profile identity in more places than it should be.
Battery note: the daily verb battery hard-requires a resolvable profile during warm-up, so it would have gone red on this box rather than silently testing nothing.