Skip to content

fix(boss): retry detached read once - #2224

Draft
shaomingbo wants to merge 1 commit into
jackwener:mainfrom
shaomingbo:agent/retry-boss-detached-read
Draft

fix(boss): retry detached read once#2224
shaomingbo wants to merge 1 commit into
jackwener:mainfrom
shaomingbo:agent/retry-boss-detached-read

Conversation

@shaomingbo

Copy link
Copy Markdown

Summary

  • retry bossFetch once when a GET evaluation fails with detached_mid_command
  • keep the retry bounded to one fresh evaluation
  • never retry POST, because a detached mid-command write may already have completed

Root cause

The Browser Bridge correctly treats detached_mid_command as non-retryable at the generic Page.evaluate layer because the command outcome is unknown. BOSS bossFetch knows whether its XHR is a read or a write, so it can safely replay a detached GET without weakening the core write-safety boundary.

An isolated BOSS search canary reached bossFetch and failed with Boss API request failed: Detached while handling command. after navigation had succeeded. The trace reported no failed network requests. The patched adapter was not retried live because the canary authorization explicitly allowed no retry.

Validation

  • regression test failed before the change and passed after it
  • verifies a detached GET succeeds on one replay
  • verifies a second detached GET is propagated after exactly two evaluations
  • verifies a detached POST is propagated after one evaluation
  • BOSS adapter tests: 5 files, 38 tests passed
  • npm run typecheck
  • npm run build
  • git diff --check

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant