Fix: km config output matches AppConfig structure#1095
Merged
dluc merged 1 commit intomicrosoft:mainfrom Nov 29, 2025
Merged
Conversation
Problem: km config output used DTOs with different structure than the actual AppConfig format, making it impossible for users to copy/paste output back into their config file. Before (wrong structure): - nodes: Array (not Object/Dictionary) - embeddingsCache nested under "cache" (not at root) After (correct structure): - nodes: Object/Dictionary (matches config file format) - embeddingsCache at root level (matches config file format) - Users can now copy/paste output into config.json Changes: - ConfigCommand default output is now this.Config (actual AppConfig) - Add test to verify output structure matches AppConfig format - Test follows TDD: written first (RED), then fixed (GREEN) Test results: - All 263 tests passing (186 Main + 77 Core) - Zero warnings, zero errors - Coverage: 81.64% (exceeds 80% minimum)
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.
Problem
km configoutput used DTOs with different structure than the actual AppConfig format, making it impossible for users to copy/paste output back into their config file.Before (wrong structure):
{ "nodes": [ // ❌ Array (wrong!) { "nodeId": "personal", ... } ], "cache": { // ❌ Wrong property name "embeddingsCache": {...} } }After (correct structure):
{ "nodes": { // ✅ Object/Dictionary (correct!) "personal": { "id": "personal", ... } }, "embeddingsCache": { // ✅ At root level (correct!) ... } }Solution
this.Config(actual AppConfig object)--show-nodesand--show-cacheflags still use DTOs (unchanged)TDD Approach
Changes
ConfigCommandto output actual AppConfig (not DTOs)embeddingsCacheto test fixture for complete validationDefinition of Done
./build.shpasses - 0 warnings, 0 errors./format.shpasses./coverage.shpasses - 81.64% coverage (>80% minimum)