[tech-debt] Rename Docker network molecule-monorepo-net -> molecule-core-net (post-internal#71 cleanup) #93

Open
opened 2026-05-08 00:36:22 +00:00 by claude-ceo-assistant · 0 comments

Summary

The Docker network used across docker-compose.yml + provisioner code + scripts is named molecule-monorepo-net. It's a holdover from when the repo was called molecule-monorepo; the canonical Gitea repo is molecule-core. Rename to molecule-core-net to match.

Surface

grep -rn 'molecule-monorepo-net' across the repo finds 19 references:

  • Production code (load-bearing — touches running infrastructure):
    • workspace-server/internal/provisioner/provisioner.go:70DefaultNetwork = "molecule-monorepo-net"
  • docker-compose:
    • docker-compose.yml — 9 networks: entries + 1 network definition
    • docker-compose.infra.yml:122 — network definition
  • Infra setup:
    • infra/scripts/setup.sh:8docker network create molecule-monorepo-net
    • scripts/nuke-and-rebuild.sh:27docker network rm molecule-monorepo-net
  • Comments / docs (cosmetic, but worth fixing for consistency):
    • workspace-server/internal/handlers/workspace_provision.go:176
    • workspace-server/internal/handlers/transcript.go:137
    • workspace-server/internal/provisioner/provisioner.go:388
    • tools/check-template-parity.sh:16
    • scripts/test-all.sh:2

Impact

Discovered: E2E API Smoke Test job on internal#71 migration PRs (e.g., core#82 e353b54a) fails with network molecule-monorepo-net not found when the runner hasn't pre-created the network. Same failure reproduces on baseline main — so this is not a regression of internal#71, just a pre-existing surface that the migration sweep made visible.

The CI job recovers if the network exists from a previous test run; fails after a clean runner restart. That's why the failure is intermittent: it depends on whether someone (or a previous job) created the network first.

Migration sequence (load-bearing, must coordinate with running infrastructure)

The network is shared by every container that joins it. Renaming requires:

  1. Pre-flight: docker network create molecule-core-net on every runner host that uses the old network. New name coexists with old.
  2. Code PR:
    • provisioner.go: DefaultNetwork = "molecule-core-net"
    • docker-compose.yml, docker-compose.infra.yml: replace molecule-monorepo-net with molecule-core-net
    • infra/scripts/setup.sh: create both networks during a transition window
    • nuke-and-rebuild.sh: rm both networks
    • All comments / docs: update wording
  3. Cutover: deploy code change. Containers brought up after the deploy join molecule-core-net; existing long-lived containers stay on molecule-monorepo-net.
  4. Drain: as long-lived containers cycle (workspace restarts, redeploys), they migrate to the new network. Once nothing's on molecule-monorepo-net, docker network rm molecule-monorepo-net.

This is staged because forcing every container off the old network at once would interrupt running workspaces.

Class

Naming alignment / tech-debt. Adjacent to internal#71 but out of scope for that migration (which deliberately scoped to Go module paths, not Docker infrastructure naming).

Acceptance criteria

  • grep -rn 'molecule-monorepo-net' returns zero matches in code/configs/scripts/comments.
  • docker network ls on every runner host shows molecule-core-net and no molecule-monorepo-net after the transition window.
  • E2E API Smoke + Harness Replays jobs no longer surface "network not found" errors.

Out of scope

  • Renaming the local working-directory ~/Documents/GitHub/molecule-monorepo to ~/Documents/GitHub/molecule-core — purely cosmetic on contributors' boxes; track separately if at all.
  • The molecule-monorepo-canvas package name in canvas/package.json — already renamed in molecule-core#82.

Reporter

Discovered while watching CI on internal#71 migration PRs. 2026-05-08.

## Summary The Docker network used across docker-compose.yml + provisioner code + scripts is named `molecule-monorepo-net`. It's a holdover from when the repo was called `molecule-monorepo`; the canonical Gitea repo is `molecule-core`. Rename to `molecule-core-net` to match. ## Surface `grep -rn 'molecule-monorepo-net'` across the repo finds 19 references: - **Production code** (load-bearing — touches running infrastructure): - `workspace-server/internal/provisioner/provisioner.go:70` — `DefaultNetwork = "molecule-monorepo-net"` - **docker-compose**: - `docker-compose.yml` — 9 `networks:` entries + 1 network definition - `docker-compose.infra.yml:122` — network definition - **Infra setup**: - `infra/scripts/setup.sh:8` — `docker network create molecule-monorepo-net` - `scripts/nuke-and-rebuild.sh:27` — `docker network rm molecule-monorepo-net` - **Comments / docs** (cosmetic, but worth fixing for consistency): - `workspace-server/internal/handlers/workspace_provision.go:176` - `workspace-server/internal/handlers/transcript.go:137` - `workspace-server/internal/provisioner/provisioner.go:388` - `tools/check-template-parity.sh:16` - `scripts/test-all.sh:2` ## Impact **Discovered**: `E2E API Smoke Test` job on internal#71 migration PRs (e.g., core#82 e353b54a) fails with `network molecule-monorepo-net not found` when the runner hasn't pre-created the network. Same failure reproduces on baseline `main` — so this is **not** a regression of internal#71, just a pre-existing surface that the migration sweep made visible. The CI job recovers if the network exists from a previous test run; fails after a clean runner restart. That's why the failure is intermittent: it depends on whether someone (or a previous job) created the network first. ## Migration sequence (load-bearing, must coordinate with running infrastructure) The network is shared by every container that joins it. Renaming requires: 1. **Pre-flight**: `docker network create molecule-core-net` on every runner host that uses the old network. New name coexists with old. 2. **Code** PR: - `provisioner.go`: `DefaultNetwork = "molecule-core-net"` - `docker-compose.yml`, `docker-compose.infra.yml`: replace `molecule-monorepo-net` with `molecule-core-net` - `infra/scripts/setup.sh`: create both networks during a transition window - `nuke-and-rebuild.sh`: rm both networks - All comments / docs: update wording 3. **Cutover**: deploy code change. Containers brought up after the deploy join `molecule-core-net`; existing long-lived containers stay on `molecule-monorepo-net`. 4. **Drain**: as long-lived containers cycle (workspace restarts, redeploys), they migrate to the new network. Once nothing's on `molecule-monorepo-net`, `docker network rm molecule-monorepo-net`. This is staged because forcing every container off the old network at once would interrupt running workspaces. ## Class Naming alignment / tech-debt. Adjacent to internal#71 but **out of scope** for that migration (which deliberately scoped to Go module paths, not Docker infrastructure naming). ## Acceptance criteria - `grep -rn 'molecule-monorepo-net'` returns zero matches in code/configs/scripts/comments. - `docker network ls` on every runner host shows `molecule-core-net` and no `molecule-monorepo-net` after the transition window. - E2E API Smoke + Harness Replays jobs no longer surface "network not found" errors. ## Out of scope - Renaming the local working-directory `~/Documents/GitHub/molecule-monorepo` to `~/Documents/GitHub/molecule-core` — purely cosmetic on contributors' boxes; track separately if at all. - The `molecule-monorepo-canvas` package name in `canvas/package.json` — already renamed in molecule-core#82. ## Reporter Discovered while watching CI on internal#71 migration PRs. 2026-05-08.
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: molecule-ai/molecule-core#93
No description provided.