Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
dd8bc90
feat(design): share Desktop overlay and phone theme roles
abrichr Nov 20, 2026
8746f58
fix: preserve raw evidence bytes on Windows
abrichr Nov 20, 2026
bf1e6ea
test: require explicit refusal for unsupported file anchors
abrichr Nov 20, 2026
4291452
test: separate independently released byte contracts
abrichr Nov 20, 2026
a7f78ee
Merge remote-tracking branch 'origin/main' into agent/2303
abrichr Nov 20, 2026
9048b64
test(desktop): share the raw byte descriptor contract
abrichr Nov 20, 2026
1b51bde
fix(desktop): require Capture 1.4 for core recorder imports
abrichr Nov 20, 2026
6c7dc4f
test: sort the shared fixture re-export
abrichr Nov 20, 2026
b2a704f
test: sort the shared fixture re-export
abrichr Nov 20, 2026
13ccea8
Merge remote-tracking branch 'origin/main' into codex/desktop-binary-…
abrichr Nov 20, 2026
bf5e096
chore(desktop): prepare the 0.30.7 release proposal
abrichr Nov 20, 2026
83dd72d
Merge Flow source split and retain Desktop byte consumers
abrichr Nov 20, 2026
c688576
ci(desktop): qualify shared byte model changes in both packages
abrichr Nov 20, 2026
9b35a4a
Merge commit '3f43a04807132b63e187447937893c47ac466451' into codex/de…
abrichr Nov 20, 2026
ab96329
fix(desktop): preserve pinned theme bytes on checkout
abrichr Nov 20, 2026
2bc0ac8
fix(desktop): use native handlers for browser and external URLs
abrichr Nov 20, 2026
83de9ad
merge: preserve accepted main in Desktop candidate preparation
abrichr Nov 20, 2026
3c66065
merge: compose reviewed Desktop native-handler source
abrichr Nov 20, 2026
4499e36
merge: compose reviewed Desktop semantic-theme source
abrichr Nov 20, 2026
abbcc6a
docs(desktop): record reviewed-source candidate preparation
abrichr Nov 20, 2026
b738aff
Merge origin/main into the combined Desktop candidate
abrichr Nov 20, 2026
cdf13dc
release(desktop): 0.31.0
abrichr Nov 20, 2026
8d002e6
build(desktop): pin the frozen engine to openadapt-flow 3.4.0
abrichr Nov 20, 2026
955e2ca
Merge remote-tracking branch 'origin/main' into HEAD
abrichr Nov 21, 2026
cd29ee4
Merge remote-tracking branch 'origin/main' into HEAD
abrichr Nov 21, 2026
c4f9680
Merge remote-tracking branch 'origin/main' into HEAD
abrichr Nov 22, 2026
57bbbbc
build(desktop): lock the frozen engine on openadapt-flow 3.4.0 and op…
abrichr Nov 22, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,15 @@ tests/fixtures/seal_view/** -text
packages/seal-view/test/fixtures/** -text
# Exact upload bytes; Cloud pins this file's SHA-256.
packages/flow/tests/fixtures/public_seal/golden_vectors.json -text

# Preserve the exact upstream license bytes, including prose whitespace.
packages/desktop/src/styles/vendor/semantic-theme/fonts/OFL-*.txt whitespace=-blank-at-eol
packages/desktop/openadapt_desktop/portal/shell/fonts/OFL-*.txt whitespace=-blank-at-eol

# Hash-bound exports must not change when a checkout enables CRLF conversion.
packages/desktop/src/styles/vendor/** -text
packages/desktop/openadapt_desktop/portal/shell/fonts/** -text
# The plain-file theme generator checks these outputs with stable LF endings.
packages/desktop/openadapt_desktop/portal/shell/styles.css text eol=lf
packages/desktop/openadapt_desktop/portal/shell/index.html text eol=lf
packages/desktop/openadapt_desktop/portal/shell/manifest.webmanifest text eol=lf
4 changes: 2 additions & 2 deletions .github/workflows/packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -186,8 +186,8 @@ jobs:
verify="$(hit "^packages/(verify|flow|types)/|$wf")"
capture="$(hit "^packages/capture/|$wf")"
privacy="$(hit "^packages/privacy/|$wf")"
# Desktop bundles the program map from packages/program-graph.
desktop="$(hit "^packages/(desktop|program-graph)/|^\.github/workflows/desktop-[a-z-]+\.yml$|$wf")"
# Desktop bundles the program map and shares the descriptor test model.
desktop="$(hit "^packages/(desktop|program-graph)/|^packages/flow/tests/_binary_descriptor_contract\.py$|^\.github/workflows/desktop-[a-z-]+\.yml$|$wf")"
tray="$(hit "^packages/tray/|$wf")"
# The program map checks its schema against Flow's copy.
program_graph="$(hit "^packages/program-graph/|^packages/flow/schemas/program-graph-v2\.json$|^\.github/workflows/release-program-graph\.yml$|$wf")"
Expand Down
20 changes: 20 additions & 0 deletions packages/desktop/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,26 @@
# CHANGELOG


## v0.31.0 (2026-11-20)

### Features

- **design**: share Desktop overlay and phone theme roles

### Bug Fixes

- **ci**: qualify owned deadlines and pin helper outside subject checkout (#2333)
- **desktop**: use native handlers for browser and external URLs
- **desktop**: preserve pinned theme bytes on checkout
- **desktop**: require Capture 1.4 for core recorder imports
- preserve raw evidence bytes on Windows

### Build

- **engine**: bundle openadapt-flow 3.4.0 (was 2.4.1) and openadapt-privacy 1.1.4; the lock no longer carries mako



## v0.30.6 (2026-11-19)

### Bug Fixes
Expand Down
2 changes: 1 addition & 1 deletion packages/desktop/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ release, never another `openadapt-flow` it finds on your `PATH`, and `doctor`
says which one it found:

```bash
pip install openadapt-desktop "openadapt-flow[browser,console]==2.4.1"
pip install openadapt-desktop "openadapt-flow[browser,console]==3.4.0"
openadapt-desktop doctor
```

Expand Down
2 changes: 1 addition & 1 deletion packages/desktop/RELEASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ document defines the outputs, ordering, and release-selection rules.

## Current Flow runtime

`main` pins the published `openadapt-flow[browser,console]==2.4.1` release.
`main` pins the published `openadapt-flow[browser,console]==3.4.0` release.
That release contains the reviewed `openadapt.push-result/v1` contract and the
governed hosted-runner adapter that Desktop calls for leased work. The lockfile
binds the exact wheel and source archive hashes.
Expand Down
4 changes: 2 additions & 2 deletions packages/desktop/docs/DECISION_PORTAL.md
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,7 @@ the dispatcher, and again in the shell before the plugin is called.
### Packaging: done

The frozen sidecar now carries the console. `pyproject.toml` pins
`openadapt-flow[browser,console]==2.4.1`, `scripts/build_frozen_engine.py`
`openadapt-flow[browser,console]==3.4.0`, `scripts/build_frozen_engine.py`
collects uvicorn's run-time string imports and `openadapt_flow.console`, and
the executable is built unbuffered so the console's one-time capability banner
survives the pipe the portal reads it from. `scripts/smoke_test_frozen_flow.py`
Expand Down Expand Up @@ -467,7 +467,7 @@ sensitive when it derives log redactions. A file like that is not eligible to
sit on disk for the hours a portal session can last.

Re-staging it per run would also be theatre. In the pinned
`openadapt-flow==2.4.1`, `_attended_service_from_args` resolves `--config`
`openadapt-flow==3.4.0`, `_attended_service_from_args` resolves `--config`
eagerly through `load_deployment` **before** it yields, and
`AttendedActionService` is built from the parsed `DeploymentConfig` object and
never sees the path again. Rewriting the file later changes nothing about what
Expand Down
2 changes: 1 addition & 1 deletion packages/desktop/docs/RELEASE_CANDIDATE_INSTALLERS.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ only the fixed `openadapt://connect` action and forwards it to the sidecar's
strict, transactional pairing flow.

The canonical compiler and governed runtime remain in `openadapt-flow`. Each
native installer freezes the exact `openadapt-flow[browser,console]==2.4.1`
native installer freezes the exact `openadapt-flow[browser,console]==3.4.0`
runtime and its `playwright==1.61.0` browser automation dependency into the
Desktop sidecar. The `console` extra is what lets an installed application
serve the attended decision console the mobile decision portal relays; the
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Combined Desktop source preparation

This is a preparation branch off existing draft #2314, not a second release candidate. It preserves normal history for draft `c6885769c008c31b7d77ec9b0a88910414c59815`, accepted main `c005d5d6a7119fee78213e51d4648e0bfd6c29e3`, reviewed handler source #2324 at `2bc0ac83637044f051a252ee281a051fa1499d2f`, and reviewed theme source #2305 at `ab963290ac741ac7888c8200cfa7726371951cca`. Neither original feature branch nor the existing candidate is updated by this preparation.

Both feature merges were clean. Main produced three conflicts: Flow's CLI import, decomposition budgets and byte-contract test. Their resolutions retain the exact accepted-main files, including invocation kwargs, the binary opener, current size budgets and the copilot physical-byte regression. The resulting Flow tree and Desktop release workflow are byte-identical to accepted main. The reviewed handler source and theme vendor/generator files remain byte-identical to their reviewed heads. The candidate's shared descriptor-model CI selector is retained.

## Focused checks

All checks used the shared CPU gate. Existing Python 3.12.7 imports were bound to this checkout's Desktop, Types and Flow source, with source-contract mode, isolated test keys/recorder and a null keyring. This is not a bundled dependency-closure qualification.

- **63 source/static/intercepted cases passed**, zero failures/skips, in 0.70s; zero subprocesses forked pytest. The selection covers byte contracts, intercepted OS-handler URL allow/refuse behavior, static native-route delegation, phone palette/font bytes, generated overlay contracts and version synchronization.
- Node 22 theme-byte check passed for all eight pinned files at `f50e9c149cb868921e4ce414969dc57d44dc975b`; read-only phone generation check passed.
- Candidate version 0.30.7 remains synchronized across project/module/lock; no version or dependency pin was selected here.
- The real release-intent check **refuses** this composition: `version 0.30.7 is smaller than the minor bump these commits need (0.31.0)`. This is an unresolved release input, not a waived or passing check.

No GUI, real OS browser handler, native build, frozen archive, installer, provider or real application operation was used. The old component reviews and older 150 candidate checks remain scoped to their original subjects; they are not a final combined-candidate verdict.

## Inputs still required by the existing candidate policy

1. Select a separately authorized published Flow cut containing the required common-invocation and credential/reader-lifetime fixes. The old exact build pin and `REQUIRED_FLOW_VERSION` remain 2.4.1. This task does not choose or publish a replacement.
2. Choose the combined Desktop cut, at least 0.31.0 for the surviving theme feature, and synchronize all version sources/changelog plus the exact Flow pin, lock, notices, banners and runtime/type/overlay contracts together. Preserve the Capture 1.4 floor and existing platform ABI/license boundaries.
3. Finish the existing producer/visual decisions and final composition review, then the separately authorized frozen-archive/native-installer qualification and explicit release decision. The existing release workflow can publish after a qualifying version-bearing main merge; this prep branch does not authorize that merge or publication.

No per-application engine code was added. One history, byte and dependency/version model composes the reviewed source. Evidence is source/static/synthetic only; no held-out application, bundled runtime or release qualification is claimed.
2 changes: 1 addition & 1 deletion packages/desktop/openadapt_desktop/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@
+-- backends/ Storage backend plugins
"""

__version__ = "0.30.6"
__version__ = "0.31.0"
4 changes: 3 additions & 1 deletion packages/desktop/openadapt_desktop/approval_mode.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@

from pydantic import BaseModel, ConfigDict, Field, ValidationError

from openadapt_desktop.private_fs import open_binary

ENVELOPE_SCHEMA = "openadapt-desktop.approval-mode-switch/v1"
#: Where a switch log goes when a switch-off couldn't be appended to it. Flow's
#: gate reads a missing ``switch.log`` as off.
Expand Down Expand Up @@ -184,7 +186,7 @@ def _write_private_json(path: Path, payload: Mapping[str, Any]) -> None:
data = json.dumps(payload, sort_keys=True, indent=2).encode("utf-8")
# O_BINARY keeps Windows from writing "\r\n" in text mode.
flags = os.O_CREAT | os.O_WRONLY | os.O_TRUNC | getattr(os, "O_BINARY", 0)
descriptor = os.open(temporary, flags, 0o600)
descriptor = open_binary(temporary, flags, 0o600)
try:
os.write(descriptor, data)
os.fsync(descriptor)
Expand Down
10 changes: 6 additions & 4 deletions packages/desktop/openadapt_desktop/approver_anchor.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@
from pathlib import Path
from typing import Iterable, Literal

from openadapt_desktop.private_fs import open_binary

ANCHOR_NAME = "approver-root.json"
#: The largest anchor file read; a root pin is about 100 bytes.
_MAX_BYTES = 4096
Expand Down Expand Up @@ -265,15 +267,15 @@ def _open_folder(directory: Path, trusted_uids: frozenset[int]) -> int:
world-writable, as /tmp is: other users can't replace root's entries."""

flags = os.O_RDONLY | getattr(os, "O_DIRECTORY", 0)
fd = os.open(directory.anchor, flags)
fd = open_binary(directory.anchor, flags)
where = Path(directory.anchor)
parts = directory.parts[1:]
try:
_check_fd(fd, where, trusted_uids, folder=True, sticky_ok=bool(parts))
for index, part in enumerate(parts):
where = where / part
try:
child = os.open(part, flags | getattr(os, "O_NOFOLLOW", 0), dir_fd=fd)
child = open_binary(part, flags | getattr(os, "O_NOFOLLOW", 0), dir_fd=fd)
except OSError as exc:
raise AnchorError(
"approver_anchor_untrusted",
Expand All @@ -293,7 +295,7 @@ def _read_posix(path: Path, trusted_uids: frozenset[int]) -> bytes:
try:
flags = os.O_RDONLY | getattr(os, "O_NOFOLLOW", 0) | getattr(os, "O_NOCTTY", 0)
try:
fd = os.open(path.name, flags, dir_fd=folder)
fd = open_binary(path.name, flags, dir_fd=folder)
except OSError as exc:
raise AnchorError(
"approver_anchor_untrusted", f"Can't open {path} without following links: {exc}"
Expand Down Expand Up @@ -337,7 +339,7 @@ def _write_posix(path: Path, payload: bytes, trusted_uids: frozenset[int]) -> No
try:
temp = f".{ANCHOR_NAME}.{os.getpid()}.tmp"
flags = os.O_WRONLY | os.O_CREAT | os.O_EXCL | getattr(os, "O_NOFOLLOW", 0)
fd = os.open(temp, flags, 0o644, dir_fd=folder_fd)
fd = open_binary(temp, flags, 0o644, dir_fd=folder_fd)
try:
os.fchmod(fd, 0o644)
os.write(fd, payload)
Expand Down
15 changes: 4 additions & 11 deletions packages/desktop/openadapt_desktop/auth/browser_pkce.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@

from loguru import logger

from openadapt_desktop import system_browser
from openadapt_desktop.auth.pairing import (
PAIRING_SECRET_RE,
PairingError,
Expand Down Expand Up @@ -251,10 +252,7 @@ def __init__(

@staticmethod
def _default_open_browser(url: str) -> None:
import webbrowser

if not webbrowser.open(url):
raise RuntimeError("OpenAdapt could not open the system browser.")
system_browser.open_url(url)

def is_available(self) -> bool:
"""False on a headless box, and False without a usable OS keychain.
Expand All @@ -269,13 +267,8 @@ def is_available(self) -> bool:
return False
if not secure_store_available():
return False
if self._uses_system_browser:
import webbrowser

try:
webbrowser.get()
except webbrowser.Error:
return False
if self._uses_system_browser and not system_browser.is_available():
return False
if sys.platform.startswith("linux"):
# No X11 / Wayland display -> no system browser to drive.
return bool(os.environ.get("DISPLAY") or os.environ.get("WAYLAND_DISPLAY"))
Expand Down
3 changes: 2 additions & 1 deletion packages/desktop/openadapt_desktop/authoring_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
)
from openadapt_desktop.auth.store import load_authoring_lease, store_authoring_lease
from openadapt_desktop.config import EngineConfig
from openadapt_desktop.private_fs import open_binary

API_TIMEOUT_S = 10.0
DEFAULT_LEASE_S = 900
Expand Down Expand Up @@ -233,7 +234,7 @@ def replace(self, rows: list[dict[str, Any]]) -> None:
if not os.name == "nt":
os.chmod(self._path.parent, 0o700)
flags = os.O_WRONLY | os.O_CREAT | os.O_TRUNC | getattr(os, "O_NOFOLLOW", 0)
descriptor = os.open(self._path, flags, 0o600)
descriptor = open_binary(self._path, flags, 0o600)
try:
if os.name != "nt":
os.fchmod(descriptor, 0o600)
Expand Down
2 changes: 1 addition & 1 deletion packages/desktop/openadapt_desktop/flow_bridge.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
#: The exact Flow release Desktop is built and tested against. It equals the
#: ``openadapt-flow`` pin in the ``build`` extra of pyproject.toml, which the
#: native installer freezes (tests/test_engine/test_flow_bridge.py checks).
REQUIRED_FLOW_VERSION = "2.4.1"
REQUIRED_FLOW_VERSION = "3.4.0"
#: A developer who runs another Flow (a source checkout, say) names it here.
#: The signed installer ignores it.
FLOW_OVERRIDE_ENV = "OPENADAPT_DESKTOP_FLOW_BIN"
Expand Down
9 changes: 5 additions & 4 deletions packages/desktop/openadapt_desktop/hosted_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
)
from openadapt_desktop.config import EngineConfig
from openadapt_desktop.flow_bridge import HostedRunnerAdapterUnavailableError
from openadapt_desktop.private_fs import open_binary

REGISTER_PATH = "/api/runners/register"
POLL_PATH = "/api/runners/poll"
Expand Down Expand Up @@ -300,7 +301,7 @@ def get(self, dispatch_id: str) -> dict[str, Any] | None:
descriptor = -1
try:
flags = os.O_RDONLY | getattr(os, "O_NOFOLLOW", 0)
descriptor = os.open(path, flags)
descriptor = open_binary(path, flags)
opened = self._opened_metadata(path, descriptor, before)
chunks: list[bytes] = []
remaining = opened.st_size
Expand Down Expand Up @@ -372,7 +373,7 @@ def record(self, dispatch_id: str, phase: str, **fields: Any) -> None:
"runner observation journal changed during the safe write"
)
if not _is_windows():
directory_descriptor = os.open(self._dir, os.O_RDONLY)
directory_descriptor = open_binary(self._dir, os.O_RDONLY)
try:
os.fsync(directory_descriptor)
finally:
Expand Down Expand Up @@ -401,7 +402,7 @@ def clear_temporary(self, dispatch_id: str) -> None:
descriptor = -1
try:
flags = os.O_RDONLY | getattr(os, "O_NOFOLLOW", 0)
descriptor = os.open(path, flags)
descriptor = open_binary(path, flags)
self._opened_metadata(path, descriptor, before)
os.unlink(path)
except RunnerJournalError:
Expand All @@ -414,7 +415,7 @@ def clear_temporary(self, dispatch_id: str) -> None:
if descriptor >= 0:
os.close(descriptor)
if not _is_windows():
directory_descriptor = os.open(self._dir, os.O_RDONLY)
directory_descriptor = open_binary(self._dir, os.O_RDONLY)
try:
os.fsync(directory_descriptor)
finally:
Expand Down
2 changes: 2 additions & 0 deletions packages/desktop/openadapt_desktop/portal/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@
SHELL_ASSETS: dict[str, tuple[str, str]] = {
"/app.js": ("shell/app.js", "application/javascript; charset=utf-8"),
"/styles.css": ("shell/styles.css", "text/css; charset=utf-8"),
"/fonts/PublicSans-Variable.woff2": ("shell/fonts/PublicSans-Variable.woff2", "font/woff2"),
"/fonts/OFL-PublicSans.txt": ("shell/fonts/OFL-PublicSans.txt", "text/plain; charset=utf-8"),
"/manifest.webmanifest": (
"shell/manifest.webmanifest",
"application/manifest+json; charset=utf-8",
Expand Down
Loading
Loading