Skip to content

Race the interface list against Forget and Turn off, and map #109 evidence - #421

Merged
BunsDev merged 1 commit into
mainfrom
companion-109-evidence
Oct 28, 2026
Merged

BunsDev merged 1 commit into
mainfrom
companion-109-evidence

Conversation

@BunsDev

@BunsDev BunsDev commented Oct 28, 2026

Copy link
Copy Markdown
Contributor

Evidence for #109, no production change. Base main at 6c9000f.

What this adds

  • docs/reviews/2026-10-28-companion-two-lan-acceptance.md: each of the four requirements from the 2026-10-07 comment on companion: binding HTTPS server to single static IP breaks phone pairing on network change / multi-interface Macs #109 mapped to the tests that prove it, with what each test does and does not prove; the physical acceptance procedure for a Mac on two subnets with the phone on the secondary LAN (QR, Bonjour, primary and secondary DHCP changes, Forget and Turn off during recovery) and a pass/fail table for Val to fill with macOS, Modex and Companion versions.
  • Two race tests in apps/desktop/test/companion-network.test.ts: the interface list changes while Forget paired phones or Turn off is running (a removed listener is still closing, the interface returns mid-action). The kept interface refuses the old token on its unchanged socket, nothing survives Turn off, and a late monitor tick does not re-enable it. Both pass on main; each was shown red against a deliberate mutation of the generated JS only (Forget skipping rotation during a reconcile; Turn off leaving listeners to the in-flight reconcile). No fix was needed, so none was made.
  • One mocked-interface test pinning today's policy: a utun or bridge with a private address gets a listener. localAddresses() is unchanged pending Val's answer to the VPN question on #109; if the answer is to exclude, that test flips first.
  • docs/ios-companion.md and docs/status.md point at the new evidence and the two remaining gates.

The listener test infrastructure is from #166; the in-flight revocation shape reuses @Yash990-bit's #124 regression work, and the #406 rebind test is the base for the new races.

Verification

pnpm build && pnpm test exit 0 on macOS 27.0.1: worktree scripts 117/117, core 16/16, desktop 1995 passed and 17 skipped of 2012, desktop native 21 passed and 5 skipped of 26, site 10/10, store-desktop 16/16. The three new tests ran (LAN present, nothing companion-related skipped).

No user-visible change, so no e2e run.

Not merged until Val says so. Closing #109 still needs the physical procedure's results and the VPN policy answer.

🤖 Generated with Claude Code

… map #109 evidence

Two regression tests: the interface list changes while Forget paired phones or
Turn off is running (a removed listener is still closing and the interface
returns mid-action). No listener survives with the old token; the kept
interface keeps its socket and refuses the old token; a late monitor tick
does not re-enable a turned-off listener. Both pass on main and each was
shown red against a mutation of the generated JS only, so no fix is included.

One mocked-interface test pins the current policy that a utun or bridge with
a private address gets a listener, pending Val's answer on #109.

docs/reviews/2026-10-28-companion-two-lan-acceptance.md maps the four #109
requirements to the tests that prove them and holds the physical two-LAN
acceptance procedure for Val. ios-companion.md and status.md point at it.

Reuses the #166 listener infrastructure, the #406 rebind race and the
in-flight revocation shape from @Yash990-bit's #124 regression work.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@vercel

vercel Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
modex Ready Ready Preview Oct 28, 2026 9:01am UTC

Request Review

@github-code-quality

Copy link
Copy Markdown

Code coverage overview

Languages: TypeScript

TypeScript / code-coverage-agent

main d717bb0 companion-109-eviden... e02f618 +/-
65% 65% 0%
View coverage of the 10 most impacted files.
File main d717bb0 companion-109-eviden... e02f618 +/-
apps/desktop/sr...ions/intents.ts 100% 99% -1%
apps/desktop/sr...ain/commands.ts 87% 87% 0%
apps/store-desk...rc/main/demo.ts 95% 95% 0%
apps/desktop/sr...review/patch.ts 98% 100% +2%
apps/desktop/sr...eview/writes.ts 0% 86% +86%
apps/desktop/sr...rite-service.ts 0% 97% +97%
apps/desktop/sr...review-patch.ts 0% 97% +97%
apps/desktop/sr...review-write.ts 0% 100% +100%
apps/desktop/sr...ons/write-gh.ts 0% 100% +100%
apps/desktop/sr...ge-preflight.ts 0% 100% +100%

ℹ️ Calculations represent line coverage. Results may change as calculations are updated.

@BunsDev
BunsDev added this pull request to the merge queue Oct 28, 2026
Merged via the queue into main with commit aa22753 Oct 28, 2026
13 checks passed
@BunsDev
BunsDev deleted the companion-109-evidence branch October 28, 2026 10:55

This branch was successfully deployed

1 active deployment
Preview — e02f6188 Deployed Oct 28, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant