You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Verify overlay identity by generation instead of a flag
The prior settle path tracked "is my overlay open" with a boolean the
caller had to remember to clear at each settle site, which depended on
knowing that the shell closes an accepted or cancelled overlay (and
may open the next queued gate) before invoking that callback. A
generation counter bumped at every open on the shared host makes that
comparison explicit instead of assumed: a settle path checks whether
its own captured generation still matches the current one before
closing anything, so it can never tear down an overlay opened after
its own.
Closing an overlay from inside a settle path (autoDeny, or a
grant-driven reconcile) re-invokes that overlay's own onCancel, since
shell.ts's closeInsetOverlay calls onCancel after notifying close
listeners. Recording the decision unconditionally at each call site
meant that reentrant invocation wrote a second transcript row for the
same request. permissionQueue.settle already reports whether an id was
still live to settle, so gating the transcript write on that return
value makes the reentrant call a no-op instead of a duplicate.
0 commit comments