Repository navigation
fix(cooperation): fail fill immediately on readonly/disabled targets … - #784
Open
Bensonbenyi wants to merge 1 commit into
Open
Bensonbenyi wants to merge 1 commit into
Bensonbenyi wants to merge 1 commit into
Conversation
…instead of polling to the readiness deadline
This branch has not been deployed
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.
fix(cooperation): fail fill immediately on readonly/disabled targets instead of polling to the readiness deadline
Summary
Filling a readonly or disabled target through cooperative control (
--ref+--context) now fails on the first target check with its structured reason instead of polling until the readiness deadline and losing the diagnosis to a timeout:Root Causes & Fixes
Readiness wait treats readonly/disabled fill targets as transient (
apps/extension/src/cooperation/controller.ts):target_hidden/target_disabled/target_readonlychecks until the readiness deadline.target_hiddencan genuinely resolve (a later render), andtarget_disabledcan resolve for controls the page enables asynchronously — but afilltarget never becomes writable on its own: readonly and disabled fields are business facts, so the poll only burns the budget and misreports the reason astimeout(action_timeoutwhen the daemon deadline wins the race). fix(cooperation): stop false human_intervention on scripted edits/clicks, cap readiness waits, and unblock failed-load tab management #783 already capped the poll at 5s; a readonly fill still waits the full 5s before failing.target_hidden(any method) ortarget_disabled(methods other thantool.fill).target_readonlyis only ever produced bytool.fillchecks (action-checks.ts), so removing it from the retry set changes nothing for other methods.Changelogs: Updated both
CHANGELOG.mdandCHANGELOG.zh-CN.md.Verification
pnpm --filter @browser-skill/extension test: 4,106 passed (190 files), including newtarget-policy.test.tscases:tool.fillreturnstarget_readonly/target_disabledafter exactly onecheckActionTargetcall with no input sent, and a hidden fill target is still awaited to visibility (regression guard for the retained wait).target-policy.test.ts(waits only for initial target readiness,rechecks only the target while it is becoming ready) and thedynamic-read.mjseval all pass untouched.pnpm --filter @browser-skill/extension compile(tsc) &pnpm lint(biome + stylelint): 0 errors.readonlyinput with--timeout 1sblocked for 1.017s and returnedtimeout/action_timeout. Steps to rerun after rebuilding/reloading the extension: startdemo-site,bsk cooperate sync, setdocument.querySelector('#name').readOnly = trueviabsk evaluate, re-sync, thentime bsk fill @e2 --value x --session <id> --context <CTX> --timeout 1s --json— expected:permission_denied/target_readonlyon the first check (~200ms).