Commit 9b956f0
fix: discard invalid component pro: map instead of passing it through
CodeRabbit review (PR #2883, discussion_r3729413928): extractComponentSections
assigned result.ComponentPro before schema.DecodeComponentPro validated it, so
a typo'd pro: {enable: false} (meant "enabled") still flowed downstream as the
raw map. pro.ResolveSection ignores unrecognized keys, so the typo silently
resolved to Pro's default-enabled behavior -- the opposite of what the user
wrote. Now the raw map is only assigned after decoding succeeds; the warning
stays non-fatal so sibling components still process. Updated
TestProcessStackConfig_ProSectionUnknownKeyDoesNotBlockProcessing to assert
the pro: section is absent (not silently enabling Pro) rather than passed
through unchanged.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>1 parent af4fb71 commit 9b956f0
2 files changed
Lines changed: 17 additions & 13 deletions
Lines changed: 10 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
73 | 75 | | |
74 | 76 | | |
75 | 77 | | |
| 78 | + | |
| 79 | + | |
76 | 80 | | |
77 | 81 | | |
78 | 82 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1635 | 1635 | | |
1636 | 1636 | | |
1637 | 1637 | | |
1638 | | - | |
1639 | | - | |
1640 | | - | |
1641 | | - | |
| 1638 | + | |
| 1639 | + | |
| 1640 | + | |
| 1641 | + | |
| 1642 | + | |
1642 | 1643 | | |
1643 | 1644 | | |
1644 | 1645 | | |
| |||
1680 | 1681 | | |
1681 | 1682 | | |
1682 | 1683 | | |
1683 | | - | |
1684 | | - | |
1685 | | - | |
| 1684 | + | |
| 1685 | + | |
1686 | 1686 | | |
1687 | 1687 | | |
1688 | 1688 | | |
| |||
0 commit comments