Repository navigation
fix(android): refuse a fill whose resolved field left the point - #5218
Conversation
A selector or @ref fill on Android typed into whichever field held the resolved point at input time. When the target moved between resolution and input, the other field received the text and verification confirmed it, because it checks the field at the point. fillCommand now passes the resolved node's identifier and package through the fill handoff. The Android pre-read refuses with android_fill_target_moved (dispatched: no) before any input when every visible node with that identity lies away from the point. Point fills carry no identity and are unchanged. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Size Report
Startup median (7 runs, lower is better):
Affected plugins
|
There was a problem hiding this comment.
All reported issues were addressed across 12 files
Reply with feedback, questions, or to request a fix.
View guided diff | Turn on auto-fix | Re-trigger cubic
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Apex Sentinel: 1 new finding on 7474de9. The verdict and the full list are in the summary comment.
…entity covers the point A gone or reclassed resolved node now refuses too. The check matches the resolved class, runs only on fresh captures, and a failed or stale pre-read reports targetIdentity: 'unverified' instead of passing silently. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Apex Sentinel: 1 new finding on 4cbebe0. The verdict and the full list are in the summary comment.
…the fill pre-read The snapshot publishes a Compose merging node with its role child's class, while the raw pre-read still reports android.view.View, so every fill on such a node was refused. Other class changes still refuse. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This comment has been minimized.
This comment has been minimized.
|
At c5d60e8, live device evidence for the new fill refusal is missing, and it is required before merge. This change adds a refusal before input on the Android fill path for selector and Not blocking, so take or leave these, possibly as follow-ups: share one node-to-target match based on The three checks that did not pass are cancelled Not verified here: tests were not run, and the assessment relies on CI and a reading of the scenario harness. It was also not verified how often a real helper pre-read is complete and fresh, or whether every Android provider hierarchy (such as Limrun) normalizes class names the same way. Before merge, the emulator run needs to show both the successful normal fill and the |
|
Live Android emulator evidence at c5d60e8. Setup: a new AVD (a) Normal selector fill: passThe result has no (b) Stale
|
Resolve the fillAndroid conflict with #5213: the per-fill helper hold now wraps the identity pre-read and the fill. Fold the target-identity cases into #5214's capture-evidence scenario and flip its wrong-field test to expect android_fill_target_moved. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Merged
Both behaviours still hold in |
…dence scenarios The moved cases came without the local type alias they annotate with, so typecheck failed. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Apex Sentinel · ✅ Approve · review of
|
| Command | What it does |
|---|---|
@apex-sentinel-staging note <context> |
Adds context; Sentinel re-checks the cited code |
@apex-sentinel-staging pivot <why> |
Says the finding is wrong; Sentinel re-checks the cited code |
@apex-sentinel-staging like |
Marks the finding as useful |
@apex-sentinel-staging dislike <why> |
Marks it as not useful, so it is not raised again |
On this conversation, comment @apex-sentinel-staging review to run a full review once again.
|
At 2e7f65a, no code problem blocks this change, and the live evidence requested at c5d60e8 is now provided. The emulator run shows a normal selector fill succeeding with no That run was made at c5d60e8 and still applies here: the production change is the same, apart from fitting the pre-read into the helper session hold from #5213, which already wrapped that read on main. The optional note about sharing the identity match is tracked in #5223. All 22 checks pass at this commit. Not verified here: tests were not run locally, and the assessment relies on CI. Nothing else is needed before merge. |
Summary
Invariant: an Android selector or
@reffill must not write into a node other than the one it resolved. If the target moved after resolution, the fill typed into the field now at the point, and verification passed because it checks that same point. Found by #5214.fillCommandpasses the resolved node'sidentifier,bundleIdandtypethrough the fill handoff. The Android pre-read refuses withandroid_fill_target_moved(dispatched: no) before any input when no visible node with that identity covers the point. This includes a node that is gone or has another class. A Compose node the snapshot published with its role class matches its rawandroid.view.View. A wrapper with the identity around the point passes. Point fills are unchanged.The check runs only on a fresh capture. A failed pre-read is tolerated, as on main. When the pre-read fails or is stale, the fill runs and the result carries
targetIdentity: 'unverified'.Before / after
fill id="…:id/amount" 42, afteramountandnoteswap places:Filled 2 chars, andnoteholds42COMMAND_FAILED,android_fill_target_moved,dispatched: no. Nothing changes.Validation
android-fill-capture-evidence.test.tscovers moved, gone, other class, Compose role fold, stale pre-read, unmoved and point fill. Its #5214 wrong-field case now expects the refusal.text-input-fill.test.tscovers the failed pre-read.text-input-fill-helper-lifecycle.test.tskeeps #5213's per-fill helper hold. Live proof posted atc5d60e8. CI owns the rest.Risks:
🤖 Generated with Claude Code