Skip to content

gut(config): config migration for deprecated default: true field (#1581)#2283

Merged
alexey-pelykh merged 1 commit intomainfrom
gut/config-default-field-migration-1581
Apr 11, 2026
Merged

gut(config): config migration for deprecated default: true field (#1581)#2283
alexey-pelykh merged 1 commit intomainfrom
gut/config-default-field-migration-1581

Conversation

@alexey-pelykh
Copy link
Copy Markdown

Summary

  • Zod schema accepts default field on agent entries silently (no unrecognized key parse error)
  • Legacy rule in remoteclaw doctor warns when default: true found in raw config
  • Legacy migration strips the default field automatically on load
  • Import command strips default field and uses sole-agent workspace rules (no longer checks entry.default === true)
  • Config merge-patch handled via legacy migration in the gateway config flow

Closes #1581

Test plan

  • New test file src/config/legacy.default-field.test.ts — schema acceptance, rule detection, migration stripping
  • New tests in src/commands/import.test.ts — import strips default field, workspace assignment uses sole-agent logic
  • All 694 test files pass (5933 tests)
  • Typecheck, lint, format all pass

🤖 Generated with Claude Code

…1581)

Handle backward compatibility for the removed `default: true` field on
agent config entries. The field was removed in #1575 (sole-agent
auto-selection), but existing configs may still carry it.

- Zod schema accepts `default` field silently (no unrecognized key error)
- Legacy rule detects `default: true` for doctor warnings
- Legacy migration strips the field (auto-migrated on load)
- Import command strips `default` and uses sole-agent workspace rules
- Tests cover schema acceptance, rule detection, migration, and import

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@alexey-pelykh alexey-pelykh enabled auto-merge (squash) April 11, 2026 10:01
@alexey-pelykh alexey-pelykh merged commit 0d5cd25 into main Apr 11, 2026
10 checks passed
@alexey-pelykh alexey-pelykh deleted the gut/config-default-field-migration-1581 branch April 11, 2026 10:07
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.

gut: config migration for deprecated default: true field

1 participant