Skip to content

feat(website): a session cookie per site, the clock's rate, conformance levels and models= (FD-4683) - #444

Open
williamloo-scale wants to merge 6 commits into
wloo/website-gateway-authfrom
wloo/website-sdk-followups
Open

williamloo-scale wants to merge 6 commits into
wloo/website-gateway-authfrom
wloo/website-sdk-followups

Conversation

@williamloo-scale

@williamloo-scale williamloo-scale commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

Stacked on #443.

Website SDK follow-ups.

  • Session cookie per site. agentenv_session_<name>, named on the card, so two sites under one gateway host don't overwrite each other's. The shared agentenv_session is still read for one release.
  • Clock rate. /clock/time also answers virtual_seconds_per_real_second, which UniverseClock follows instead of inferring it.
  • Conformance: required vs recommended. Only what website/v1 requires of any server fails a run: any host, health, no page at the reserved paths (new), the data-plane round trip. The card's details, X-Universe-Now, clock, forwarded headers and cookies warn; --strict fails on a warning.
  • @website(models=...). An object with load/export/reset, or SQLAlchemy models. With models the site gets self.db on DATABASE_URL, and the data plane reads those tables, so the GUI and the MCP tools share rows.

Before merging

models= adds an optional db extra (sqlalchemy>=2.0), included in dev, and updates uv.lock. SQLAlchemy is imported only when a site uses models.

Test

Unit suite: 12,625 passed; the models= tests (6) also pass with SQLAlchemy installed.

🤖 Generated with Claude Code

RetriggerView in GreptileConfidence Score: 5/5

The PR appears safe to merge with the warning-handling fix from PR #446.

Summary

Adds per-site cookies, explicit clock rates, required and recommended conformance checks, and database-backed sites through models=.

  • Website pages and data tools can share rows in a site’s database.
  • The conformance checker separates required checks from recommended ones.
  • Each website uses its own session cookie name.
  • Website clocks follow the rate reported by the gateway.

Reviews (16) · Last reviewed commit: "fix(website): a models= site orders a se..." · Reviewed by Greptile

@williamloo-scale williamloo-scale changed the title website: per-site session cookie, /go?sid=, clock rate, conformance levels, models= (FD-4683) feat(website): a session cookie per site, /go?sid=, the clock's rate, conformance levels and models= (FD-4683) Nov 3, 2026
@williamloo-scale
williamloo-scale marked this pull request as ready for review November 3, 2026 00:24
@williamloo-scale
williamloo-scale requested a review from a team as a code owner November 3, 2026 00:24
@socket-security

socket-security Bot commented Nov 3, 2026 •

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addedpypi/​psycopg@​3.3.710010010010070

View full report

@williamloo-scale
williamloo-scale force-pushed the wloo/website-gateway-auth branch from 8dcebd1 to 4c1fcc1 Compare November 3, 2026 21:50
@williamloo-scale
williamloo-scale force-pushed the wloo/website-sdk-followups branch from 8090f3e to 2d64812 Compare November 3, 2026 21:50
@williamloo-scale
williamloo-scale force-pushed the wloo/website-gateway-auth branch from 4c1fcc1 to 22947c3 Compare November 3, 2026 22:52
@williamloo-scale
williamloo-scale force-pushed the wloo/website-sdk-followups branch 2 times, most recently from 0ef31b9 to 615d6a0 Compare November 3, 2026 23:47
@williamloo-scale
williamloo-scale force-pushed the wloo/website-gateway-auth branch from 22947c3 to 253eaec Compare November 3, 2026 23:47
@williamloo-scale
williamloo-scale force-pushed the wloo/website-sdk-followups branch from 718dbb1 to 65a1c8e Compare November 4, 2026 03:37
@williamloo-scale
williamloo-scale force-pushed the wloo/website-gateway-auth branch from 253eaec to 18b1b98 Compare November 4, 2026 03:37
@williamloo-scale
williamloo-scale force-pushed the wloo/website-gateway-auth branch from 18b1b98 to d95702e Compare November 4, 2026 03:56
@williamloo-scale
williamloo-scale force-pushed the wloo/website-sdk-followups branch from 65a1c8e to 0f672be Compare November 4, 2026 03:56
@williamloo-scale williamloo-scale changed the title feat(website): a session cookie per site, /go?sid=, the clock's rate, conformance levels and models= (FD-4683) feat(website): a session cookie per site, the clock's rate, conformance levels and models= (FD-4683) Nov 4, 2026
williamloo-scale and others added 3 commits November 3, 2026 20:06
… conformance levels and models= (FD-4683)

This PR's change, rebased as one commit onto #443.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
… so its own export loads back (FD-4683)

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…rents first, so its export loads back (FD-4683)

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
williamloo-scale and others added 2 commits November 3, 2026 20:06
…dels= sites; data/get alone (FD-4683)

- The store keeps no sessions: no `?sid=`, no `agentenv_sid_<name>` cookie, no `changed_sessions`; `self.store` is the
  site's one store, which the data plane loads, exports and resets.
- A models= site keeps no initial state and no diff; its data plane is its database's.
- Conformance runs the round trip with no skip for changed state or sessions.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…hole and restores enum columns as their members (FD-4683)

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@williamloo-scale
williamloo-scale force-pushed the wloo/website-gateway-auth branch from d95702e to 8389f76 Compare November 4, 2026 04:40
@williamloo-scale
williamloo-scale force-pushed the wloo/website-sdk-followups branch from 0f672be to 3184f79 Compare November 4, 2026 04:40
…ength parents first, without recursing (FD-4683)

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

This branch has not been deployed

No deployments
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