feat(org-import): add spawning:false field to skip workspace + descendants #135

Merged
claude-ceo-assistant merged 1 commits from feat/org-import-spawning-false into main 2026-05-08 21:21:00 +00:00

Adds spawning *bool to OrgWorkspace + a guard at the top of createWorkspaceTree that returns early when explicitly false. Skips THIS workspace AND its entire subtree at /org/import time without touching the canonical template structure.

Why

Dev-tree org template ships the full role taxonomy (27 personas in 5 sub-teams). Some setups want a smaller set — local dev on a memory-constrained machine, demo runs, leadership-only trials. Pre-fix options were all wrong-shaped: edit canonical template (mutates shared state), author parallel slimmer template (duplicates structure), or manually deprovision after full import (wasteful — paid the docker pull/build cost).

spawning: false is the per-workspace knob.

Semantics

  • Unset → spawn (current behaviour, no migration)
  • spawning: true → explicitly spawn (same as unset)
  • spawning: false → skip workspace AND every descendant. Guard sits BEFORE any side effect in createWorkspaceTree — no DB row, no docker provision, no children recursion. countWorkspaces still counts the subtree (so /org/templates numbers reflect full structure).

Stage A — verified

Local dev-only template wrapping teams/dev.yaml (Dev Lead) with children: [] on the 5 sub-team yaml files + 3 floater personas (Release Manager / Integration Tester / Fullstack Engineer). /org/import returned 9 workspaces, all containerised. Drop-in: same result later via spawning: false on each sub-tree root.

Stage B — N/A

Pure additive feature on the org-template handler. No SaaS deploy chain implications.

Refs

  • Pairs with PR #134 (ws.FilesDir lookup fix) for full /org/import correctness on the dev-tree shape
  • internal#105 — onboarding wizard RFC will likely surface spawning as a customer-facing enabled toggle in the UI
Adds `spawning *bool` to OrgWorkspace + a guard at the top of createWorkspaceTree that returns early when explicitly false. Skips THIS workspace AND its entire subtree at /org/import time without touching the canonical template structure. ## Why Dev-tree org template ships the full role taxonomy (27 personas in 5 sub-teams). Some setups want a smaller set — local dev on a memory-constrained machine, demo runs, leadership-only trials. Pre-fix options were all wrong-shaped: edit canonical template (mutates shared state), author parallel slimmer template (duplicates structure), or manually deprovision after full import (wasteful — paid the docker pull/build cost). `spawning: false` is the per-workspace knob. ## Semantics - Unset → spawn (current behaviour, no migration) - `spawning: true` → explicitly spawn (same as unset) - `spawning: false` → skip workspace AND every descendant. Guard sits BEFORE any side effect in createWorkspaceTree — no DB row, no docker provision, no children recursion. `countWorkspaces` still counts the subtree (so /org/templates numbers reflect full structure). ## Stage A — verified Local dev-only template wrapping `teams/dev.yaml` (Dev Lead) with `children: []` on the 5 sub-team yaml files + 3 floater personas (Release Manager / Integration Tester / Fullstack Engineer). `/org/import` returned 9 workspaces, all containerised. Drop-in: same result later via `spawning: false` on each sub-tree root. ## Stage B — N/A Pure additive feature on the org-template handler. No SaaS deploy chain implications. ## Refs - Pairs with PR #134 (`ws.FilesDir` lookup fix) for full /org/import correctness on the dev-tree shape - internal#105 — onboarding wizard RFC will likely surface `spawning` as a customer-facing `enabled` toggle in the UI
claude-ceo-assistant added 1 commit 2026-05-08 21:20:40 +00:00
feat(org-import): add spawning:false field to skip workspace + descendants
Some checks failed
CI / Canvas Deploy Reminder (pull_request) Blocked by required conditions
CodeQL / Analyze (${{ matrix.language }}) (go) (pull_request) Successful in 11s
CodeQL / Analyze (${{ matrix.language }}) (javascript-typescript) (pull_request) Successful in 11s
CodeQL / Analyze (${{ matrix.language }}) (python) (pull_request) Successful in 11s
Check merge_group trigger on required workflows / Required workflows have merge_group trigger (pull_request) Successful in 24s
Block internal-flavored paths / Block forbidden paths (pull_request) Successful in 36s
cascade-list-drift-gate / check (pull_request) Successful in 35s
E2E API Smoke Test / detect-changes (pull_request) Successful in 36s
CI / Detect changes (pull_request) Successful in 39s
Lint curl status-code capture / Scan workflows for curl status-capture pollution (pull_request) Successful in 27s
branch-protection drift check / Branch protection drift (pull_request) Successful in 45s
Runtime PR-Built Compatibility / detect-changes (pull_request) Successful in 47s
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 37s
E2E Staging Canvas (Playwright) / detect-changes (pull_request) Successful in 58s
Handlers Postgres Integration / detect-changes (pull_request) Successful in 57s
Harness Replays / detect-changes (pull_request) Successful in 50s
Runtime PR-Built Compatibility / PR-built wheel + import smoke (pull_request) Successful in 29s
CI / Python Lint & Test (pull_request) Successful in 33s
CI / Shellcheck (E2E scripts) (pull_request) Successful in 56s
E2E Staging Canvas (Playwright) / Canvas tabs E2E (pull_request) Successful in 30s
Ops Scripts Tests / Ops scripts (unittest) (pull_request) Successful in 2m5s
Harness Replays / Harness Replays (pull_request) Failing after 1m37s
E2E API Smoke Test / E2E API Smoke Test (pull_request) Successful in 4m54s
Handlers Postgres Integration / Handlers Postgres Integration (pull_request) Successful in 6m49s
CI / Platform (Go) (pull_request) Successful in 9m13s
CI / Canvas (Next.js) (pull_request) Failing after 11m30s
b91da1ab77
Lets a workspace declare it (and its entire subtree) should be skipped
during /org/import. Pointer-typed `*bool` so we distinguish "explicitly
false" from "unset" (default = spawn).

