"Don't ask 'is an app there?' Ask 'is the exact thing I captured still there?' Those are very different questions."
Re-Read, Don't Trust
For a native Accessibility target, proving the snapshot means re-reading the world and comparing it, attribute by attribute, to what you captured. You go back to the system-wide element, read the focused element again, read its selected text and range again — the same chain from Track 3, but now run a second time, at insertion. The point isn't to re-derive the target; it's to check whether the target you already have still describes reality. Trusting the old snapshot skips exactly the step that keeps you safe.
What Must Match
A native re-proof compares several things, and all of them must agree: the frontmost app and its process id, so you're in the same app instance; the focused element's role and identity, so you're in the same field; and, most importantly, the selected text and range, so the exact characters you meant to replace are still the ones selected. That last check is what separates Flint's guard from a weaker one. Same app isn't enough. Same field isn't enough. The same selection is the bar, because that's what's about to be overwritten.
SNAPSHOT (t0) RE-READ (t1) verdict
--------------------- --------------------- -------
app bundle + pid app bundle + pid must match
focused element role focused element role must match
selected text selected text must match
selected range selected range must match
all match -> replace
any differ -> refuse
Replacing Exactly the Selection
Once the re-proof passes, the native replace is precise: set the focused element's selected-text attribute to the transformed result, which overwrites exactly the currently-selected range. Because you just proved that range is still the one you captured, the overwrite lands exactly where the user meant it. This is the cleanest possible insertion — no clipboard, no synthetic keystrokes, just a direct, scoped replacement of the proven selection — and it's available precisely because the native target let you re-verify the range first.
AXUIElement reference captured at the strike is not a reliable handle to compare across the gap — the same field can hand back a different reference, and a stale reference can dangle. So don't prove 'is this the same object pointer?' Prove 'does the currently focused element report the same app, role, selection, and range?' Identity you can trust is the identity you can observe and re-read, not a handle you cached.