PRD 0040: backend-aware resume and dashboard reattach #143

Merged
didericis merged 4 commits from prd-0040-backend-aware-resume-and-dashboard into main 2026-06-02 11:23:08 -04:00
Collaborator

Closes #137.

PRD: https://gitea.dideric.is/didericis/bot-bottle/src/branch/prd-0040-backend-aware-resume-and-dashboard/docs/prds/0040-backend-aware-resume-and-dashboard.md

Summary

  • Add backend field to BottleMetadata, written at creation time for both Docker and smolmachines
  • Thread the persisted backend name through cli resume so the correct bottle type is constructed without env overrides
  • Fix _bottle_for_slug in dashboard to construct smolmachines bottles rather than defaulting to Docker

Changes (1 commit)

  • docs/prds/0040-backend-aware-resume-and-dashboard.md — add PRD 0040 (Draft)
Closes #137. PRD: https://gitea.dideric.is/didericis/bot-bottle/src/branch/prd-0040-backend-aware-resume-and-dashboard/docs/prds/0040-backend-aware-resume-and-dashboard.md ## Summary - Add `backend` field to `BottleMetadata`, written at creation time for both Docker and smolmachines - Thread the persisted backend name through `cli resume` so the correct bottle type is constructed without env overrides - Fix `_bottle_for_slug` in dashboard to construct smolmachines bottles rather than defaulting to Docker ## Changes (1 commit) - `docs/prds/0040-backend-aware-resume-and-dashboard.md` — add PRD 0040 (Draft)
didericis reviewed 2026-06-02 10:54:07 -04:00
@@ -657,3 +655,1 @@
# `bot-bottle-<slug>` — set by the compose renderer
# (no service suffix on the agent service, by design).
container_name = f"bot-bottle-{slug}"
machine_name = f"bot-bottle-{slug}"
Owner

Why the rename? Seems a bit silly: I know smolmachines aren't technically containers, but container seems more generic than "machine"... is there a more generic word we can use?

Why the rename? Seems a bit silly: I know smolmachines aren't technically containers, but container seems more generic than "machine"... is there a more generic word we can use?
Owner

sure

sure
didericis marked this conversation as resolved
didericis-claude reviewed 2026-06-02 10:54:58 -04:00
didericis-claude reviewed 2026-06-02 10:57:14 -04:00
@@ -657,3 +655,1 @@
# `bot-bottle-<slug>` — set by the compose renderer
# (no service suffix on the agent service, by design).
container_name = f"bot-bottle-{slug}"
machine_name = f"bot-bottle-{slug}"
Author
Collaborator

Fair point. How about instance_name? Both Docker containers and smolmachines VMs are instances of the agent runtime, so that term is accurate for both backends without implying either one specifically.

Line 655 for reference.

Fair point. How about `instance_name`? Both Docker containers and smolmachines VMs are instances of the agent runtime, so that term is accurate for both backends without implying either one specifically. Line 655 for reference.
didericis approved these changes 2026-06-02 11:02:26 -04:00
didericis added 4 commits 2026-06-02 11:16:23 -04:00
BottleMetadata gains a backend field (default ""). Docker prepare writes
"docker"; smolmachines prepare writes "smolmachines". read_metadata
deserialises it with "" as the backward-compatible default.

resume now passes metadata.backend to _launch_bottle so a preserved
smolmachines bottle is resumed on the right backend without requiring
BOT_BOTTLE_BACKEND to be set manually.

_bottle_for_slug now reads metadata.backend and constructs a
SmolmachinesBottle for smolmachines slugs instead of always defaulting
to DockerBottle. No-metadata slugs still fall back to Docker.

Closes #137
refactor: rename machine_name to instance_name in _bottle_for_slug
test / unit (pull_request) Successful in 32s
test / integration (pull_request) Successful in 41s
test / unit (push) Successful in 39s
test / integration (push) Successful in 1m0s
e43f75dd1b
didericis force-pushed prd-0040-backend-aware-resume-and-dashboard from 83c45d772a to e43f75dd1b 2026-06-02 11:16:23 -04:00 Compare
didericis merged commit e43f75dd1b into main 2026-06-02 11:23:08 -04:00
didericis deleted branch prd-0040-backend-aware-resume-and-dashboard 2026-06-02 11:23:08 -04:00
Sign in to join this conversation.