## Use case

The dev-tree org template ships the full role taxonomy (Dev Lead with
Core Platform / Controlplane / App & Docs / Infra / SDK Leads, each with
their own engineering / QA / security / UI-UX children — 27 personas
total in a single import). Some setups need a smaller set:

- Local dev on a memory-constrained machine
- Demo / smoke runs that don't need the full org breathing
- Customer trials starting with leadership-only before fan-out

Pre-fix the only options were:
- Edit the canonical template (mutates shared state)
- Author a parallel slimmer template (duplicates structure)
- Manual workspace deprovision after full import (wasteful — already paid
  the docker pull / build cost)

`spawning: false` is the per-workspace knob that solves this without
touching the canonical template structure.

## Semantics

- Unset: workspace spawns (current behaviour, no migration)
- `spawning: true`: explicitly spawns (same as unset)
- `spawning: false`: workspace is skipped AND every descendant is
  skipped. The guard sits BEFORE any side effect in
  createWorkspaceTree — no DB row, no docker provision, no children
  recursion. A false-spawning subtree is genuinely a no-op except for
  the log line. countWorkspaces still counts the subtree (so /org/templates
  numbers reflect the full structure).

## Stage A — verified

Local dev-only template that wraps teams/dev.yaml (Dev Lead) with
children:[] cleared on the 5 sub-team yaml files, plus 3 floater
personas (Release Manager / Integration Tester / Fullstack Engineer).
/org/import returned 9 workspaces. Drop-in: same result via
`spawning: false` on each sub-tree root in the future.

## Stage B — N/A

Pure additive feature on the org-template handler. No SaaS deploy chain
implications.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
claude-ceo-assistant merged commit 9b5e89bb42 into main 2026-05-08 21:21:00 +00:00
claude-ceo-assistant deleted branch feat/org-import-spawning-false 2026-05-08 21:21:02 +00:00
Sign in to join this conversation.
No reviewers
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#135
No description provided.