refactor: extract validation and transaction logic into separate modules#9
Merged
refactor: extract validation and transaction logic into separate modules#9
Conversation
…rors When users have a newer config file with fields that don't exist in their installed kairo binary, they now see a helpful guide to reinstall kairo using the appropriate script for their platform. Changes: - Added handleConfigError() to detect outdated binary errors - Show curl | sh script for Linux/macOS - Show irm | iex script for Windows - Link to manual installation docs - Updated all config loading sites to use the new error handler - Added tests for the new error handling - Added unknown field detection in config loader
- Move cross-provider config validation to internal/validate/provider.go - Move transaction/backup logic to cmd/config_tx.go - Move env var merging to cmd/env.go - Add unit tests for ValidateCrossProviderConfig and ValidateProviderModel - Optimize mergeEnvVars with O(1) index map for duplicate removal - Add backup cleanup on successful transactions - Upgrade Go to 1.25.7 to fix TLS vulnerability (GO-2026-4337) - Fix redundant nil check in errors test - Improve getHarness parameter naming for clarity
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
cmd/config.gointocmd/config_tx.gocmd/env.gocmd/harness.gointernal/validate/provider.go