Repository navigation
Conversation
b9f45c0 to
506e8fa
Compare
506e8fa to
4db55e8
Compare
b3823d9 to
f43a192
Compare
f43a192 to
47c6a46
Compare
4bdd4a6 to
64cdb5f
Compare
64cdb5f to
fe925f8
Compare
fe925f8 to
16a15b2
Compare
16a15b2 to
0187f24
Compare
0187f24 to
a0c8ad6
Compare
a0c8ad6 to
244e79a
Compare
244e79a to
7abb4f6
Compare
|
Closing because the complete two-phase retirement stage is already on main (
Main further serializes completion against cancellation/reentrancy, keeps failed completion retryable, and settles command-ledger and execution-host-grant resources through |
ELI5
Closing an Electron page is not instant: the page can ask to stay open, crash, or disappear after the close request. This change gives the runtime a three-step safety latch—begin, cancel, or complete—so it never forgets the old browser engine before knowing what actually happened.
What Changed
beginPageRetirement.Why
STA-4150 needs runtime-owned logical placement while Electron owns physical WebContents lifecycle. A one-step delete could release capacity and permit a replacement before
beforeunload, close acknowledgement, crash cleanup, or destroy settlement had resolved, creating overlapping engines or stale cleanup of a new page.This remains inert scaffolding. It adds no production lifecycle caller, command, capability, exchanged field, RPC/event, renderer surface, or Electron behavior. Activation still needs serialized normal-close versus terminal-crash priority, authenticated command delivery, exact WebContents/resource settlement, lease-loss reconciliation, and inventory/reclaim.
Linked Issue
STA-4150
Visual Proof
N/A — no rendered UI or production behavior is activated.
Testing
Parent behavior: 5/5 causal tests failed because two-phase retirement APIs did not exist.
Focused candidate: 31/31 retirement, placement, lease, replacement, and downgrade tests passed.
Full
src/main/runtime+src/main/browser: 4,951 passed, 5 existing skips.Adjacent RPC/protocol/mixed-version wire: 26/26 passed.
Full typecheck, native/type-aware audits, changed-code audit, formatting, reliability manifest, max-lines ratchet, and diff checks passed.
Three fresh correctness, security/performance, and Electron-lifecycle reviews found no publication blocker.
I manually validated the deterministic runtime behavior locally
Automated tests added
Review
Please review exact-token identity, begin idempotency, cancel/complete races, authority error ordering, capacity retention, and the intentionally inactive production surface. One documented activation decision remains: live-lease failure versus retirement-pending error precedence.
Checklist