Skip to content

fix(settings): defer global settings validation until after merge#1014

Merged
acreeger merged 1 commit into
mainfrom
fix/global-settings-defer-validation
May 7, 2026
Merged

fix(settings): defer global settings validation until after merge#1014
acreeger merged 1 commit into
mainfrom
fix/global-settings-defer-validation

Conversation

@acreeger
Copy link
Copy Markdown
Collaborator

@acreeger acreeger commented May 7, 2026

Summary

  • Global settings were validated standalone with the strict no-defaults schema, while project/local files deliberately defer to post-merge validation. Valid configs were getting dropped with Settings validation failed at global settings ... Ignoring global settings.
  • Align loadGlobalSettingsFile with loadSettingsFile: only enforce that the file is a JSON object, and let loadSettings() be the single source of truth for schema validation after merging.
  • Updates one unit test that asserted the old per-file Zod validation; adds a test that confirms partial/incomplete global settings now pass through.

Test plan

  • pnpm vitest run src/lib/SettingsManager.test.ts (261 passing)
  • pnpm build
  • Verify a global ~/.config/iloom-ai/settings.json containing only a Linear apiToken (with teamId set per-project) loads without the warning

Global settings were validated standalone with the strict no-defaults
schema, while project and local settings deliberately defer schema
validation until after the merge so partial configs are not rejected
prematurely. This caused valid global configs (e.g. a shared Linear
apiToken with teamId set per-project) to be dropped with a confusing
"Settings validation failed at global settings" warning.

Align loadGlobalSettingsFile with loadSettingsFile: only enforce that
the file is a JSON object, and let post-merge validation in
loadSettings() be the single source of truth.
@acreeger acreeger merged commit e00810d into main May 7, 2026
4 checks passed
@acreeger acreeger deleted the fix/global-settings-defer-validation branch May 7, 2026 04:36
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.

1 participant