Repository navigation
feat(website): a third-party app wrapped as a site, with ForwardingSite (M8.34, M8.35) - #656
Merged
earakely-scale merged 6 commits intoNov 13, 2026
Conversation
…te (M8.34, M8.35) - ForwardingSite answers the card, data/get alone and website/v1 itself and forwards every other request to the app beside it, as it came: no hop-by-hop or dropped headers, none of its own; the answer streamed back still encoded, redirects unfollowed, and a cookie the app ties to one of the site's names host-only. Ready once the app answers ready_path below 500; a WebSocket is refused (1011). - @website(builtin_routes=False, clock="real"): no built-in site routes; a site that keeps real time serves no clock/v1 and stamps no X-Universe-Now. - Conformance skips the clock checks for a real clock, passes a data plane of data/get alone, and passes any_host for / redirecting to one of the card's domains. - browser_sign_in sets a session cookie on its own path: a URL alone put a cookie on /admin at /, beside the site's. - passthrough.passed_on shared by the computer's /svc route and the forwarder; names_host shared by the browser and conformance. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…go on with another's request Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ts app - ask_app(path, method, headers, content, timeout) asks the app as the site does, under its first name as Host, through the forwarder's client; the ready check and the test fixture's session use it, so a site class no longer reaches into fallback_app().client. - The forwarder is a cached property; the site's exact names are computed once. - UNIVERSE_CLOCK/REAL_CLOCK live in readiness.py beside WEBSITE_CLOCK_PARAM; conformance compares with REAL_CLOCK. - Conformance: the clock skip is one rule over CLOCK_CHECKS, and the data plane's data/get-alone case is a set comparison sharing the data plane's URL setup. - route_path is public (forwarding.py used the private name); docstrings rewrapped. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…he browser's network log A ForwardingSite's card names its dropped_headers as the site's sign_in_headers (WEBSITE_SIGN_IN_HEADERS_PARAM). Site routing carries them from each site's card to the site proxy's config, whose network log already takes their values out, so a browser request carrying the auto-login header shows in network.har as <removed>. The computer's env_params sites take sign_in_headers too. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…nfig it serves from Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…t of a site's served fields - ForwardingSite.dropped_headers is sign_in_headers, the name its card gives them: only the site's own calls send them, the forwarder drops them from every browser's request, and the network log takes their values out. - The site proxy names a site's served fields once (SERVED_SITE_FIELDS, PRIVATE_SITE_FIELDS); install and Config.load both read the list, and a test fails if proxy_config writes a field neither names or the proxy's Site takes one install doesn't serve. - ask_app and the forwarder build the app's URL with one helper, Forwarder.url. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
earakely-scale
deleted the
edgararakelyan/fd-4983-m835-the-shared-third-party-site
branch
November 13, 2026 17:55
andrewpark-scaleai
added a commit
that referenced
this pull request
Nov 13, 2026
… own browser_computer_test.py took 1035s on main (run 43464622905), and shard 4 of the slow tier, which ran it, took 1142s of the workflow's 1160s. A file's tests run on one worker of one shard, so the file set the tier's time. The ten tests of its multi-env sections (browser_envs, a site reached by its names through the gateway, and a site wrapping an app) move unchanged to browser_multi_env_test.py. Nine of them took 461s in that run; the tenth came later in #656. The 30 that stay took 574s. The new file imports its helpers from browser_computer_test.py, as browser_gateway_test.py does, and deploys the module-scoped browser_computer fixture once more. _browser_op stays in browser_computer_test.py, since a browser recording test there uses it too.
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.
Implements M8.34 (FD-4982) and M8.35 (FD-4983). Design note: WAV Slice: Shopping Admin.
What
A website env can now wrap a third-party web app it didn't write, such as WebArena-Verified's Magento admin, and agentenv deploys it like any site (M8.34, M8.35). This is the framework half of the WebArena-Verified shopping admin slice; the bundle (image, tasks, grader) goes in agentenv-benchmarks.
ForwardingSite(agentenv_protocol.website), aWebsiteEnvironmentthat runs beside the app in its container:website/v1itself, and forwards every other request toupstream.Hostthe browser named and its body, streamed. The forwarder's client keeps no cookies, so one browser's cookies never go on with another's request.sign_in_headersstay behind, and the forwarder adds no header of its own.Domain) comes back host-only, as agentenv sets a sign-in's cookies. A sign-in then replaces the app's session cookie instead of sitting beside it.upstream_unavailable). A WebSocket is refused with close code 1011.ready_pathbelow 500, asked with the site's first name asHost.@session_stateof its own. Itssign_in_headerslist keeps a sign-in header to the site's own request.sign_in_headerstoo. agentenv carries them from the card to the site proxy, whose network log already takes their values out, so a browser request carrying the auto-login header shows innetwork.harwith<removed>(M8.20's D6 hook, filled).ask_app(path, method=..., headers=..., content=...)is how a site class calls its app. It asks under the site's first name asHost, through the forwarder's client, which keeps no cookie and follows no redirect. The ready check and the session use it, so a site class never reaches into the forwarder.@websiteswitches, for any site:builtin_routes=Falseserves none of agentenv's site routes, so/api/sessionreaches the app.clock="real"declares a site that keeps real time. It serves noclock/v1, stamps noX-Universe-Now, and its params sayclock: "real".@websiterefuses it together withclock_patch.data/getalone oncedata/getanswers.any_hostalso passes a/that redirects to one of the card's owndomains, as a fixed-base-URL app does.agentenv_protocol.passthrough: the hop-by-hop header filter, now shared by the computer's/svcroute and the forwarder.names_host: the wildcard-domain matcher moves towebsite/readiness.py, shared by the browser and conformance.SERVED_SITE_FIELDSandPRIVATE_SITE_FIELDS), whichinstall()andConfig.loadboth read. A test fails ifproxy_configwrites a field neither list names, or if the proxy'sSitetakes one thatinstall()doesn't serve.browser_sign_in: a session cookie on a sub-path is now set on that path. For an exact name, sign-in used to fold the path into the cookie's URL and leave the path out, and Chrome gives such a cookie its URL's default path,/for/admin. The site's own cookie on/adminwas then sent first, and the browser stayed signed out.Decided while building (for review)
These are in the design note's "Decided while building" and "Found on the VM" sections:
data/getalone, which exports nothing. agentenv already passes over a site whose card serves nodata/reset. M8.35 saiddata/resetwould answer that it can't reset; this way needs no new error.ready_pathbelow 500, so an app that is still booting holds the deploy. A site adds its own@ready_checkfor more; the WebArena-Verified one waits until Magento names the site.any_hostpasses a redirect to the site's own name (Edgar chose this on review). A forwarder that rewritesHost, and leaving the check failing, were left out.admincookie withDomain=shopping-admin.localhost. Sign-in's host-onlyadmincookie then sat beside it, and chromium sent the older one first, so the browser wasn't signed in.@session_statecookies, and tasks opening the start tab only after sign-in.Tests
tests/test_website_forwarding.py(new, 17 tests): forwarding, bodies, encodings, methods, the card and data plane, the session, the 502, readiness, the forwarded prefix, the WebSocket refusal, the real clock, conformance, the switches, and no headers of the forwarder's own.test_website_conformance.pycovers theany_hostredirect cases.browser_computer_test.py):tst/data/forwarding_website, a small app behind aForwardingSitenamedshop.localhost.browser_sign_insigns it in through the site's header, and the start tab loads again signed in. The app sees the site's ownHostand path and never the header, andnetwork.harhas the app's pages.PHPSESSIDtied to the made-up Host's own domain.admincookie, anddata/getexports nothing.wav_shop_vm_test.py, a VM-only harness, not committed):browser_sign_intakes 2.5 s, after which the tab reloads on "Dashboard / Magento Admin" with oneadmincookie on/admin.fetchwith the auto-login header and no cookies gets the sign-in form.network.harhas the admin pages.browser_computer_test.py: 36 passed, 1 skipped. The skipped WebArena-Verified HAR test passed in a later run.website_browser_test.py: 4 passed.multi_env_computers_test.py: 4 passed.browser_gateway_test.py: 3 passed.gateway_test.py: 30 passed, 816 skipped.website_browser_test.py, all passed.tst/unit/envandtst/unit/task_steppass. Onetest_disk_recipeWindows test fails on macOS, onmaintoo.🤖 Generated with Claude Code


Confidence Score: 5/5
The PR appears safe to merge; no blocking issue remains.Summary
Adds
ForwardingSiteso a website environment can wrap a third-party app.Diagram
%%{init: {'theme': 'neutral'}}%% flowchart LR Browser --> Proxy[Site proxy] Proxy --> Site[ForwardingSite] Site -->|Page requests without sign-in headers| App[Third-party app] Framework -->|Card, readiness, session, data| Site Site -->|ask_app for readiness and sign-in| App Proxy -->|Sign-in header values removed| HAR[Network records]Reviews (6) · Last reviewed commit: "refactor(website): one name for a site's..." · Reviewed by Greptile