Repository navigation
fix: a refused launch leaves no ghost mission and is not repeated; Core reuses its own AirVPN session after a restart - #2352
Merged
Conversation
…ing route yields to the next account AirVPN keeps listing a tunnel's session for a few minutes after the tunnel is gone, so every start in that window was refused with airvpn_device_in_use: no VPN-routed account worked for minutes after each Core restart. Core now records in the coordinator directory which instance and process last started each device. A listed session may be replaced when the record names this instance and that process is gone (Linux, pid and start time), or names this very process. An unknown holder, the other instance or a process that may still run keeps the refusal. Account selection passes over an Antigravity account whose VPN route is only waiting (device in use, coordinator busy, exit in use) and takes the next usable account.
…and is not repeated On 30 Nov one refused Antigravity launch left three missions in the sidebar. The mission row and its first event reach clients before the dispatch is admitted; the rollback deleted the row silently; the refusal was answered 502, which orb-locald forwards to its other origins, and the released idempotency key let each forward create another mission. - Every unborn rollback (create, fork, /btw, MCP launch) goes through discardUnbornMission, which emits mission_presentation/mission_deleted. - A create refused after real work keeps its answer on the idempotency key for 10 s, so a repeat gets the same refusal and does nothing; later the key reserves a fresh attempt. - Account and VPN-route refusals of a launch answer 409 instead of 502, and a route that is only waiting is explained with retry_after_secs.
… once The list is reconciled, never replaced, so a row that a later answer omits stayed until two full polls missed it. mission_deleted is the explicit removal event: the row now leaves every list on it and is kept out of a list answer requested earlier. The composer shows Core's own explanation of a refusal that carries retry_after_secs.
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.
Problem (30 Nov)
Creating an Antigravity mission right after a Core restart answered
antigravity_vpn_unavailable:airvpn_device_in_useand the mission appeared three times in the sidebar, none of them existing in Core.502.orb-locald's transport (CliMain.lean~303) retries429/5xxwrites that carry anIdempotency-Keyon its three origins, and the rollback released the key: three POSTs, three missions.Specs:
docs/specs/refused-launch.md(new),docs/specs/account-vpn.md.Change
discardUnbornMission(one helper for every unborn-rollback site inControl.leanandMcpGateway.lean) deletes the mission and emits the existingmission_deletedpresentation event; the desktop removes the row on it and ignores an older list answer that still carries it.antigravity_*/native_*errors answer409with a plainmessageandretry_after_secswhen the wait is known. A create refused after real work keeps its answer on the idempotency key for 10 s, so transport retries replay it.Tests
Core:
TurnOutcomeTests,SelfTest,AirVpnSettingsTests,HarnessProxyTestscases. Desktop: vitest 2505 pass,tscclean.Not verified
vpn_exit_unverified).mission_deletedyet (they refresh on it); noted in the spec.Control.lean~3203) still fails on its first account.vpn_coordinator_unavailable.