Spec 13.3: web workspaces, as designed before they are built (refs #69) 00cec4e18792
- Author
- Andy McCall @andymccall <[email protected]>
- When
- · 2026-10-01 01:40 UTC
- Signature
- ✔ signed by Andy McCall
- Hash
00cec4e1879288531221ce92ede9b1b1516fd13f20ae0121b803f98a14d7b1bf- Depends on
- 93be9ce4653e
- Depended on by
- 5ea4872f23e8
- In bookmarks
- api-unknown-fields cancel-landed-runs clear-waiting close-proposal-140 diffusion-pin-bookmark draft-ready image-check job-waits main oh-comment-body-file proposal-list-fast run-one-job wiki-says-so
- In tags
- v0.2.0 v0.3.0 v0.3.1 v0.4.0 v0.4.1 v0.4.2 v0.5.0 v0.5.1 v0.5.2 v0.6.0 v0.6.1 v0.7.0 v0.8.0 v0.9.0 v0.9.1 v0.9.11 v0.9.15 v0.9.16 v0.9.19 v0.9.2 v0.9.20 v0.9.21 v0.9.22 v0.9.23 v0.9.24 v0.9.3 v0.9.4 v0.9.5 v0.9.6 v0.9.7 v0.9.8 v0.9.9
- Edits
- 1 atom, 0 tree operations, 1 file
Browse the tree at this change
modified docs/spec.md +12 −0
| … | 392 unchanged lines |
||
| 393 | 393 | 9. **No implicit shell.** Each step declares its program and arguments; a `sh` step is explicit about the shell and `set -eu` is on by default. |
|
| 394 | 394 | 10. **Runners are cattle.** A runner registers with a token, claims jobs over a long-poll API, runs each in a fresh container or VM, and reports; no state survives a job. Runner groups and labels select where jobs run. |
|
| 395 | 395 | ||
| 396 | + | ### 13.3 Web workspaces (planned) |
|
| 397 | + | ||
| 398 | + | **Open in Workspace** gives a signed-in user VS Code in the browser on a state of a repository, with Oxygen VCS inside, without cloning anything to their own machine. It is designed here before it is built (Oxygen backlog P5); parts are marked as they land. |
|
| 399 | + | ||
| 400 | + | - **What runs.** openvscode-server (MIT, unmodified) with the Oxygen VCS extension and `oxy`, in a Firecracker microVM per workspace on an OxygenFlow runner (a `workspace` job kind beside pipeline jobs), never on the hub's host. The image is a Flow rootfs like the build images, pinned by hash. A fork of VS Code is considered only if an extension cannot do what is needed. |
|
| 401 | + | - **Starting.** The button is on a bookmark's row and on a change page, for accounts that may read the repository. The hub records a workspace (account, repository, state, bookmark when opened from one, status) and queues a workspace job that only a runner whose scope covers the repository may claim (§13.2 scopes). One account has at most a few workspaces at once; the hub says which are open. |
|
| 402 | + | - **Files without a checkout.** The state is mounted read-only in the microVM by **flow-casfs** (OxygenFlow spec §5.1): the tree from the state index, each file's bytes from a cache of renderings keyed by graph key, rendered on first read and shared by every state in which that file has the same history. An overlay on the job's ephemeral disk holds edits. Opening a workspace on the Linux tree therefore costs listing a tree, not writing 96 000 files; the mount is to take under 100 ms. |
|
| 403 | + | - **History and commits.** The microVM's `oxy` repository fetches the state's history over the wire protocol with a token that reads this repository only, as job tokens do, and its working copy is the mount. Private keys never enter the hub or the microVM, so a commit is pushed to a workspace bookmark (`ws/{account}/{id}`) and signed there by the hub as the account's delegate, exactly as web edits are (refused with instructions until the account has delegated). From the bookmark the user proposes or lands as usual. |
|
| 404 | + | - **Access.** The hub proxies the editor (HTTPS and WebSocket) at `/{owner}/{name}/workspace/{id}/` to the workspace's owner only, checking the session on every request; the runner reaches the hub over a connection it opens itself, so runners behind NAT work, and accepts editor traffic for a workspace only from the hub with that workspace's secret. Nothing in a workspace is reachable from any other account, or from the network directly. |
|
| 405 | + | - **Lifecycle.** A workspace stops after 30 minutes without a connection (configurable) and on request. Its overlay is discarded when it stops: anything not pushed to its workspace bookmark is gone, and the editor says so before stopping. A stopped workspace reopens from its bookmark. The audit log records starts, stops and pushes. |
|
| 406 | + | - **Measured** when built: mount time, microVM boot, time to the editor's first paint, and a full read of the Linux tree through the mount. |
|
| 407 | + | ||
| 396 | 408 | ## 14. Git interoperability |
|
| 397 | 409 | ||
| 398 | 410 | A repository may enable a **Git mirror**: on every landing on selected bookmarks the hub runs `oxy git export` into `<data>/mirrors/<owner>/<name>.git` and serves it read-only over Git's smart HTTP protocol at `/{owner}/{name}.git` (implemented with the `git` binary's `http-backend` behind the hub's authorization, since reimplementing pack negotiation is not the product). This lets GitHub Actions runners, IDEs and tooling that only speak Git read hosted Oxygen repositories. Pushing to a mirror is refused with a message pointing at `oxy`. |
|
| … | 144 unchanged lines |