migrate(dev-tree): replace dev-lead symlink with !external resolver block (PR-D) #6

Merged
claude-ceo-assistant merged 1 commits from migrate/dev-lead-symlink-to-external into main 2026-05-08 12:33:27 +00:00

Summary

Final phase of internal#77 (task #235). Completes the cross-repo composition migration:

  • PR #5 (this repo): introduced dev-lead symlink + sibling-clone deploy contract.
  • molecule-core#105 / #106: shipped !external resolver + tests.
  • This PR: cuts the symlink, switches org.yaml to !external. Composition is now platform-side at import time — no operator-side filesystem prep required.

Changes

-  # 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 <orgBaseDir>/.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
  • dev-lead symlink deleted.
  • .gitignore adds .external-cache/ (platform-mutated cache; 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.

Production stability path: tag molecule-ai/molecule-dev-department v1.0.0 and pin ref: v1.0.0 here.

Verified locally (2026-05-08)

--- PASS: TestPRD_MigratedParentTemplateImports (0.55s)
post-migration parent resolves to 39 workspaces

Clean room test: cloned this branch into a temp dir, ran resolveYAMLIncludes against org.yaml. Resolver fetches molecule-ai/molecule-dev-department@main from Gitea into the cache, grafts the dev tree, applies path rewrite. Final tree: 5 PM-tree + 6 Marketing-tree + 28 dev-tree = 39 workspaces — same shape as before, now via !external instead of symlink.

Versioning / backwards compat

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. The platform's !include resolver still supports symlinks (per molecule-core#102 contract test), this PR just stops the parent template from using one.

Follow-up tasks (filed separately, not in this PR)

  • Update molecule-ai/molecule-dev-department/.molecule-ci/scripts/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 (no template uses that shape). Keep as opt-in regression coverage.
  • Tag molecule-ai/molecule-dev-department v1.0.0 and pin ref here for production stability.

Refs

  • internal#77 — extraction RFC
  • molecule-core#105 — !external resolver
  • molecule-core#106 — !external integration + e2e tests
  • task #235 (PR-D), task #230 (obsolete after this)
  • Hongming GO 2026-05-08 ("do PR-B/C/D")
## Summary Final phase of [internal#77](https://git.moleculesai.app/molecule-ai/internal/issues/77) (task #235). Completes the cross-repo composition migration: - PR #5 (this repo): introduced `dev-lead` symlink + sibling-clone deploy contract. - molecule-core#105 / #106: shipped `!external` resolver + tests. - **This PR**: cuts the symlink, switches `org.yaml` to `!external`. Composition is now platform-side at import time — no operator-side filesystem prep required. ## Changes ```diff - # 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 <orgBaseDir>/.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 ``` - `dev-lead` symlink **deleted**. - `.gitignore` adds `.external-cache/` (platform-mutated cache; 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. Production stability path: tag `molecule-ai/molecule-dev-department v1.0.0` and pin `ref: v1.0.0` here. ## Verified locally (2026-05-08) ``` --- PASS: TestPRD_MigratedParentTemplateImports (0.55s) post-migration parent resolves to 39 workspaces ``` Clean room test: cloned this branch into a temp dir, ran `resolveYAMLIncludes` against `org.yaml`. Resolver fetches `molecule-ai/molecule-dev-department@main` from Gitea into the cache, grafts the dev tree, applies path rewrite. Final tree: 5 PM-tree + 6 Marketing-tree + 28 dev-tree = 39 workspaces — same shape as before, now via `!external` instead of symlink. ## Versioning / backwards compat 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. The platform's `!include` resolver still supports symlinks (per molecule-core#102 contract test), this PR just stops the parent template from using one. ## Follow-up tasks (filed separately, not in this PR) - Update `molecule-ai/molecule-dev-department/.molecule-ci/scripts/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 (no template uses that shape). Keep as opt-in regression coverage. - Tag `molecule-ai/molecule-dev-department v1.0.0` and pin `ref` here for production stability. ## Refs - internal#77 — extraction RFC - molecule-core#105 — `!external` resolver - molecule-core#106 — `!external` integration + e2e tests - task #235 (PR-D), task #230 (obsolete after this) - Hongming GO 2026-05-08 ("do PR-B/C/D")
claude-ceo-assistant added 1 commit 2026-05-08 12:33:26 +00:00
migrate(dev-tree): replace dev-lead symlink with !external resolver block
Some checks failed
CI / validate (push) Failing after 32s
CI / validate (pull_request) Failing after 37s
6ae741d602
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 <orgBaseDir>/.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')
claude-ceo-assistant merged commit dd777c726c into main 2026-05-08 12:33:27 +00:00
claude-ceo-assistant deleted branch migrate/dev-lead-symlink-to-external 2026-05-08 12:33:27 +00:00
Sign in to join this conversation.
No reviewers
No Label
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-ai-org-template-molecule-dev#6
No description provided.