Repository navigation
feat(website): live sites, browser/v1 sign-in and WARC replay (FD-4683) - #447
williamloo-scale wants to merge 3 commits into
Conversation
f542d14 to
8cc706b
Compare
cb672e5 to
306587d
Compare
8cc706b to
7e5b297
Compare
306587d to
2b782e9
Compare
7e5b297 to
9a073e2
Compare
2b782e9 to
0d613b8
Compare
…(FD-4683) This PR's change, rebased as one commit onto #447. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…(FD-4683) This PR's change, rebased as one commit onto #447. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
0d613b8 to
9495ed2
Compare
9a073e2 to
543d2b2
Compare
543d2b2 to
c6770ea
Compare
9495ed2 to
25dcf9a
Compare
c2bd2fb to
f7c679d
Compare
c6770ea to
9c3251f
Compare
9c3251f to
8ce884c
Compare
f7c679d to
571c04b
Compare
687d166 to
6f3fcdb
Compare
04d3f23 to
956163f
Compare
|
Website settings: suggest following the computer-app model This PR makes a website env's Computer apps already have a settings model for the same job (
Suggest websites do the same, implemented in the website package (no imports from
For the rebase: #428 now validates |
7c67185 to
a83217c
Compare
46566a5 to
a3eeb6d
Compare
A live site, @website(domains=[...], live=True, allow_hosts=[...]), serves only the data plane and its card, and its @session method's storage state comes back from website/v1's session in browser/v1's cookies/set and local_storage/set shapes. sign_in_browser hands each live site's session to the browser (cookies/delete, cookies/set, local_storage/set) and reset_env signs in again; a deploy with a live site is marked not reproducible. The Playwright MCP browser serves browser/v1's cookies/set and cookies/delete. A website env's settings are its container's environment variables, secrets as references. ReplayWebsite serves a WARC capture, with @api routes on top whose state the site keeps itself. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…need one named, and a plain @session runs off the loop (FD-4683) Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
a3eeb6d to
e83a709
Compare
… a loaded capture off the loop (FD-4683) Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
| if params.get("live") is True: | ||
| named.add(service) | ||
| continue |
There was a problem hiding this comment.
When a run deploys only live websites, this filter makes deployed_sites() return an empty list. ComputerEnv.run_env_params() treats that as no websites having been deployed and raises, so a computer using site_routing=True cannot deploy.
Allow a live-only result to proceed without synthetic routes, while still rejecting runs that deployed no websites.
Prompt To Fix With AI
This is a comment left during a code review.
Path: src/agent_env/env/envs/computer/utils/sites.py
Line: 447-449
Comment:
**Live-only runs cannot start**
When a run deploys only live websites, this filter makes `deployed_sites()` return an empty list. `ComputerEnv.run_env_params()` treats that as no websites having been deployed and raises, so a computer using `site_routing=True` cannot deploy.
Allow a live-only result to proceed without synthetic routes, while still rejecting runs that deployed no websites.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.|
Closing this PR. We're taking over the website stack, and this branch was written against main as it stood on Nov 3. Each part is now superseded, or planned elsewhere:
The branch stays for reference, at head 46566a5. |
Stacked on #446.
Live and replayed websites, on main's website SDK and browser/v1 (no website.toml: a site's env.toml declares it, and its card says it is live).
@website(domains=[...], live=True, allow_hosts=[...])declares a real site: its server serves only the data plane and the card (which advertiseslive,allow_hostsandsigns_in, and whosereadysays whether its account works).@sessionreturns the storage state a browser adds to start signed in, in browser/v1'scookies/setandlocal_storage/setshapes, a cookie without a url or domain given the site's first domain;self.setting(name)reads a credential the deploy passes. A synthetic site may override its signed session cookie the same way. A computer's site routing never routes a live site, which the browser reaches at its real domains.sign_in_browserstep. Calls each live site's website/v1sessionand hands it to a browser child that serves browser/v1cookies/set(main'sWebsiteBrowserEnvironmentdoes): the site's old cookies go throughcookies/deletewhen served, thencookies/set, thenlocal_storage/set(refused on a browser without it); with two browsers,browsermust name one.reset_envsigns in again. A deploy with a live site is markedreproducible=Falsewith itslive_websites, checked against the computer's allowlist. Records and errors never repeat a value.cookies/setandcookies/deletein the website browser's shapes, writing its storage state file and, through DevTools, any running context.settings(env.toml or stored) are its container's environment variables. A secret-looking setting must be asecret:/env:reference, resolved only into the compose file, which is logged masked. The gateway's own variables can't be set.python -m agentenv_protocol.website.replay capture URL...writes WARC 1.1;ReplayWebsiteserves a capture for any host, with@apiroutes taking precedence, whose state the subclass keeps itself (add_site_data,reset_site_data, its own@get_data); adata/addWARC part replaces the capture untildata/reset. Example inexamples/website/replay/.Before merging
website.sessionis now the decorator, which shadows the module.website.replay.Test
CLI, config, bundle, env, task, task step, env provider and protocol suites: 8,110 passed. Two
test_disk_recipetests fail and the rubrics non-finite-scores module can't importhypothesis, as on main on this machine.🤖 Generated with Claude Code
Fix the live-only computer deployment failure before merging.
Fix with agent prompt
Summary
The latest changes keep live websites out of synthetic routing and move WARC parsing into a worker thread.
Reviews (21) · Last reviewed commit: "fix(website): a computer never routes a ..." · Reviewed by Greptile