LearnNewsExamplesServices
Frontmatter
id12808
titlebootstrapWorktree BOOTSTRAP_CONFIGS omits gitlab-workflow config
stateClosed
labels
bugcontributor-experienceaibuild
assigneesneo-opus-vega
createdAtJun 9, 2026, 4:12 AM
updatedAtJun 10, 2026, 9:54 PM
githubUrlhttps://github.com/neomjs/neo/issues/12808
authorneo-opus-ada
commentsCount0
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[x] 12861 Extract a shared server-template enumeration helper for config bootstrap
closedAtJun 10, 2026, 9:54 PM

bootstrapWorktree BOOTSTRAP_CONFIGS omits gitlab-workflow config

Closed v13.0.0/archive-v13-0-0-chunk-17 bugcontributor-experienceaibuild
neo-opus-ada
neo-opus-ada commented on Jun 9, 2026, 4:12 AM

Context

Surfaced during #9491 / PR #12792 whitebox-e2e in a fresh .claude/worktrees/<name>/ worktree. The webpack dev server failed to compile:

Error: Cannot find module '.../ai/mcp/server/gitlab-workflow/config.mjs' imported from .../ai/services/gitlab-workflow/GitLabClient.mjs

Running bootstrapWorktree({mainCheckout, projectRoot}) hydrated ai/config.mjs + the github-workflow / knowledge-base / memory-core / neural-link server configs (all skip (exists) / copied), but never touched gitlab-workflow — its config.mjs stayed missing.

The Problem

#10095 (CLOSED) fixed the general "worktrees fail on gitignored ai/mcp/server/*/config.mjs" bootstrap problem, and #10351 (CLOSED) added the npm-install / --build-all path. But the gitlab-workflow MCP server was added later (GitLab track) and was never added to BOOTSTRAP_CONFIGS. So a fresh worktree that imports the gitlab service chain hits the exact #10095 ERR_MODULE_NOT_FOUND symptom — for a server #10095's fix doesn't enumerate. The config list is a hand-maintained allow-list that drifts every time a server is added.

The Architectural Reality

  • ai/scripts/migrations/bootstrapWorktree.mjsBOOTSTRAP_CONFIGS (~line 119) is the explicit list of ai/mcp/server/*/config.mjs files to hydrate. It enumerates github-workflow / knowledge-base / memory-core / neural-link but not gitlab-workflow.
  • ai/mcp/server/gitlab-workflow/config.template.mjs exists; config.mjs is gitignored (per the standard per-server override pattern).

The Fix

Add ai/mcp/server/gitlab-workflow/config.mjs to BOOTSTRAP_CONFIGS (mirroring the sibling entries). Stronger fix to prevent recurrence: auto-derive the list by globbing ai/mcp/server/*/config.template.mjs so newly-added servers are hydrated automatically — eliminating the drift class, not just this instance.

Decision Record impact

none. Related: #10095 (CLOSED — general gitignored-config bootstrap mechanism), #10351 (CLOSED — npm-install / --build-all for test-ready worktrees).

Acceptance Criteria

  • BOOTSTRAP_CONFIGS includes gitlab-workflow (or the list auto-derives from the server dirs).
  • A fresh worktree bootstrapped via bootstrapWorktree has ai/mcp/server/gitlab-workflow/config.mjs hydrated; importing the gitlab service chain no longer throws ERR_MODULE_NOT_FOUND.
  • (Preferred) the list is derived from ai/mcp/server/*/ so future server additions can't reintroduce this drift.

Out of Scope

  • The npm-install / --build-all path (#10351, done) and theme CSS build (covered by --build-all).

Origin Session ID: 31325e4f-0fdf-4627-96ed-7983dd1b1002

Retrieval Hint: "bootstrapWorktree BOOTSTRAP_CONFIGS gitlab-workflow missing worktree ERR_MODULE_NOT_FOUND".

Authored by Claude Opus 4.8 (Claude Code), @neo-opus-ada.

tobiu closed this issue on Jun 10, 2026, 9:54 PM
tobiu referenced in commit 7599572 - "fix(bootstrap-worktree): auto-derive BOOTSTRAP_CONFIGS from server templates (#12808) (#12857)" on Jun 10, 2026, 9:54 PM