Rename Go module: github.com/Molecule-AI/molecule-monorepo/platform → git.moleculesai.app/molecule-ai/molecule-core/workspace-server #1760

Closed
opened 2026-05-24 01:28:44 +00:00 by hongming · 0 comments
Owner

Rename Go module: github.com/Molecule-AI/molecule-monorepo/platformgit.moleculesai.app/molecule-ai/molecule-core/workspace-server

Problem

The Go module path in workspace-server/go.mod is:

module github.com/Molecule-AI/molecule-monorepo/platform

Two issues with this:

  1. github.com/Molecule-AI/... points at a host the org no longer uses. The GitHub org was suspended 2026-05-06; canonical SCM is now git.moleculesai.app/molecule-ai/<repo>. Anything that resolves Go module URLs against that path will 404.

  2. molecule-monorepo/platform doesn't match reality. The repo split into per-component shapes; this codebase lives in molecule-ai/molecule-core and the directory is workspace-server/, not platform/. New contributors hit immediate confusion (cd platform ⇒ no such directory).

canvas/ has no Go module of its own (TypeScript), so this is workspace-server-only — but 194 Go files import paths under the bad prefix.

Target

Per CTO 2026-05-23: git.moleculesai.app/molecule-ai/molecule-core/workspace-server

  • Matches the git clone URL exactly.
  • Matches the on-disk directory name (workspace-server).
  • Removes any reference to the suspended GitHub host.

Scope

$ grep -rl "github.com/Molecule-AI/molecule-monorepo" workspace-server/ | wc -l
194

