Skip to content

feat(website): the gateway serves a one-image site and keeps its data plane off the site's route (FD-4683) - #391

Merged
williamloo-scale merged 8 commits into
wloo/web-app-contractfrom
wloo/web-apps-deploy
Nov 3, 2026
Merged

williamloo-scale merged 8 commits into
wloo/web-app-contractfrom
wloo/web-apps-deploy

Conversation

@williamloo-scale

@williamloo-scale williamloo-scale commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

The gateway runs a website whose server image serves its pages as one container: /website/<name>/ and /svc/<name>/ both reach it, and compose checks it at its declared health path. A site's route now never forwards its data plane or env card (/agentenv/…, /.well-known/agent-env.json, however the path is spelled, including an encoded slash beside a dot segment, which the guard reads as the site's server will receive it), so an agent browsing a site can't read what grades it; agentenv still reaches them through /svc/<name>/, as the design's website/v1 contract requires. Sites built on a separate frontend image deploy as before.

Validation: unit suite passes, with tests for the one-image compose and topology, and the reserved paths through the site route versus /svc/, with encoded-slash and dot-segment spellings.

🤖 Generated with Claude Code

RetriggerView in GreptileConfidence Score: 5/5

The PR appears safe to merge; no new actionable defects remain.

Summary

The gateway now serves one-image websites and blocks their data routes and env cards through /website/<name>/, while keeping /svc/<name>/ available to framework calls.

  • A website can serve its pages and APIs from one server image.
  • Site browsing no longer reaches framework-only paths.
  • Tasks can score checks against a website's saved session state.
  • The Notes example now includes its frontend build tools.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart LR
  Browser --> SiteRoute["/website/name/"]
  SiteRoute --> Guard{"Reserved path?"}
  Guard -->|Yes| Refused["404"]
  Guard -->|No| Pages["Frontend image, or server image"]
  Framework --> ServiceRoute["/svc/name/"]
  ServiceRoute --> Server["Server image"]
  Verifier["website_state_verifier"] --> ServiceRoute
Loading

Reviews (13) · Last reviewed commit: "feat(website): build a site's server ima..." · Reviewed by Greptile

@socket-security

socket-security Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

No dependency changes detected. Learn more about Socket for GitHub.

👍 No dependency changes detected in pull request

Comment thread src/agent_env/env/envs/web_apps/env.py Resolved
@williamloo-scale williamloo-scale changed the title feat(web-apps): compose and deploy web_apps envs, each app at <name>.localhost in the browser feat(web-apps): compose and deploy web_apps envs, each app at <name>.localhost in the browser (FD-4683) Oct 29, 2026
@williamloo-scale williamloo-scale changed the title feat(web-apps): compose and deploy web_apps envs, each app at <name>.localhost in the browser (FD-4683) feat(web-app): compose and deploy web_app envs, each website its own container at <name>.localhost (FD-4683) Oct 30, 2026
@williamloo-scale williamloo-scale changed the title feat(web-app): compose and deploy web_app envs, each website its own container at <name>.localhost (FD-4683) feat(website): the gateway serves a one-image site and keeps its data plane off the site's route (FD-4683) Oct 30, 2026
… plane off the site's route (FD-4683)

A website whose server image serves its pages runs as one container: /website/<name>/ and /svc/<name>/ both reach
it, and it's checked at its declared health path. A site's route never forwards its data plane or env card, however
the path is spelled, so an agent browsing the site can't read what grades it; agentenv reaches them through
/svc/<name>/. A site built on a separate frontend image deploys as before.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
# Conflicts:
#	AGENTS.md
#	src/agent_env/env/envs/multi_env.py
#	src/agent_env/env/envs/website.py
Comment thread src/agent_env/env/gateway/gateway.py Resolved
williamloo-scale and others added 6 commits November 2, 2026 14:46
…the site receives is spelled (FD-4683)

The guard checked the decoded path, but the proxy forwards the raw one
and httpx removes its dot segments, so /website/mail/public%2Fx/../agentenv
passed the guard and reached the site as /agentenv. The guard now also
checks the path the site's server receives: the forwarded URL as httpx
normalizes it, decoded.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…s website/v1 ready (FD-4683)

The env card is the protocol layer, so a site's readiness is read from
it, as computer-app/v1's ready is read of an app: once the gateway
serves its card, the deploy reads each site's card through
/svc/<name>/ and polls website/v1's ready until it says so, failing
after 300s naming each site's problems. A site whose card has no ready,
or that serves no card, is read at its stored health path instead,
with a deprecation warning. The compose health check now only says the
server is up: it answers its card, or for a site serving none its
health path.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…D-4683)

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
… isn't reserved, not in a comment (FD-4683)

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
… and verify its state at /go (FD-4683) (#392)

Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@williamloo-scale
williamloo-scale merged commit a8aa4a2 into wloo/web-app-contract Nov 3, 2026
20 of 21 checks passed
@williamloo-scale
williamloo-scale deleted the wloo/web-apps-deploy branch November 3, 2026 18:00
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