Skip to content

fix: forward all engine options through openadapt flow record#1028

Merged
abrichr merged 1 commit into
mainfrom
fix/flow-record-backend-passthrough
Jul 19, 2026
Merged

fix: forward all engine options through openadapt flow record#1028
abrichr merged 1 commit into
mainfrom
fix/flow-record-backend-passthrough

Conversation

@abrichr

@abrichr abrichr commented Jul 19, 2026

Copy link
Copy Markdown
Member

Problem

The launcher's click wrapper for openadapt flow record enumerated only the web-era options, so openadapt flow record --backend windows failed with No such option: --backend even though the engine (openadapt-flow >= 1.17, verified against 1.17.2) supports --backend {web,windows,macos,linux,rdp}. Sibling verbs (run, push, teach, ...) already forward generically and were unaffected.

Engine record options the wrapper hid:

  • --backend {web,windows,macos,linux,rdp}
  • --agent-url (windows / WAA agent)
  • --macos-app, --macos-window-title
  • --linux-app, --linux-window-title, --linux-allow-physical-input
  • --rdp-host
  • --task

The wrapper also forced --url, which the engine only requires for --backend web — desktop backends were unreachable even in principle.

Fix

Convert record to the existing _FlowPassthroughGroup generic delegation (same mechanism as run/push): all arguments forward verbatim to openadapt-flow record, openadapt flow record --help renders the engine's real help, and future engine options never need a launcher release. Existing web invocations (--url/--out/--secret/--param/--headless) forward byte-for-byte unchanged (regression-tested).

Behavioral deltas, all intentional:

  • --backend and the desktop-backend options above now work.
  • Missing/invalid options are diagnosed by the engine's parser (which knows --url is web-only) instead of a stale launcher copy.
  • record still appears in openadapt flow --help with an updated one-line summary.

Verification

  • Fresh venv, pip install -e ".[dev]" with real openadapt-flow 1.17.2 from PyPI: openadapt flow record --backend windows --url x --out y now reaches the engine's parser and enters the desktop-record path (halts only on the missing optional openadapt-capture extra, as standalone openadapt-flow does).
  • pytest tests/: 34 passed, 6 skipped (openadapt-ml seam tests; they run in CI). Adds 3 regression tests: backend-option forwarding, verbatim web invocation, engine-help rendering.
  • ruff check + ruff format --check clean.

🤖 Generated with Claude Code

The explicit click wrapper for `openadapt flow record` enumerated only
the web-era options (--url/--out/--secret/--param/--headless), so
`openadapt flow record --backend windows` failed with "No such option"
even though the engine (openadapt-flow >=1.17) records web, windows,
macos, linux, and rdp. It also forced --url, which the engine only
requires for --backend web.

Convert record to the same generic passthrough used by run/push/teach:
every engine option (--backend, --agent-url, --macos-app,
--macos-window-title, --linux-app, --linux-window-title,
--linux-allow-physical-input, --rdp-host, --task, ...) now forwards
verbatim, --help renders the engine's real help, and future engine
options need no launcher release. Existing web invocations forward
byte-for-byte unchanged.

Adds regression tests for backend-option forwarding, verbatim web
invocation, and engine-help rendering.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@abrichr
abrichr merged commit 40d37a0 into main Jul 19, 2026
6 checks passed
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