Repository navigation
fix(browser-handoff): tighten recheck backoff cap from 5 minutes to 2 - #240
Merged
Merged
Conversation
Live-observed on arief-openclaw-test: a real end-to-end sign-in-to-notification flow took ~14 minutes with the 5-minute cap (backoff curve 30s/60s/120s/240s/ 300s/300s/...). Requested to shorten the customer's typical wait. Lowering the cap to 2 minutes (30s/60s/120s/120s/120s/...) roughly halves the worst-case staleness once the customer is done and only boon-core's own async profile-snapshot step is left pending, without materially increasing poll volume over a multi-minute wait. Left FIRST_RECHECK_DELAY_MS (asserted by an existing test) and MAX_TOTAL_WAIT_MS (tied to Anchor's own session cap) unchanged -- this only tunes the steady-state polling cadence. Co-Authored-By: Claude Sonnet 5 <[email protected]>
There was a problem hiding this comment.
All reported issues were addressed across 1 file
Reply with feedback, questions, or to request a fix.
Fix all with cubic | Re-trigger cubic
… comment cubic-dev-ai flagged: the comment said the tighter 2-minute cap avoids "meaningfully changing total poll count", directly contradicting the same sentence's own admission of trading "a bit more poll volume" -- and the real number is a genuine ~2x increase in steady-state polls (one check every 2 min instead of every 5). Reworded to state the actual interval change and own the tradeoff plainly instead of downplaying it. Co-Authored-By: Claude Sonnet 5 <[email protected]>
convyusboy
enabled auto-merge (squash)
September 23, 2026 10:47
augusteo
approved these changes
Sep 23, 2026
augusteo
left a comment
There was a problem hiding this comment.
Approved (via sweep backstop — original request was dropped by the gateway).
Single-constant tuning of the recheck backoff cap (5 min -> 2 min) with the comment block updated to match. Verified:
- Backoff curve with multiplier 2 is now 30s/60s/120s/120s/... as described.
tool.test.tsonly assertsFIRST_RECHECK_DELAY_MS(30s); nothing pins the old cap, so no test breakage.MAX_TOTAL_WAIT_MS(180 min) left deliberately tied to Anchor's session cap — sound reasoning.- No security or correctness concerns; poll volume increase in steady state is modest and intentional.
Non-blocking suggestion: a small test pinning MAX_RECHECK_DELAY_MS would guard against future accidental regressions.
convyusboy
added a commit
that referenced
this pull request
Sep 28, 2026
…249) * chore(release): bump version 2026.6.11-boon.46 -> 2026.6.11-boon.47 Root version, 135 plugin manifests synced via scripts/sync-plugin-versions.ts, changed npm-shrinkwrap.json files regenerated, CHANGELOG section for boon.47. Shipping: #236/#239 (a plugin tool's own execute() handler can now reliably schedule/unschedule a cron-backed session turn, fixing the browser-handoff recheck across three sequential live-found bugs), #240 (recheck backoff cap tightened 5m -> 2m), #242 (recheck messages the customer before attaching the browser), #241 (delivery.mode: "none" cron jobs can deliver an explicit message-tool send), #243 (Chrome MCP stderr drained before connect, not after), #247 (distinct exec-trajectory label for boon-projects schedule append/list), ENG-20030 (shared turn-resume-instruction wording for boon-core/anychat-boon-web), #248 (Docker build no longer OOMs 8 GB CI runners). Base = 2026.6.11-boon.46. Gateway plus @openclaw/slack, @openclaw/msteams and @openclaw/diagnostics-prometheus bumped in lockstep; no separately published plugin source changed in this train, so a gateway roll delivers all of it. Co-Authored-By: Claude Sonnet 5 <[email protected]> * fix(release): regenerate stale extension npm-shrinkwrap.json versions for boon.47 pnpm plugins:sync bumps each plugin's package.json version but does not touch its checked-in npm-shrinkwrap.json, so 65 published extension shrinkwraps still embedded version 2026.6.11-boon.46 despite package.json already reading boon.47. Since npm-shrinkwrap.json ships inside the npm artifact, this would have published every affected plugin with a mismatched embedded version. Bumped the version field(s) in all 65 (plus the openclaw peerDependency range where present) to 2026.6.11-boon.47, matching the pattern boon.46's bump commit already applied to these same files. Co-Authored-By: Claude Sonnet 5 <[email protected]> --------- Co-authored-by: Claude Sonnet 5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What Problem This Solves
A live end-to-end test of the browser-handoff automatic sign-in recheck flow (sign in → automatic detection → automatic profile pull → automatic customer notification, verified working in #239) took about 14 minutes from sign-in to notification. That's too long for a customer to reasonably wait without feeling like nothing is happening.
Why This Change Was Made
The recheck uses an exponential backoff (
FIRST_RECHECK_DELAY_MS→ doubling → capped atMAX_RECHECK_DELAY_MS) so it doesn't poll boon-core tightly while the customer is doing 2FA/CAPTCHA by hand. The previous cap was 5 minutes, giving a curve of 30s/60s/120s/240s/300s/300s/... — once the customer is actually done and only boon-core's own async profile-snapshot step is left pending, a terminal result could sit undetected for up to 5 minutes before the next poll happens to catch it.Lowered the cap to 2 minutes: 30s/60s/120s/120s/120s/... This roughly halves the worst-case detection lag once the human-driven part of the wait is over, without meaningfully increasing poll volume over the course of a multi-minute wait (it's still the same handful of checks, just spaced closer together in the steady state).
Left unchanged:
FIRST_RECHECK_DELAY_MS(30s) — already fast, and asserted by an existing test (tool.test.ts).MAX_TOTAL_WAIT_MS(180 minutes) — deliberately tied to Anchor Browser's own sessionmax_durationcap (confirmed againstdocs.anchorbrowser.io/advanced/session-timeout), not an arbitrary guess.User Impact
Customers using the BuildingConnected (or any) browser-handoff sign-in flow should see the automatic "you're signed in, here's your profile" follow-up land sooner on average, once they've actually finished signing in — without changing the plugin's behavior in any other way (same one-shot recheck design, same total wait cap, same fallback messaging).
Evidence
node scripts/run-vitest.mjs extensions/browser-handoff— 43/43 (existing tests for the backoff ordering and first-delay value are unaffected; they don't assert the cap's absolute value).pnpm tsgo:core— clean.oxlint+oxfmt --checkon the changed file — clean.🤖 Generated with Claude Code
Summary by cubic
Lowers the browser-handoff sign-in recheck backoff cap from 5 minutes to 2 minutes so a completed sign-in is detected sooner.
Written for commit 4ebc130. Summary will update on new commits.