Every internal import (internal/handlers, internal/memory, internal/provisioner, etc.) needs the prefix rewritten. Plus:

  • workspace-server/go.mod — module declaration line.
  • workspace-server/go.sum — unchanged (sum hashes are unaffected by the module's own name).
  • Any tooling (Dockerfile, scripts, CI workflows) referencing the path string verbatim.

Mechanical recipe

Once the queued PRs (#1737, #1742, #1747, #1749, #1753, #1755) have merged:

cd ~/molecule-core/workspace-server
OLD="github.com/Molecule-AI/molecule-monorepo/platform"
NEW="git.moleculesai.app/molecule-ai/molecule-core/workspace-server"

# 1. go.mod
sed -i.bak "s|^module $OLD|module $NEW|" go.mod && rm go.mod.bak

# 2. Every Go file (internal + cmd + pkg + tests)
grep -rl "$OLD" --include="*.go" . | xargs sed -i.bak "s|$OLD|$NEW|g"
find . -name "*.go.bak" -delete

# 3. Verify
go vet ./...
go test -short -count=1 ./...

Plus check for the path in non-Go files:

grep -rn "$OLD" . --include="*.Dockerfile" --include="*.yml" --include="*.yaml" --include="*.sh"

Cross-repo impact (must verify before merging)

If any of these repos imports paths under the old prefix, this rename breaks them:

  • molecule-controlplane — already split, no shared Go module.
  • molecule-mcp-server — TypeScript, no Go imports.
  • molecule-ai-workspace-runtime — Python, no Go imports.
  • molecule-mcp-claude-channel — verify.

Run git grep on each before flipping.

Sequencing

  1. Wait for #1737 + #1742 + #1747 + #1749 + #1753 + #1755 to merge. Rebasing 194 import edits over an unmerged queue creates avoidable churn — at least one PR per branch would need a force-rebase.
  2. Cross-repo check above.
  3. Single mechanical PR:
    • go.mod edit.
    • 194-file sed import rewrite.
    • go vet + go test -short -count=1 green.
    • Update any cross-references in Dockerfile.tenant, cmd/*/main.go build tags, etc.
  4. Post-merge: confirm CI cache is invalidated and the new module path resolves end-to-end on a fresh go mod download.

Tier

area:infra tier:high — touches every Go file in workspace-server but is mechanical. The risk is a forgotten cross-repo dependency, not a logic bug.

Refs

  • CTO 2026-05-23 decision (Claude Code session)
  • post-suspension SCM policy (~/.molecule-ai/AGENTS.md, feedback_post_suspension_pipeline)
  • GitHub org suspension 2026-05-06
# Rename Go module: `github.com/Molecule-AI/molecule-monorepo/platform` → `git.moleculesai.app/molecule-ai/molecule-core/workspace-server` ## Problem The Go module path in `workspace-server/go.mod` is: ``` module github.com/Molecule-AI/molecule-monorepo/platform ``` Two issues with this: 1. **`github.com/Molecule-AI/...`** points at a host the org no longer uses. The GitHub org was suspended 2026-05-06; canonical SCM is now `git.moleculesai.app/molecule-ai/<repo>`. Anything that resolves Go module URLs against that path will 404. 2. **`molecule-monorepo/platform`** doesn't match reality. The repo split into per-component shapes; this codebase lives in `molecule-ai/molecule-core` and the directory is `workspace-server/`, not `platform/`. New contributors hit immediate confusion (`cd platform` ⇒ no such directory). `canvas/` has no Go module of its own (TypeScript), so this is workspace-server-only — but **194 Go files** import paths under the bad prefix. ## Target Per CTO 2026-05-23: **`git.moleculesai.app/molecule-ai/molecule-core/workspace-server`** - Matches the `git clone` URL exactly. - Matches the on-disk directory name (`workspace-server`). - Removes any reference to the suspended GitHub host. ## Scope ``` $ grep -rl "github.com/Molecule-AI/molecule-monorepo" workspace-server/ | wc -l 194 ``` Every internal import (`internal/handlers`, `internal/memory`, `internal/provisioner`, etc.) needs the prefix rewritten. Plus: - `workspace-server/go.mod` — module declaration line. - `workspace-server/go.sum` — unchanged (sum hashes are unaffected by the module's own name). - Any tooling (Dockerfile, scripts, CI workflows) referencing the path string verbatim. ## Mechanical recipe Once the queued PRs (#1737, #1742, #1747, #1749, #1753, #1755) have merged: ```bash cd ~/molecule-core/workspace-server OLD="github.com/Molecule-AI/molecule-monorepo/platform" NEW="git.moleculesai.app/molecule-ai/molecule-core/workspace-server" # 1. go.mod sed -i.bak "s|^module $OLD|module $NEW|" go.mod && rm go.mod.bak # 2. Every Go file (internal + cmd + pkg + tests) grep -rl "$OLD" --include="*.go" . | xargs sed -i.bak "s|$OLD|$NEW|g" find . -name "*.go.bak" -delete # 3. Verify go vet ./... go test -short -count=1 ./... ``` Plus check for the path in non-Go files: ```bash grep -rn "$OLD" . --include="*.Dockerfile" --include="*.yml" --include="*.yaml" --include="*.sh" ``` ## Cross-repo impact (must verify before merging) If any of these repos imports paths under the old prefix, this rename breaks them: - `molecule-controlplane` — already split, no shared Go module. - `molecule-mcp-server` — TypeScript, no Go imports. - `molecule-ai-workspace-runtime` — Python, no Go imports. - `molecule-mcp-claude-channel` — verify. Run `git grep` on each before flipping. ## Sequencing 1. **Wait for #1737 + #1742 + #1747 + #1749 + #1753 + #1755** to merge. Rebasing 194 import edits over an unmerged queue creates avoidable churn — at least one PR per branch would need a force-rebase. 2. **Cross-repo check** above. 3. **Single mechanical PR**: - `go.mod` edit. - 194-file `sed` import rewrite. - `go vet` + `go test -short -count=1` green. - Update any cross-references in `Dockerfile.tenant`, `cmd/*/main.go` build tags, etc. 4. **Post-merge**: confirm CI cache is invalidated and the new module path resolves end-to-end on a fresh `go mod download`. ## Tier `area:infra` `tier:high` — touches every Go file in workspace-server but is mechanical. The risk is a forgotten cross-repo dependency, not a logic bug. ## Refs - CTO 2026-05-23 decision (Claude Code session) - post-suspension SCM policy (`~/.molecule-ai/AGENTS.md`, `feedback_post_suspension_pipeline`) - GitHub org suspension 2026-05-06
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: molecule-ai/molecule-core#1760