You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The PR #2 review listed several P2 robustness gaps in the host ctx.flybot service and the social MCP client. They are spot-checked as still present at 7b806c6 (for example, changeSeq is still an in-process counter, src/host/hooks.js#L86-L89). Related to #4.
State/persistence: "changeSeq resets per process while the browser watermark never regresses → field events silently stop after every host restart". In addition, the corrupt-fields reset in store.js does not set migrated, and change.value gives listeners the stored object, so a listener that mutates it diverges memory from disk.
MCP client: "no timeout/AbortSignal anywhere (a hung server stalls polling, transport, and approvals.decide indefinitely), and it advertises text/event-stream in accept but would crash parsing an SSE response."
API surface: "api.handle silently accepts built-in names (approvals, decide, …) that the endpoint switch shadows — reject them. flybot.scope('shared') is allowed and collides with the unscoped namespace."
Proposed fix
Add a per-process epoch to change events (or persist changeSeq), and have the client reset its watermark when the epoch changes.
Set migrated on reset. Deep-clone or freeze change.value.
Add a timeout or AbortSignal to every MCP call. Either handle SSE or stop advertising it.
Reject reserved endpoint names and the shared scope.
Acceptance criteria
Field events keep flowing to an open browser after a host restart.
A hung MCP server causes a timeout error, not a stall.
handle('approvals') and scope('shared') throw.
Tests cover each case.
Refs: PR #2 (merged), umbrella #3. Verified against Birfy/FlyBotflybot-plugins tip 7b806c6.
Activity
ctx.flybot: change epoch survives host restarts, listeners get copies…