Skip to content

fix(vibe): drop the obsolete shadowed-global config warning - #2614

Merged
dyoshikawa merged 2 commits into
mainfrom
resolve-issue-2594-vibe-config-layering
Aug 7, 2026
Merged

fix(vibe): drop the obsolete shadowed-global config warning#2614
dyoshikawa merged 2 commits into
mainfrom
resolve-issue-2594-vibe-config-layering

Conversation

@dyoshikawa

Copy link
Copy Markdown
Owner

Background

Closes #2594

Rulesync warned on every --global Vibe run in a project that has its own .vibe/config.toml:

Vibe reads exactly one config.toml (project .vibe/config.toml when present, otherwise ~/.vibe/config.toml — a fallback, not a merge). This project has .vibe/config.toml, so the global file written by --global is ignored here.

That stopped being true in Vibe v2.24.0. I read vibe/core/config/default_orchestrator.py at HEAD to confirm: the layer stack now installs both UserConfigLayer and ProjectConfigLayer (previously exactly one was selected), and its own docstring says "a trusted project config inherits unspecified values from the user config". Only the persistence target is still resolved to a single layer. So a global write is not ignored — it is inherited by the project layer for every key the project file does not set.

Changes

  • Delete src/features/shared/vibe-config-scope.ts (it held only warnIfGlobalVibeConfigIsShadowed) and both call sites, in vibe-mcp.ts and vibe-permissions.ts. VibeMcp.fromRulesyncMcp no longer destructures logger, which it used only for this warning.
  • Invert the existing test: a --global write alongside a project config.toml must now produce no shadowing warning.
  • Rewrite the docs. The permissions note now describes the layering, the per-key merge strategies read off vibe_schema.pymcp_servers and connectors union-merge by name, tools deep-merges, disabled_tools concatenates, enabled_tools is replaced wholesale — and the runtime AdminConfigLayer that sits above everything. It stays deliberately careful about trust: ProjectConfigLayer still carries is_trusted, so the text says "a trusted project config overlays the user config" rather than claiming unconditional read behavior.
  • Add one sentence to the Vibe MCP note: with mcp_servers union-merged by name across layers, removing a server from the project file is not enough if a same-name entry remains in ~/.vibe/config.toml.
  • src/generated/docs-content.ts regenerated.

Verification

  • pnpm cicheck — all green.
  • npx vitest run --config vitest.e2e.config.ts src/e2e/e2e-permissions.spec.ts src/e2e/e2e-mcp.spec.ts — 198 passed.

🤖 Generated with Claude Code

Vibe v2.24.0's default_orchestrator installs the user and project TOML
layers together with per-key merge strategies, so a project config.toml no
longer replaces the global one and the warning was factually wrong. Remove
the warning helper and its two call sites, and rewrite the docs to describe
the layering, the per-key merge strategies and the AdminConfigLayer.
@dyoshikawa
dyoshikawa merged commit db3c6d7 into main Aug 7, 2026
9 checks passed
@dyoshikawa
dyoshikawa deleted the resolve-issue-2594-vibe-config-layering branch August 7, 2026 12:54
This was referenced Aug 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Follow up Vibe Code upstream updates: v2.24.0 user+project config layering obsoletes the shadowed-global warning

2 participants