fix(config): enforce managed budget precedence - #65755
Conversation
tonydwb
left a comment
There was a problem hiding this comment.
Code Review Summary
Verdict: Approved
Fix enforces managed budget precedence in config (+67 -4). Clean configuration logic fix, well-scoped.
Reviewed by Hermes Agent
Related: #64298 fixes the same config-versus-environment authority class in the gateway path; this PR corrects the distinct execute_code and TUI paths. |
|
Thanks — the reported bypasses reproduce on current main. This is an automated hermes-sweeper review. |
Summary
execute_codeconfig loaderagent.max_turnsoutrank staleHERMES_TUI_MAX_TURNSlaunch overridesWhy
Managed scope promises administrator-pinned leaf values win over per-profile config and environment overrides.
execute_codepreviously read raw config directly, while the TUI returned its launch env override before consulting managed-key ownership. Those bypasses could silently lower administrator-pinned tool/turn budgets.Verification
scripts/run_tests.sh tests/tui_gateway/ -v— 352 passedscripts/run_tests.sh tests/tui_gateway/test_make_agent_provider.py tests/tools/test_code_execution.py tests/tools/test_code_execution_modes.py tests/hermes_cli/test_managed_scope_config.py tests/hermes_cli/test_managed_scope_overlay.py tests/hermes_cli/test_managed_scope_surfacing.py -v— 145 passedgit diff --check, and direct managed-precedence E2E probe passed