Workspace & deployment
Sync, validate, approve and rollback
Studio copies a live WordPress service into an isolated development workspace. Its state machine blocks editing or deployment when live drift, validation or lifecycle makes the action unsafe.
Workspace flow
Codex task boundary
A task can include the prompt, selected page/visual context, allowed theme or plugin files and temporary attachments. The runner limits filesystem access to the workspace and does not expose Docker socket, live database credentials or production credentials.
After the turn, Studio builds a diff, content manifest and validation report. Used attachments are deleted after the turn; unused uploads expire after 24 hours.
Live drift and synchronization
Studio fingerprints live code/database state. If live WordPress changes materially after the workspace baseline, the state becomes SYNC_REQUIRED. New Codex tasks and deployment are blocked. The UI presents a mandatory Sync live changes action.
Sync refreshes development database/code from live, then reapplies pending Studio changes where safe. It does not deploy to live. Conflicts remain visible and must be resolved before approval.
Validation and approval
Validation checks changed files, allowed paths, syntax/runtime behavior, content operations, activation/migration operations, preview console errors and live conflicts. A deployment plan lists code files, content operations, activations and conflicts.
Approve deploy requires the exact confirmation and an authorized user. The worker:
- rechecks workspace and live baseline;
- creates and verifies a live backup;
- packages allowlisted changes with a manifest/checksum;
- applies code/content operations;
- restores safe ownership;
- runs health checks;
- marks deployed or automatically rolls back.
Rollback and archive
Rollback is a separate explicit job using the verified deployment backup. Its failure is recorded as ROLLBACK_FAILED and requires operator attention.
Delete Studio data or hosting decommission queues ARCHIVE_WORKSPACE. The worker removes workspace copy, uploads, Codex auth/thread state and deployment plans, while preserving only minimal bounded audit metadata. The live WordPress site is not deleted by Studio archive.
Sources: packages/contracts, apps/builder API actions, apps/worker, packages/workspace, packages/deployment and packages/codex-runner.