From 6ae741d6024f5906ecb159fa4da6e74ca50095ae Mon Sep 17 00:00:00 2001 From: claude-ceo-assistant Date: Fri, 8 May 2026 05:32:44 -0700 Subject: [PATCH] migrate(dev-tree): replace dev-lead symlink with !external resolver block MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Phase 3a-PR-D of internal#77 (task #235). Completes the cross-repo composition migration started by PR #5 (sibling-clone+symlink) and the platform-side !external resolver shipped in molecule-core#105. CHANGES - org.yaml: replace - !include dev-lead/workspace.yaml with - !external repo: molecule-ai/molecule-dev-department ref: main path: dev-lead/workspace.yaml Composition is now platform-side: at POST /org/import time the workspace-server fetches molecule-ai/molecule-dev-department at ref=main into /.external-cache/, grafts the dev-lead subtree, and rewrites every files_dir to be cache-prefixed. - dev-lead symlink deleted. The post-suspension sibling-clone deploy contract (operator must keep both repos as siblings under /org-templates/) is no longer required. The platform fetches the subtree on demand. - .gitignore: add .external-cache/ entry. Operators see the cache populate during imports; we don't track it. DEPLOYMENT IMPACT Operators running molecule-core PR #105 or later can import this template without operator-side molecule-dev-department clone (task #230 becomes obsolete). Operators running an older platform binary will see import fail with 'unknown !external tag' — visible error, not silent breakage. To pin a specific tag/SHA for production stability, change ref: main to e.g. ref: v1.0.0 (currently no tags published; landing this unlocks the option). VERSIONING No DB schema change. No public API change. Pure org-template composition shape change. Existing imports of older snapshots of this template still work — !include + symlink were never the only composition mechanism, and operators who have the symlink can re-add it locally if they need to roll back. VERIFIED LOCALLY 2026-05-08 --- PASS: TestPRD_MigratedParentTemplateImports (0.55s) post-migration parent resolves to 39 workspaces (5 PM-tree + 6 Marketing-tree + 28 dev-tree, fetched from molecule-ai/molecule-dev-department@main via the production gitFetcher into .external-cache/). FOLLOW-UP TASKS - Update molecule-dev-department's local-e2e-setup.sh to drop the symlink check (now that parent template doesn't ship one). - Decide fate of TestLocalE2E_DevDepartmentExtraction + TestLocalE2E_FilesDirConsumption (they tested the symlink-based composition; now skip gracefully because no template uses that shape — keep as opt-in regression coverage). - Tag molecule-ai/molecule-dev-department v1.0.0 + pin ref here. Refs: internal#77 — extraction RFC (Phase 3a phasing in comment 1995) molecule-core#105 — !external resolver molecule-core#106 — !external integration + e2e tests task #235 (PR-D) task #230 — obsolete after this PR Hongming GO 2026-05-08 ('do PR-B/C/D') --- .gitignore | 3 +++ dev-lead | 1 - org.yaml | 15 ++++++++++----- 3 files changed, 13 insertions(+), 6 deletions(-) delete mode 120000 dev-lead diff --git a/.gitignore b/.gitignore index 2af45b5..f808539 100644 --- a/.gitignore +++ b/.gitignore @@ -19,3 +19,6 @@ # Workspace auth tokens .auth-token .auth_token + +# Platform .external-cache/ (cross-repo subtree fetch cache, see internal#77) +.external-cache/ diff --git a/dev-lead b/dev-lead deleted file mode 120000 index 7ad0e64..0000000 --- a/dev-lead +++ /dev/null @@ -1 +0,0 @@ -../molecule-dev-department/dev-lead \ No newline at end of file diff --git a/org.yaml b/org.yaml index 54bb883..f988c4b 100644 --- a/org.yaml +++ b/org.yaml @@ -147,10 +147,15 @@ defaults: workspaces: - !include teams/pm.yaml - !include teams/marketing.yaml - # Dev tree extracted to molecule-ai/molecule-dev-department (internal#77). - # The `dev-lead` symlink at this template's root resolves through the - # operator-side sibling-clone convention to molecule-dev-department/dev-lead/. - # See README §Dev tree composition for the deploy invariant. - - !include dev-lead/workspace.yaml + # Dev tree composed via gitops `!external` resolver (internal#77 / molecule-core#105). + # Platform fetches molecule-ai/molecule-dev-department at import time into a + # content-addressable cache under /.external-cache/. No operator- + # side filesystem symlink, no sibling-clone deploy contract — the import is + # self-contained. To pin a specific tag/SHA in production, change `ref: main` + # below (e.g. `ref: v1.0.0`). + - !external + repo: molecule-ai/molecule-dev-department + ref: main + path: dev-lead/workspace.yaml template_schema_version: 1