fix: forward all engine options through openadapt flow record#1028
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The launcher's click wrapper for
openadapt flow recordenumerated only the web-era options, soopenadapt flow record --backend windowsfailed withNo such option: --backendeven 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
recordoptions 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--taskThe wrapper also forced
--url, which the engine only requires for--backend web— desktop backends were unreachable even in principle.Fix
Convert
recordto the existing_FlowPassthroughGroupgeneric delegation (same mechanism asrun/push): all arguments forward verbatim toopenadapt-flow record,openadapt flow record --helprenders 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:
--backendand the desktop-backend options above now work.--urlis web-only) instead of a stale launcher copy.recordstill appears inopenadapt flow --helpwith an updated one-line summary.Verification
pip install -e ".[dev]"with realopenadapt-flow1.17.2 from PyPI:openadapt flow record --backend windows --url x --out ynow reaches the engine's parser and enters the desktop-record path (halts only on the missing optionalopenadapt-captureextra, as standaloneopenadapt-flowdoes).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 --checkclean.🤖 Generated with Claude Code