Skip to content

P3.7 test access: browser/Wasm peer page for phone runs + laptop VM NAT emulation #1826

Open

Description

@dezren39

Origin

Owner ruling on #795 (Drew, 2026-10-28). The issue was blocked on 'owner provides two networks', framed as two home-style networks with a host on each. Drew's answer, in substance:

  • He does not have a second computer on a second home network, and no VPC / paid networking will be set up for this — any server we run would be a plain host (e.g. plain OVH), not a VPC.
  • He WILL run a test himself if it is runnable from a website on his phone (Wasm is fine), or from a mobile app.
  • VMs on the laptop with an emulated NAT configuration are acceptable for the cells a phone cannot cover.
  • His phone on carrier NAT is not a second home network — but per the id phase-3: P3.7 real-network holepunch and n0 QAD tests on two networks are owner-blocked with no tracking issue #795 discussion it IS a legitimate test cell (see below).

Plan

  1. Browser/Wasm peer page (the real-network cell). A static page carrying a Wasm build of the id connectivity test peer (or the smallest harness that exercises the same holepunch + n0 QAD paths). Drew opens it on his phone: phone on the carrier network, the other peer on the laptop at home. Carrier CGNAT vs home NAT is a real, hard, and realistic cell — it is the pairing actual mobile users present — and it needs zero installs and zero new hardware.
  2. Laptop VM NAT emulation (the remaining cells). A VM test config on the laptop placing peers behind different emulated NAT types (full-cone / restricted / symmetric) to cover the home-NAT x home-NAT combinations no available hardware provides. Emulated results are recorded AS emulated — never presented as real-network measurements (the acceptance brief's 'not falsely passed' rule cuts both ways).

Acceptance criteria

Activity

  1. developing-today commented on Oct 28, 2026

    @developing-today
    Contributor
  2. added
    kind/testTest coverage, test infrastructure, or test-only fixes
    source/humanFiled directly by a human
    priority/normalOrdinary priority (the default)
    effort/mMedium: expected under 1 day of work
    app/idPackage/app: id (pkgs/ or apps/ in this repo)
    meta/enrichedIntake review done: acceptance criteria, links, and normalized labels added
    on Oct 28, 2026
  3. dezren39 commented on Oct 28, 2026

    @dezren39
    MemberAuthor

    Intake review

    Fleet monitor intake pass (protocol §5), 2026-10-28.

  4. added
    queue/queuedHas a queued task in the Supabase agent queue
    task/triageQueue packet kind: verify, reproduce, and route this item
    on Nov 3, 2026
  5. dezren39 commented on Nov 3, 2026

    @dezren39
    MemberAuthor

    agent-note:v1
    state: triaged (coverage pass)
    Coverage pass 2026-11-03: reviewed in the fleet-wide per-issue pass (drift / overlap / already-handled / stale / blockers / ordering). Verdict: still live; queued in repo-health-code-pilot as triage at priority 40 (priority/normal). If this is already handled at current main, the triage closes it with evidence; if it needs splitting, the triage files the split.
    Found via: coverage pass 2026-11-03

  6. added
    work/assignedQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    and removed
    queue/queuedHas a queued task in the Supabase agent queue
    on Nov 3, 2026
  7. dezren39 commented on Nov 3, 2026

    @dezren39
    MemberAuthor

    Triage verdict (queue task 7751, lane ec118cad) — still live, but AC1 as written is not implementable; split filed

    Verified against origin/main at d3476bce7 (2026-11-03). No PR or branch implements any part of this plan (gh search prs 1826 → nothing; no doc references the issue).

    1. Browser/Wasm peer page: a browser cannot be an iroh holepunch/QAD peer

    This is a capability limit, not a missing implementation:

    • Browsers have no UDP socket, so iroh's QUIC/UDP holepunch cannot run there.
    • iroh 1.3 compiles the QAD probes out on wasm: spawn_qad_probes and the QAD streams are #[cfg(not(wasm_browser))], with empty streams on wasm (iroh-1.3.0/src/net_report.rs:344-385).
    • pkgs/id/crates/id-core/src/connectivity.rs:12-15 is the only connectivity code and is native (iroh::Endpoint, tokio); there is no wasm32 target, cfg or wasm-bindgen path anywhere under pkgs/id. pkgs/id/web is the server-backed editor UI over a WebSocket (pkgs/id/web/src/collab.ts:2,111), and every .wasm under pkgs/id is a Roc app/world module, not a peer.
    • This is already the repo's own conclusion elsewhere: Workers "cannot be Iroh peers" (doc/2026-10-28T23-34-14Z_investigation_cloudflare_workers_fit/…md:21-26,167-172) and the id: design: ID serverless edition v1 (Cloudflare Workers) #2046 design keeps browsers on HTTPS/WebSocket (doc/2026-11-01_design_id2046.md:60,62).

    So "the peer page loads on Drew's phone browser and completes a holepunch + QAD check" cannot be satisfied by a page. Drew's ruling asked for something he can run from his phone and offered "Wasm is fine, or a mobile app" — the mobile-app branch is the viable one, and it is already filed as #1831 (Android app, which the owner direction explicitly calls "a native phone peer for this issue's test line"). Re-scoping AC1 to #1831 stays inside the ruling; it is not a new owner decision.

    What remains honestly achievable in a browser: a static page that displays a run performed by the native peers (phone app ↔ laptop peer), showing the observed NAT types, path (direct/relay) and QAD result. It is a result viewer, not a measured peer, and must be labelled that way.

    2. Laptop VM NAT emulation: already built, but not reproducible from the repo

    The C2 matrix already runs over emulated NAT types on Linux netfilter:

    • doc/2026-10-11T03-44-33Z_design_groups_events_delegation/spikes/c2-holepunch/lab/topo.sh:41-74 — cone (masquerade + static DNAT), restricted (masquerade), symmetric (masquerade fully-random), with probe-nat.sh verifying each independently.
    • …/c2-holepunch/RESULTS.md:96-123 — full and mixed matrix (cone×cone, restricted×restricted, symmetric→relay, cone×symmetric, cone×restricted, symmetric×restricted), all labelled as emulation, with "real NAT devices and real networks" recorded untested (RESULTS.md:170).

    The gap is reproducibility, not the config: …/c2-holepunch/Cargo.toml:14 depends on /home/user/work/spikes/c1-connect, and lab/run.sh:24-26 + lab/probe-nat.sh:14 hardcode nix-store binary paths. Nobody else can re-run the matrix from a clean checkout.

    Split filed: #4984 — de-hardcode the paths, add a Nix/flake entry point, run it once end-to-end, and post the results to #795 labelled emulated. This is the actionable half and is queued as a bounded fix.

    3. Blockers and ordering

    1. id: make the C2 NAT-emulation lab reproducible from the repo (de-hardcode paths, add a runnable entry point) #4984 (reproducible emulated matrix) — no blockers, actionable now, queued.
    2. Proof-of-concept Android app + input interface extension (touch, mouse, hover) for relaying into live apps #1831 (Android phone peer) — prerequisite for the honest carrier-CGNAT × home-NAT cell; the phone leg cannot be measured in a browser.
    3. This issue closes when both results are recorded on id phase-3: P3.7 real-network holepunch and n0 QAD tests on two networks are owner-blocked with no tracking issue #795 and id phase-3: P3.7 real-network holepunch and n0 QAD tests on two networks are owner-blocked with no tracking issue #795's acceptance is updated to this plan (its "two owner-provided networks" criterion is superseded by the 2026-10-28 ruling). id phase-3: P3.7 real-network holepunch and n0 QAD tests on two networks are owner-blocked with no tracking issue #795 stays status/blocked until then — do not mark the matrix passed on emulation alone.

    Labels: queue/queued + status/needs-triage → status/triaged, keeping kind/test, priority/normal, effort/m, app/id, meta/enriched.

    🤖 Agent note · triaged

  8. added
    status/triagedTriaged and routed (see agent note)
    and removed
    task/triageQueue packet kind: verify, reproduce, and route this item
    queue/claimedQueue worker lifecycle state
    work/assignedQueue worker lifecycle state
    on Nov 3, 2026
  9. dezren39 commented on Nov 4, 2026

    @dezren39
    MemberAuthor

    The VM-emulation acceptance item is now checked based on PR #5665 and the results recorded on #795. The documented Nix entry point completed three NAT probes and all nine ordered C2 pairs, all with dial exit 0; the results are explicitly labeled Linux netfilter emulation, not real-network measurements. The separate phone/carrier-network leg remains open and #795 stays blocked pending that work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

app/idPackage/app: id (pkgs/ or apps/ in this repo)effort/mMedium: expected under 1 day of workkind/testTest coverage, test infrastructure, or test-only fixesmeta/enrichedIntake review done: acceptance criteria, links, and normalized labels addedpriority/normalOrdinary priority (the default)source/humanFiled directly by a humanstatus/triagedTriaged and routed (see agent note)

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions