Fix single-host and cross-host connection stability - #8
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: eea19dc75b
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| let cachedOnly = MobileMerge.agents( | ||
| from: cached, acknowledgedCompletions: acknowledgedCompletionRevisions | ||
| ).filter { !liveIdentities.contains(ThreadIdentity.canonical($0.threadKey)) } |
There was a problem hiding this comment.
Resolve aliases before splitting cached and live agents
When one node is offline with a cached client-new-thread key while the live node exposes the same task under its stable rollout ID, these separate MobileMerge.agents calls prevent temporaryThreadAliases from seeing both representations. The canonical-ID filter then treats them as different tasks, so the dashboard regresses to showing the cross-host task twice and may consume a slot with the stale offline alias. Merge the live and cached snapshots together for identity resolution before excluding cached duplicates.
Useful? React with 👍 / 👎.
What changed
Why
Normal Mac/Windows clock skew could suppress valid live state, a removed relay could leave controls pointed at the other platform, and duplicate/offline iPhone profiles could appear healthy or intercept commands.
Validation
npm run checknpm test(133 passed, 1 expected Windows-only skip)npm run validatenpm run audit:releaseThis PR does not include the in-development task timer or StandBy dashboard work. Codex was not restarted.