Repository navigation
fix(cooperation): preserve upload diagnostics during invalidation - #759
Closed
Jarvis636431 wants to merge 1 commit into
Closed
Jarvis636431 wants to merge 1 commit into
Jarvis636431 wants to merge 1 commit into
Conversation
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Collaborator
|
Closing this PR for two reasons:
To maintain engineering quality, PRs must be backed by genuine reproduction evidence and a verified root cause rather than speculative fixtures. |
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.
Refs #756.
Root cause
A same-URL
history.pushStateduring an upload emits a rootPage.navigatedWithinDocument, which invalidates cooperation while the collector's document identity remains unchanged. The next guarded upload probe then latchesrevokedwithPage interaction coverage changed; wait and synchronize.uploadThroughActivatedFileInputalready converts that guard failure into a phasedfile_input_probe_failed/resolve_inputreceipt. However,CooperationController.run()replaces it with genericcontrol_context_invalid, even when the post-action refresh succeeds. This hides the upload phase and cause requested in #756.Fix
When there is no structured
checkFailure, preserve the upload handler'scode,message,reason,phase, and transfer diagnostics, while takingeffect_stateand recovery guidance from the control failure.This keeps the conservative
effect_state: "unknown"after the upload trigger ran. Structured precondition failures remain authoritative, and the invalidated context cannot be reused.Real-browser before/after evidence
I reproduced the reported
control_context_invalidpath using the real daemon + CLI + built MV3 extension in isolated headless Chrome 158.0.8127.37. The visible upload button performshistory.pushState({}, "", location.href)without activating the hidden file input.72d51aae, isolated reproductionpermission_deniedcontrol_context_invalidcontrolunknowncdp_failedfile_input_probe_failedresolve_inputunknownThe after run also verifies that the trigger ran exactly once, no file was assigned, and the pathname remained unchanged. An immediate replay was blocked by the CLI ledger with
uncertain_prior_effectanddispatched: false; after synchronization, the stale extension context was rejected withcontrol_context_invalid.This is a deterministic reproduction of the reported receipt path, not a claim to have exercised the reporter's private CMS or ruled out other triggers.
Tests
pnpm --filter @browser-skill/extension test— 4076 passed, 8 skippedpnpm --filter @browser-skill/extension compilepnpm --filter @browser-skill/extension buildevals/browser/cases/regression/cooperation/run.mjstarget-policy suite, including the new CLI upload scenario and existing CLI/MCP scenarios