Repository navigation
feat(flow): compile_agent runs on Windows, macOS, Linux, RDP and Citrix apps - #1283
Merged
Merged
Conversation
…ix apps jit.SurfaceApp names the app the way a deployment file's backend section does. Recording, canaries and runs open that backend through the same AuthoringSession and CaptureComputer the MCP recording tools use. The canary and every run are bound to <kind>://<target>; window titles stay out of the origin. Missing targets, a Citrix run without a readiness marker and the playwright_mcp dialect off the browser are refused with named reasons. Tests record MockMed through the real RemoteDisplayBackend and CitrixWorkspaceBackend (pixels only, via a page shown as a client window) and check that the standard gate refuses the unqualified pixel canary before any input. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… execution_origin Review fixes for SurfaceApp: - An admission policy names a desktop or remote app with its kind (rdp://10.0.0.5). A bare host names a web app only, so a web entry never covers the RDP desktop on the same address, and vice versa. - Non-web runs keep execution_origin None (hosted validation and the egress evidence read it as a browser origin). Replayer.run takes the surface identity as execution_target_origin for the JIT admission match only, and openadapt-flow run --config passes it, so an admitted JIT desktop program runs from the CLI too. - The origin is lower case and built in surface_selection.surface_target_origin; a Windows agent_url with credentials is refused. - Tests reach app.open and the Replayer for every kind, check the Replayer refuses a program admitted on another surface before any action, and build the pixel backends through the factory. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
abrichr
added a commit
that referenced
this pull request
Oct 18, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 18, 2026
…click The fixture's Approve And Close button calls window.close() in its onclick. Playwright can raise TargetClosedError after delivering that click, which failed flow core unit shard 4 on #1283. The test still requires the popup to have closed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
# Conflicts: # packages/flow/tests/test_multi_surface_selfclose.py
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.
compile_agenttook onlyWebApp(url=...). It now also takesSurfaceApp: a Windows, macOS, Linux, RDP or Citrix app, named the way a deployment file'sbackend:section names it.What changed
jit.SurfaceApp(backend_section, record_reader=, reset=, open_backend=)andSurfaceApp.from_deployment("deploy.yaml").backends.factory.build_backend. The agent drives it through the sameAuthoringSessionandCaptureComputerthe MCP recording tools use.<kind>://<target>, for examplemacos://TextEdit. Window titles stay out of it, because they can carry a patient name. A program admitted on one origin is refused on any other.kind: web("use WebApp(url=...)");rdp_readiness_text, refused before any backend opens;playwright_mcpdialect on a non-browser app.WebAppis unchanged except for anopen()method. The web path runs as before.docs/JIT.md: a "Desktop and remote apps" section. The "Web apps only" limit is replaced.What it does not do yet
On RDP and Citrix, a pixel click carries no verified record identity. So the standard run gate refuses the canary with "Identity coverage: ... UNARMED".
run --profile standardrefuses an unqualified pixel bundle the same way. Arming pixel identity inside the JIT review is a follow-up.Tests
tests/test_jit_surface_app.py(fast, every kind): validation, origin binding (a program admitted on one surface is refused on the web and on another surface), the Citrix readiness refusal, and factory wiring.tests/test_jit_surface_pixels.py: records MockMed through the realRemoteDisplayBackendandCitrixWorkspaceBackend.tests/surface_kioskshows Flow the page only as a client window's pixels. The test checks the draft is bound to the surface, the note is lifted to a parameter, and the save effect is mined. It then checks the canary is refused before any input reaches the window. 2 passed in 23 s.test_jit.pyandtest_jit_lifecycle.pypass (111 tests with the new file).tests/e2e/test_jit_cua_e2e.py(web, not run in CI): 4 passed locally.Part of the backend parity work (#1282).
🤖 Generated with Claude Code
Review fixes (second commit)
rdp://10.0.0.5). A bare host names a web app only, so a web entry no longer covers the RDP desktop on the same address.execution_originempty, because hosted validation and the egress evidence read it as a browser origin.Replayer.runtakes the surface identity asexecution_target_origin, and only the JIT admission match reads it.openadapt-flow run --configpasses it too, so an admitted JIT desktop program now runs from the CLI.agent_urlwith userinfo is refused.app.open()and the Replayer with the right arguments;backend_hints. Replay needs it to bind the same client window, and it lives only inworkflow.json, encrypted when the bundle is sealed. Two Windows VMs behind the same tunnel port share an origin;docs/JIT.mdsays to use one cache directory per environment.