Make browser confirmation conservative by default - #4
Open
vsolano9 wants to merge 1 commit into
Open
Conversation
Require confirmation for typing, all clicks, and navigation away from the canonical entry URL. Keep only waits and redundant entry navigation read-only, add exhaustive gate tests, and align public/runtime documentation.
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 & why
The confirmation gate trusts recipe authors to label only clicks with
write: true. That allows a mutatinggoto, typing, an unlabeled click, or evenwrite: falseto reach the browser without confirmation. This adopts the issue’s conservative-by-default option: recipes run unconfirmed only when every step is provably read-only.Closes #3
Changes
writefield for recipe compatibility without allowing it to waive confirmationnpm testValidation
write: falseclick all bypassed the old gatenpm test— 10/10 pass; repeated successfully 20 consecutive times/runintegration — mutating goto, type, andwrite:falseclick each return the exact HTTP 400 confirmation error before browser launchnpm run typecheck— passnpx wrangler deploy --dry-run— pass; no deploymentgit diff --check— passnpm ci— pass; reports the existing dependency advisories (10 total, 4 high in production dependencies); no dependency or lockfile changesChecklist