feat(db): record the agent sign-ins a cloud workspace booted with
What
Adds cloud_workspaces.boot_agent_credential_digest (nullable text), migration 0135. Schema only.
The API will write a keyed digest (HMAC with a server secret) of the creator's agent sign-ins each time a box boots. On wake it compares the digest with the current sign-ins. When they differ, the desktop shows "Agent credentials changed · Restart workspace", because running agents keep the env they started with. The API and desktop changes come in follow-up PRs, merged after this migration is live.
Migration safety
- Production size checked:
cloud_workspacesis 208 kB, ~133 rows (read-only role, 2026-10-01) - No column type change
- No foreign keys, so no lock ordering concern
-
ADD COLUMN ... textwith no default is a catalog-only change; the ACCESS EXCLUSIVE lock is momentary on a small table that isn't hot - Finishes far inside 60 s
- Rehearsed under load: not done. Not needed for a nullable add on a 208 kB table that no job holds open
- No reads move to this column yet
- No tRPC input or output change written in this PR.
cloudWorkspace.listandcreatereturn full rows, so they gain this field automatically. That is an additive, nullable output field, which released clients ignore.
Applied to a Neon branch of production, where it ran end to end with the API and desktop changes on a real cloud box: https://app.superset.sh/page/agent-credentials-restart-banner-wll4rn
Summary by cubic
Adds a nullable text column cloud_workspaces.boot_agent_credential_digest via migration 0135. It stores a keyed digest of the creator's agent sign-ins at the box's last boot, so a later API change can detect on wake that credentials changed and prompt a restart. Schema only; API and desktop changes land in follow-up PRs.
Migration
cloud_workspacesis ~133 rows / 208 kB; the add is catalog-only with a momentary lock and no foreign keys.- The column is unwritten and unread until follow-ups land; the additive nullable output field is ignored by released clients.
Summary by CodeRabbit
- New Features
- Cloud workspace records now include a credential digest associated with agent sign-ins at startup. This adds a stored value for boot-time sign-in information; no changes to the workspace experience are noted.