Skip to content

test: add a hosted-runner trezor-emu path alongside the self-hosted one - #692

Draft
mdozhdev wants to merge 3 commits into
masterfrom
test/trezor-emu-remote
Draft

test: add a hosted-runner trezor-emu path alongside the self-hosted one#692
mdozhdev wants to merge 3 commits into
masterfrom
test/trezor-emu-remote

Conversation

@mdozhdev

Copy link
Copy Markdown
Collaborator

Description

trezor-emu needs Docker and the Simulator on one machine, so it runs on the self-hosted Mac — the last job keeping it alive.

Adds the same suite as a second suite choice: emulator stack on ubuntu-latest, Simulator on macos-latest, joined over Tailscale. Same shape as #689.

The suite reaches Bridge, the User Env controller, electrs and bitcoind as 127.0.0.1 from inside the Simulator, so the Mac job relays those ports onto loopback rather than making the suite stack-aware. No Swift or Info.plist changes.

trezor-emu is untouched and still dispatchable. Dispatch-only, so nothing runs unless asked.

Linked Issues/Tasks

  • synonymdev/pubky-stack#275

mdozhdev and others added 3 commits August 27, 2026 15:45
`trezor-emu` needs Docker and the iOS Simulator on one machine, which
GitHub-hosted macOS runners cannot provide. It is the last job holding the
self-hosted Mac open.

Adds the same suite as a second `suite` choice, with the emulator stack on an
`ubuntu-latest` runner reached over Tailscale:

| job | runner |
|---|---|
| `trezor-stack` | ubuntu — bitcoind, electrs and Trezor User Env; holds until the tests finish |
| `trezor-emu-remote` | macos-latest — the same xcodebuild invocation |

The suite addresses Bridge, the User Env controller, electrs and bitcoind as
127.0.0.1 from inside the Simulator, across five call sites in
BitkitUITests/TrezorBridgeDashboardUITests.swift that are not all
configurable. The Mac job relays those six ports onto loopback instead, so
the test and the app are unchanged — no Swift and no Info.plist edits.

Verified against the pinned trezor-user-env image on Linux: Bridge binds
0.0.0.0 rather than loopback, origin checking is patched out, and a full
acquire -> GetFeatures -> release round trip works off-host and through the
relay, as does emulator-press-yes over the controller websocket.

Nothing existing changes. `trezor-emu` is untouched and still dispatchable.

The two new jobs must not depend on each other: `trezor-stack` only finishes
once the tests are done, so a dependency either way deadlocks.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
xcbeautify condenses a failed test to one line, which for an assertion
carrying no message says only that it failed. Read the file, line and
attached accessibility dump back out of the result bundle instead.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
A coinbase matures after 100 confirmations and the compose setup mines a
single block, so the wallet holds nothing spendable and the suite cannot
fund a Trezor address. A developer machine carries blocks over in the chain
volume between runs, which hides it; a runner always starts at height 1.

Verified against the same compose: fresh stack is height 1 / balance 0, and
sendtoaddress fails; after mining 101 the balance is 100 and the suite's own
0.001 funding call returns a txid.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
mdozhdev added a commit that referenced this pull request Aug 28, 2026
Adopts the approach from #692: rather than teaching every call site the
stack address, relay its ports onto 127.0.0.1 on the Mac. The suite, the
specs and the app all keep reaching 127.0.0.1, so no address plumbing is
needed at all — every LND_HOST/ELECTRUM_HOST/E2E_LOCAL_HOST override is
gone, and the credentials are written where lndConfig looks by default.

Readiness is checked end to end rather than with a port probe: the relay
accepts before it has dialled anything, so nc would pass with the stack
unreachable.

The self-hosted Mac is unresponsive, so e2e-tests-local is parked and
e2e-status now reads the remote path. Both revert before merging.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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