Skip to content

Fix config merge: global defaults now override agent built-ins#78

Merged
JAORMX merged 2 commits intomainfrom
config-precedence
Mar 23, 2026
Merged

Fix config merge: global defaults now override agent built-ins#78
JAORMX merged 2 commits intomainfrom
config-precedence

Conversation

@JAORMX
Copy link
Copy Markdown
Contributor

@JAORMX JAORMX commented Mar 23, 2026

Summary

  • The Merge() function had a result.DefaultXxx == 0 && guard that prevented global config defaults from overriding non-zero agent built-in values for CPUs, Memory, and TmpSize. Since all built-in agents define non-zero defaults, the defaults: config section was effectively dead code. Remove the guard so precedence is: override > global default > agent default.
  • Adds 4 focused test functions covering the regression, per-field independence, global defaults clamping, and orthogonality with egress profile tightening.

Test plan

  • All new and existing TestMerge* tests pass
  • CI passes

🤖 Generated with Claude Code

JAORMX and others added 2 commits March 23, 2026 12:53
The Merge() function had a `result.DefaultXxx == 0 &&` guard that
prevented global config defaults from overriding non-zero agent
built-in values. Since all built-in agents define non-zero defaults,
the `defaults:` config section was effectively dead code. Remove the
guard so precedence is: override > global default > agent default.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Tests guard the fix where global defaults now override non-zero agent
built-in resource values. Covers per-field independence, clamping of
global defaults, and orthogonality with egress profile tightening.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@JAORMX JAORMX changed the title Add regression tests for config merge precedence fix Fix config merge: global defaults now override agent built-ins Mar 23, 2026
@JAORMX JAORMX merged commit 5deb848 into main Mar 23, 2026
6 of 8 checks passed
@JAORMX JAORMX deleted the config-precedence branch March 23, 2026 11:43
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