[repo] Merge: docs/lumen-decisions (Lumen decisions D1-D6 and the iOS phase, PR #7)

This commit was merged in pull request #7.
This commit is contained in:
2026-12-04 11:55:55 +01:00
2 changed files with 37 additions and 22 deletions
+5
View File
@@ -14,6 +14,7 @@ GPL-licensed implementation. This file says what may be read, what may not, and
| Crate docs (docs.rs, crates.io, crate READMEs) | per crate | Read freely. |
| Our own measurements | ours | Captures through our own relay ([tools/lab-relay](../tools/lab-relay)). Mark allowed **one** capture on his PC (answer 16, 2026-11-25), done exactly as [LAB_CAPTURE.md](LAB_CAPTURE.md) says; never his TV, never 192.168.100.217. Recordings stay local (on E:, approved for Play remotely) under `E:\build\play-remotely\lab\`, out of git; only facts and test vectors derived from them go in, with the date and setup. |
| Official Sunshine and Moonlight PC **binaries** in that capture | GPL-3.0 (we only run them) | Black-box peers: run, observe their traffic, their `--help` output, their own logs and the files/registry keys they write. Never open their source, never disassemble or decompile them. |
| Arena Domi Remote (Android, a GPL app built apart from Domi repos) and the official Moonlight PC app, as **clients of Lumen** | GPL-3.0 (we only run them) | Black-box peers (Mark, 2026-12-04, D2): lumen-host logs what they send to it. Same limits as the row above. Their workspaces and source are never opened; the Remote app's own workers drive it and hand over facts only. |
| READMEs and wikis of forbidden projects | n/a | For facts only (licence, release notes, compatibility statements). Never their source files. |
| Public OS and SDK documentation (Microsoft Learn; NVIDIA, AMD and Intel encoder SDK docs and API headers; libopus and ViGEm docs) | per vendor | Read for the host side (Lumen), facts in our own words, each page logged. Allowed in the Lumen host lead's brief of 2026-12-04. Never the source of GPL or LGPL projects that wrap these APIs. |
@@ -34,6 +35,10 @@ Never open, read, paste or port code from: **Sunshine, Moonlight (any client: Qt
moonlight-common-c, Moonlight's ENet fork, Apollo, Vibeshine, Rubylight, chiaki** (and forks of them). That also
means their source files on GitHub. Their READMEs and wikis are fine for facts.
**For host work (Lumen), also forbidden** (Mark, 2026-12-04, decision D2 in [LUMEN-HOST-PLAN.md](LUMEN-HOST-PLAN.md)):
the source of **OBS Studio** and **FFmpeg** (including any GPL or LGPL code that wraps NVENC, AMF, Quick Sync,
Desktop Duplication or WASAPI). Their documentation pages are fine for facts, like the READMEs above.
### Second-hand GPL facts
Moonshine credits Sunshine for "groundwork" on the host side, and a few Moonshine comments cite Sunshine or
+32 -22
View File
@@ -1,7 +1,7 @@
# Lumen host: the plan
Status: **plan, 2026-12-04. Nothing is built yet.** Building starts only after Mark has read this plan and answered
the decisions in section 8.
Status: **plan, 2026-12-04; Mark's go for phase one (L0 + L1) on 2026-12-04**, with all six decisions of section 8
accepted as proposed. Later milestones start after phase one is reported.
Goal (Mark, 2026-12-04): "move away from Sunshine". Today Arena Domi's Play remotely wraps Sunshine, a separate
GPL-3.0 program that Arena Domi installs and drives only through its local settings API. Lumen is Arena Domi's own
@@ -35,7 +35,7 @@ Words used here:
every parser has a fuzz target.
- **No admin rights.** lumen-host runs as the signed-in user, never as a service or as SYSTEM. The only elevation
in the plan is the one Mark already allowed at "Turn on Play remotely", and whether Lumen's firewall rules may use
it is decision D1.
it is decided: D1, yes, the same single step.
- **Nothing leaves the PC by default.** lumen-host listens only on the addresses Play remotely allows; every
session start and stop is audit-recorded, like today.
- **No injection into a game process, no DirectX/Vulkan hooks, no reading game memory.** Lumen captures the display
@@ -70,7 +70,7 @@ Words used here:
paired client launches a game, and stop when the session ends. One streaming session at a time in the first
version.
- **Started by Arena Domi**, never by Windows as a service. Who starts it at sign-in (the tray agent is the natural
owner, because it always runs) is decision D4.
owner, because it always runs) is decided: D4, the tray agent, once Lumen is the default.
- **Priorities**: the idle listeners run at below-normal priority. While streaming, the capture/encode thread and
the packet pacer register with the Multimedia Class Scheduler Service (no admin needed) and everything else stays
normal or below. The cost to the game is measured (section 7.4), not assumed.
@@ -212,7 +212,7 @@ silent. lumen-host runs at medium integrity, so:
administrator, so Arena Domi can't control it", once per session;
- the **secure desktop** (UAC prompts, lock screen) gets no input (and no capture, 1.2);
- `uiAccess` in the manifest would lift the first limit only for a signed program installed under Program Files,
and Microsoft reserves it for assistive technology. The plan does not use it (decision D6).
and Microsoft reserves it for assistive technology. The plan does not use it (D6, accepted).
### 1.7 Sessions and launching games
@@ -265,7 +265,7 @@ with one click (no PIN, no code, Mark's decision). With Lumen, the host side of
- **Arena Domi Remote (today)**: it pairs the GameStream way. The owner types the 4 digits the phone shows into
Arena Domi's "Enter the code from your phone" box, exactly as with Sunshine today; lumen-host holds the pending
pairing and the box supplies its PIN. The same box, the same click count. Whether Arena Domi Remote should learn
the grant-based pairing instead (which means publishing that small protocol in a GPL app) is decision D5.
the grant-based pairing instead was decided against (D5): it keeps the code box.
- **The host's identity**: the GameStream host certificate and its RSA key are made by lumen-host on first run and
the key is kept in Custos, never in a file. The PC's Play remotely signing key (Tessera) stays what it is.
- **Pairing state** (paired client certificates, which device they belong to) is public data on disk, each record
@@ -336,7 +336,7 @@ That catches every asymmetric mistake before a real client is involved. The rele
turning Lumen on and off.
- **Capture and encode** could instead live in DomiCapture (public, CPAL-1.0), which the roadmap names for the
zero-copy encode path and which Pictor Domi will share. That crate has no code yet and belongs to the Arena build
lead's plan; where Lumen's capture/encode lives is decision D3.
lead's plan; D3: capture/encode start in arena-host and move to DomiCapture at L4.
- What touches files outside Play remotely's agreed folders (installer, tray agent, shared seams) goes through the
Arena build lead, one small PR each, as agreed on 2026-11-25.
@@ -374,21 +374,31 @@ the load rule. Each milestone ends in a demo Mark can see. Total: **about 18 day
| L1 | Host protocol + first contact | DomiStream host side of section 3.1 (pairing, HTTP, RTSP server, ANNOUNCE, ENet host, control host, both packetizers), the in-memory client↔host session test, fuzz targets. A lumen-host skeleton (listeners on loopback only, no capture) that Arena Domi Remote in the Android emulator can find, pair with (code box) and list games from | 4 | the emulator on this PC pairs with Lumen and shows Arena Domi's game list; test and fuzz report |
| L2 | First stream | Capture (SDR path, and FP16 → SDR), NVENC HEVC/H.264 low latency, pacing, WASAPI + Opus (no audio parity), keyboard and relative mouse, launch from the library, quit, game mode and audit; beside Sunshine on its own ports | 4 | a game streams from Lumen to the emulator, with sound and keyboard/mouse, while Sunshine is still installed |
| L3 | Input, all of it | absolute mouse mapping, wheel, scan-code keyboard, text, ViGEmBus pads with rumble, the touch-to-mouse spec and `input::touch`, UIPI detection; the input e2e (7.3) running green | 2 | a scripted tap, long press and two-finger scroll land at the right places in the Arena input probe; e2e report |
| L4 | Colour and displays | range/colour-space negotiation from measurement, HDR → SDR tone mapping checked, monitor choice and switching, GPU scaling; HDR to HDR clients only if the HDR message has been measured | 2 | test pattern on the PC and on the phone side by side, with the measured colour differences |
| L4 | Colour and displays | capture/encode move from arena-host to DomiCapture (D3); range/colour-space negotiation from measurement, HDR → SDR tone mapping checked, monitor choice and switching, GPU scaling; HDR to HDR clients only if the HDR message has been measured | 2 | test pattern on the PC and on the phone side by side, with the measured colour differences |
| L5 | Pairing and per-device engine | Tessera-grant pairing with no PIN for Arena clients, the code box for Arena Domi Remote, the engine per device, Lumen's binding on the allowed addresses, firewall rules (after D1), the installer seam | 2 | gs-probe pairs with Lumen with no PIN; the phone pairs with a code; Settings shows "Streams with: Lumen" |
| L6 | Harness and the Day 3 gate | the same-PC latency harness (7.4), Lumen against Sunshine, tuning (pacing, VBV, slices, priorities), the game's frame-rate cost, a 2-hour soak, audio parity once U16 is solved | 2 | the harness table: median and p95 for Lumen and Sunshine, and the gate answer |
| L7 | Switch-over | stage C for each client that passes, Sunshine as the hidden fallback (stage D), uninstall path checked | 1 | Arena Domi Remote and the Windows client streaming from Lumen by default; Sunshine only under expert options |
Not in these estimates: Arena Domi TV itself (it switches when it exists, because it is built on DomiStream),
Lumen's own transport (roadmap Day 4), AMF/Quick Sync, 4:4:4, a virtual display per client.
Lumen's own transport (roadmap Day 4), AMF/Quick Sync, 4:4:4, a virtual display per client, and the iOS client
(5.2).
### 5.1 The first build phase proposed
### 5.1 The first build phase (accepted: Mark's go, 2026-12-04)
**L0 + L1**: the spikes (to retire the GPU and licence risks while they are cheap) and the DomiStream host side
with the in-memory session test, ending with Arena Domi Remote in the emulator pairing with a Lumen skeleton over
loopback. Nothing touches Sunshine, the owner's desktop, mouse or windows, except the one L0 spike run with Mark
present. About 5 days.
### 5.2 Later client phase: iOS
Every Domi app eventually runs on Windows, Android and iOS (Mark, 2026-12-04). Lumen's host does not change for
iOS: an iOS client speaks GameStream (later Lumen's own transport) to the same lumen-host. The iOS client is its own
phase after the switch-over (L7): DomiStream compiles for `aarch64-apple-ios` (it is pure Rust with no I/O, so the
check is a build and the test suite on that target), VideoToolbox decodes, the same `input::touch` recogniser maps
gestures, and the client pairs through a Tessera grant like Arena's other clients, with no PIN. It is planned and
estimated when phase L7 is done; no Moonlight iOS code is read for it (the clean room covers every client).
---
## 6. Sources and measurements for the host side
@@ -402,16 +412,16 @@ present. About 5 days.
configuration), NVIDIA's Video Codec SDK documentation and API header, AMD AMF and Intel oneVPL documentation, the
libopus documentation, the ViGEm documentation, the Opus and RTP RFCs, ITU-R BT.709 / BT.2020 / BT.2100 and SMPTE
ST 2084.
- **Proposed addition to the forbidden list for host work** (D2): the source of OBS Studio (GPL-2.0) and of FFmpeg
(LGPL/GPL) is not read either, because both contain encoder and capture code that would be tempting to port.
- **Forbidden for host work** (D2, Mark 2026-12-04): the source of OBS Studio (GPL-2.0) and of FFmpeg (LGPL/GPL)
is not read either, because both contain encoder and capture code that would be tempting to port.
### 6.2 Measurements we make ourselves
- **Sunshine as a black-box oracle.** Our own `gs-probe` (a GameStream client) connects to the pinned Sunshine and
logs what it sends, as allowed today ([LIVE-INTEROP.md](LIVE-INTEROP.md)): headers, packet layouts, FEC parity
(to solve the audio matrix, U16), the HDR message bytes with HDR on (its layout), timings.
- **Clients as black boxes.** Arena Domi Remote (in the Android emulator) and, if Mark agrees (D2), the official
Moonlight PC binary connect to lumen-host, and lumen-host logs what they send: ANNOUNCE values per client setting
- **Clients as black boxes** (D2, accepted). Arena Domi Remote (in the Android emulator) and the official
Moonlight PC app connect to lumen-host, and lumen-host logs what they send: ANNOUNCE values per client setting
(range, codec, HDR), input packets per gesture, ENet details. We run the binaries and read our own logs; we never
open their source, disassemble or decompile them.
- Every fact found this way goes into PROTOCOL.md with a measurement tag, the date and the setup.
@@ -489,16 +499,16 @@ when this suite passes on Lumen as it does on Sunshine, and the harness says Lum
---
## 8. Decisions for Mark
## 8. Decisions (Mark, 2026-12-04: all six accepted as proposed)
| # | Question | Proposal |
| # | Question | Decision |
| :-- | :-- | :-- |
| D1 | Lumen needs Windows firewall rules for `lumen-host.exe` on its ports, which needs admin. May the single UAC prompt at "Turn on Play remotely" (today: Sunshine's installer) create them, scoped to that program and the allowed addresses? | Yes; when Sunshine is gone it is the only elevated step left |
| D2 | May lumen-host log what Arena Domi Remote and the official Moonlight PC binary send to it (black-box, no source)? And should OBS Studio and FFmpeg sources join the forbidden list for host work? | Yes to both |
| D3 | Lumen's capture and encode: in DomiCapture (public, shared with Pictor Domi, owned by the Arena build lead's plan) or in Arena's `arena-host` first, moved later? | arena-host first, behind traits; moved to DomiCapture when its owner is ready |
| D4 | Who starts lumen-host at sign-in: the tray agent (always running) or the Arena Domi window? | the tray agent (a seam with the Arena build lead) |
| D5 | Arena Domi Remote: keep the 4-digit code box, or give its workers the grant-based pairing spec so it pairs with no code (the spec then becomes public in a GPL app)? | keep the code box until our own Android client exists |
| D6 | Games that run as administrator get no input from Lumen (no uiAccess, no admin). Accept and tell the user? | Yes |
| D1 | Lumen needs Windows firewall rules for `lumen-host.exe` on its ports, which needs admin | **Yes**: the existing single UAC step at "Turn on Play remotely" also creates Lumen's rules (scoped to `lumen-host.exe`, its ports and the allowed addresses). No new prompt. They stay until uninstall, like Sunshine's |
| D2 | Black-box logging of what clients send to Lumen; OBS Studio and FFmpeg sources | **Yes**: lumen-host may log what Arena Domi Remote and the official Moonlight PC app send to it (run and observe only, never source, disassembly or decompiling). **OBS Studio and FFmpeg source are forbidden for host work** ([CLEAN_ROOM.md](CLEAN_ROOM.md)) |
| D3 | Where capture and encode live | **arena-host first**, behind traits; they **move to DomiCapture at L4** |
| D4 | Who starts lumen-host at sign-in | **The tray agent**, once Lumen is the default engine (stage D). Before that, Arena Domi starts it when Play remotely uses Lumen |
| D5 | Arena Domi Remote: the code box or a no-PIN spec | **Keep the code box.** No grant-based pairing spec is published into the GPL app |
| D6 | Games running as administrator | **Accepted**: they get no input from Lumen, and the client shows a clear message ("This game runs as administrator, so Arena Domi can't control it") |
---