Repository navigation
fix(env): a snapshot reload edits the deployed compose file and restarts every service, the browser included - #404
Conversation
…rts every service, the browser included The reload re-rendered the compose file from the current config, so a change of default browser between deploy and reload would rename the running browser, and it recreated only the MCP servers, gateway, pgweb and db-mcp, leaving the websites and the browser on containers from before the database swap. It now changes only the servicedb's image and init-script mount in the file the deploy wrote, and recreates every service but servicedb. Fixes FD-4655. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
safe_load follows YAML 1.1, so a service named on, 123 or null came back as True, an int or None: shlex.quote raised, or quoted None as an empty name, after the database had already been swapped. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
|
🤖 Automated Claude routine — Env Pod PR Context Review. This is a bot, not Edgar Arakelyan; not a human review. Context from outside this diff: another open PR rewrites the same block this one deletes.
So the two changes overlap and only one survives the merge. Worth noting for whoever lands second: reading the deployed compose in place already covers the one-image case (website services are never re-rendered), so the Generated by Claude Code |
What and why
Loading a universe from a snapshot swaps a multi env's database for the snapshot's. Until now the reload:
website-browsertoplaywright-mcp, would write a gateway and browser that don't match the running deploy.Now the reload reads the compose file the deploy wrote and points its servicedb at the snapshot image. It also drops the schema init script, which a snapshot doesn't need, and changes nothing else in the file. Then it recreates every service in the file except servicedb.
snapshot_compose(compose, db_image)makes the edit. It refuses a file that doesn't name the servicedb's image exactly once, and an image reference that isn't valid.Fixes FD-4655.
How it was tested
website-browserorbrowseruse-mcp, whatever the config's default, and that every service but servicedb is recreated, the browser included.test_the_event_pipe_is_not_left_open_in_the_server, reads/proc/self/fd, which macOS doesn't have.multi-slack-emailloadingtest-universev198 from its stored snapshot (env-snapshot-multi-slack-emailv48)psi-stayncook-multi(an MCP server, a website, the browser), reloaded from a snapshot of its own databasestayncook-website-backend,stayncook-website-frontendandwebsite-browserkept their old containersMain and this branch agree on everything else:
multi-slack-emailhad 100 email and 120 slack rows, andlist_emailsreturned the universe's mail.psi-stayncook-multiruns, a marker table was made before the snapshot was taken and dropped from the live database afterwards. It came back after the reload.The
psi-stayncook-multisnapshot was never stored. The run builds the image on the VM the way a snapshot bake does, without the upload, and hands it to_load_from_snapshot, so the store got only the deploys' own records. All deploys were torn down.🤖 Generated with Claude Code


Confidence Score: 5/5
The PR appears safe to merge; the service-name failure is fixed and no new actionable issues were found.Summary
Snapshot reloads keep the deployed compose file, replace the database image, and recreate every other service, including the browser.
Diagram
%%{init: {'theme': 'neutral'}}%% flowchart LR A[Read deployed compose file] --> B[Replace database image and remove init mount] B --> C[Recreate database and wait for health] C --> D[Read service names as strings] D --> E[Recreate every other service] E --> F[Wait for gateway and restore change tracking]Reviews (2) · Last reviewed commit: "fix(env): read the reload's service name..." · Reviewed by Greptile