Phase 3 — monorepo cleanup post standalone-as-SSOT 0.2.0 (after 24-48h bake) #1598

Open
opened 2026-05-20 09:21:08 +00:00 by core-be · 0 comments
Member

Follow-up task to the standalone-as-SSOT migration (CTO-GO 2026-05-20).

Pre-conditions (MUST verify before starting)

  • standalone PR#19 merged + 0.2.0 tagged + published to PyPI
  • 0.2.0 stable on PyPI for 24-48h (no urgent yanks/patch releases)
  • At least 1 workspace-template repo successfully cascade-pinned to 0.2.0 with passing CI

Tasks

1. Delete monorepo workspace/molecule_runtime Python source

The monorepo workspace/ directory contains the .py source that was published as the wheel. After the SSOT flip, those files are obsolete — the Dockerfile installs the wheel from PyPI.

Files to DELETE in molecule-core:

  • workspace/*.py (all top-level .py files: a2a_, executor_helpers, mcp_, etc.)
  • workspace/adapters/, workspace/builtin_tools/, workspace/audit/, workspace/lib/, workspace/platform_tools/, workspace/plugins_registry/, workspace/policies/, workspace/skill_loader/
  • workspace/tests/ — Python tests live in standalone now
  • workspace/pytest.ini, workspace/requirements.txt

KEEP:

  • workspace/Dockerfile — the workspace-server uses this to build the image (now pip install molecule-ai-workspace-runtime==X.Y.Z instead of COPY workspace/)
  • workspace/entrypoint.sh, workspace/build-all.sh, workspace/rebuild-runtime-images.sh — build scripts stay

2. Update workspace-server Dockerfile pin to 0.2.0

molecule-core/workspace-server/Dockerfile: bump the pip install molecule-ai-workspace-runtime==X.Y.Z pin to ==0.2.0.

3. Audit + decide fate of scripts/build_runtime_package.py

This script previously did monorepo workspace/ → wheel rename+rewrite. With standalone-as-SSOT, the wheel is built from standalone directly (no rename, no rewrite — code already in package layout).

Decision options:

  • Delete if no other workflow uses it
  • Repurpose as a one-shot migration tool (already done — could leave as historical reference)
  • Document its role if it has any remaining use

Verify: git grep "build_runtime_package" in monorepo to find any workflow still invoking it.

4. Update publish-runtime workflows

.gitea/workflows/publish-runtime.yml + publish-runtime-autobump.yml — these built the wheel monorepo-side. With standalone-as-SSOT, publishing happens from the standalone repo. Decide:

  • Delete the monorepo publish workflows
  • Keep the autobump-on-workspace-change but redirect it to push a runtime-version-bump PR against the standalone repo

5. Verify integration tests against pinned 0.2.0

  • E2E tests should run against the workspace-server image built with 0.2.0 from PyPI
  • A2A peer delegation across workspaces should work
  • All adapter templates (claude-code, hermes, openclaw, codex, langgraph, etc.) should boot cleanly with their own pinned 0.2.0

Sequencing & safety

  • Do NOT delete monorepo workspace/ source until workspace-server Dockerfile pin is bumped + verified live
  • Hot-deploy verification: provision a fresh tenant via CP, ensure workspace container boots, exercises one delegate_task, completes a heartbeat, registers to platform
  • Rollback plan: if 0.2.0 has a regression, monorepo workspace/ source is in git history; quick revert + bump version to 0.2.1

References

/cc core-devops core-be

Follow-up task to the standalone-as-SSOT migration (CTO-GO 2026-05-20). ## Pre-conditions (MUST verify before starting) - [ ] standalone PR#19 merged + 0.2.0 tagged + published to PyPI - [ ] 0.2.0 stable on PyPI for 24-48h (no urgent yanks/patch releases) - [ ] At least 1 workspace-template repo successfully cascade-pinned to 0.2.0 with passing CI ## Tasks ### 1. Delete monorepo workspace/molecule_runtime Python source The monorepo `workspace/` directory contains the .py source that was published as the wheel. After the SSOT flip, those files are obsolete — the Dockerfile installs the wheel from PyPI. Files to DELETE in molecule-core: - `workspace/*.py` (all top-level .py files: a2a_*, executor_helpers, mcp_*, etc.) - `workspace/adapters/`, `workspace/builtin_tools/`, `workspace/audit/`, `workspace/lib/`, `workspace/platform_tools/`, `workspace/plugins_registry/`, `workspace/policies/`, `workspace/skill_loader/` - `workspace/tests/` — Python tests live in standalone now - `workspace/pytest.ini`, `workspace/requirements.txt` KEEP: - `workspace/Dockerfile` — the workspace-server uses this to build the image (now `pip install molecule-ai-workspace-runtime==X.Y.Z` instead of `COPY workspace/`) - `workspace/entrypoint.sh`, `workspace/build-all.sh`, `workspace/rebuild-runtime-images.sh` — build scripts stay ### 2. Update workspace-server Dockerfile pin to 0.2.0 `molecule-core/workspace-server/Dockerfile`: bump the `pip install molecule-ai-workspace-runtime==X.Y.Z` pin to `==0.2.0`. ### 3. Audit + decide fate of scripts/build_runtime_package.py This script previously did monorepo workspace/ → wheel rename+rewrite. With standalone-as-SSOT, the wheel is built from standalone directly (no rename, no rewrite — code already in package layout). Decision options: - **Delete** if no other workflow uses it - **Repurpose** as a one-shot migration tool (already done — could leave as historical reference) - **Document** its role if it has any remaining use Verify: `git grep "build_runtime_package"` in monorepo to find any workflow still invoking it. ### 4. Update publish-runtime workflows `.gitea/workflows/publish-runtime.yml` + `publish-runtime-autobump.yml` — these built the wheel monorepo-side. With standalone-as-SSOT, publishing happens from the standalone repo. Decide: - **Delete** the monorepo publish workflows - **Keep** the autobump-on-workspace-change but redirect it to push a runtime-version-bump PR against the standalone repo ### 5. Verify integration tests against pinned 0.2.0 - E2E tests should run against the workspace-server image built with 0.2.0 from PyPI - A2A peer delegation across workspaces should work - All adapter templates (claude-code, hermes, openclaw, codex, langgraph, etc.) should boot cleanly with their own pinned 0.2.0 ## Sequencing & safety - Do NOT delete monorepo workspace/ source until workspace-server Dockerfile pin is bumped + verified live - Hot-deploy verification: provision a fresh tenant via CP, ensure workspace container boots, exercises one delegate_task, completes a heartbeat, registers to platform - Rollback plan: if 0.2.0 has a regression, monorepo workspace/ source is in git history; quick revert + bump version to 0.2.1 ## References - Parent migration PR: https://git.moleculesai.app/molecule-ai/molecule-ai-workspace-runtime/pulls/19 - Memory: feedback_no_single_source_of_truth, reference_post_suspension_pipeline /cc core-devops core-be
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: molecule-ai/molecule-core#1598