Repository navigation
fix(config): resolve chained _inherit_from so Harbor binds inheriting profiles - #6107
Merged
yaoyu-33 merged 3 commits intoNov 15, 2026
Merged
Conversation
Signed-off-by: yaoyu-33 <[email protected]>
…harbor-config Signed-off-by: yaoyu-33 <[email protected]>
The resolver copied an inherited source from the frozen pre-resolution
snapshot, so in a chain (target -> profile -> base) the profile's own
_inherit_from reached the target unresolved. Harbor hits this whenever
the selected agent profile inherits another instance: it adds a third
link, `<taskset>_agent: {_inherit_from: <profile>}`. Both
nooa_agent/nooa_sandboxed and opencode_sandboxed_search_agent lost their
base fields this way.
Resolve a copy of each dict source before merging it, report cycles
with InheritCycleError, and skip a sibling an earlier move already
consumed instead of re-adding it. Restore nooa_sandboxed.yaml to its
two-line _inherit_from form, which now binds without copying the base
profile's fields.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: yaoyu-33 <[email protected]>
Contributor
Author
|
/ok to test 55e2087 |
ffrujeri
approved these changes
Nov 14, 2026
| # (target -> source -> base) the source's `_inherit_from` would otherwise reach the target | ||
| # unresolved, so resolve a copy of the source first. | ||
| if isinstance(swapped_value, DictConfig): | ||
| swapped_value = self._resolve_swap_source( |
Contributor
There was a problem hiding this comment.
NOTE: The rename map in _recursively_swap_keys follows one link only. For base -> profile -> target, an environment server that names base does not change to target. What is the plan: a fix here, or a note in troubleshooting/configuration.mdx?
Contributor
|
🔄 Merge queue validation started! You can track the progress here: https://github.com/NVIDIA-NeMo/Gym/actions/runs/43665572774 |
Merged
via the queue into
NVIDIA-NeMo:main
with commit Nov 15, 2026
95d5dd5
121 of 124 checks passed
adil-a
added a commit
that referenced
this pull request
Nov 24, 2026
Since #6107, an inherited source is resolved in a detached copy before it is merged into the target. The swap pass read list elements with v[i] and removed _delete_key keys with pop(), and both resolve the value. In the detached copy an interpolation such as `${root_key}` has no root, so an inline list like `run_args: [--env, A=${agent}]` in an inherited block failed with "references 'agent', which is not set after merging". A whole-list reference worked because a scalar is never resolved there. Read list elements as nodes and remove keys with del, so the pass resolves nothing and every interpolation resolves later against the real root. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Adil Asif <[email protected]>
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.
Selecting
nooa_agent/nooa_sandboxedfor a Harbor taskset failed before model execution, for two reasons:_inherit_fromwas never resolved. Harbor adds<taskset>_agent: {_inherit_from: <selected instance>}. When the selected profile itself inherits another instance (agent: {_inherit_from: nooa_agent}), the resolver copied the profile from its frozen pre-resolution snapshot, so the profile's own_inherit_fromreached the generated agent unresolved and the base fields (entrypoint,model_server, ...) were lost. The resolver even carried a TODO for this.opencode_sandboxed_agent/opencode_sandboxed_search_agentbreaks the same way under Harbor.datasetsinto every agent block;NOOAAgentConfig(extra="forbid") now declares it with the existing typedDatasetConfig | BenchmarkDatasetConfig, asBaseRunServerTypeConfigdoes.Changes:
GlobalConfigDictParser._recursively_swap_keys_helperresolves a copy of each dict source (its swap, copy and_delete_keydirectives) before merging it, so every link of a chain applies. A cycle raises the newInheritCycleError. A sibling that an earlier move already consumed is skipped instead of being re-added (with the target listed first, the middle link used to reappear as a second instance).nooa_sandboxed.yamlkeeps its two-line_inherit_from: nooa_agentform, so it does not copy the base profile's fields.NOOAAgentConfig.datasets, plus a Harbor binding regression for the NOOA profile.This is a focused smoke-discovered repair; a separate issue is unnecessary.
Validation (Python 3.13.14):
tests/unit_tests/config/test_global_config.py: 240 passed, including new chain tests (both entry orders,_delete_keyon the middle link, copy of an inheriting source, cycle). All four new tests fail on the previous resolver.tests/unit_tests/config/test_environment_resources_binding.py: 11 passed.benchmarks/terminal_bench_2_1/tests/test_nooa_terminal_bench_2_1.pyon Linux with the pinned NOOA packages: 5 passed, 2 failed. The twotest_nooa_recipe_prepares_and_routes_canonical_terminal_tasksfailures (resources worker default 1 vsNone) also fail on unchangedmain; worker policy is outside this patch. The Harbor binding test fails on the original resolver and passes with the fix.*/*/configs/*.yamlandbenchmarks/*/*.yamlconfigs resolve to identical output with the previous and the new resolver (the same 23 configs error in both), so standalone configs do not change; only chains such as Harbor's generated agent do.opencode_sandboxed_search_agentbound to Harbor now keeps its base fields.tests/unit_tests), with and without this resolver commit: 3118 passed, 15 skipped, 9 failed, 26 errors on both sides, with identical failing test IDs (environmental: an older host git withoutgit init -b, and the two worker-default failures above). The two Harbor files that errored there on git pass on macOS:test_harbor_tasks.py353 passed,test_harbor_manifest.py74 passed.responses_api_agents/nooa_agent/tests/test_config.pyon Linux with NOOA pinned at19caab1: 35 passed.pre-commit runon the changed files: passed.nooa_sandboxed.yamland resolves to the same agent config): Qwen3-VL-8B-Instruct via vLLM, Harbor from feat(terminal_bench_4): run the mini-SWE preset on the Harbor environment server and keep the relay preset as miniswe_legacy_agent #5697 and the provider changes in fix(sandbox): support borrowed Enroot sandboxes and image digests #6105, unchanged TB4 tasksbun-sourcemap-leakandwal-recovery-ordering. Both produced separate verifier results, with 36 successful model-proxy requests and 35 retained tool calls. Both rewards were 0; both native NOOA invocations stopped withLoopDetectedError. Agent/tool and verifier artifacts were inspected, and task rootfs cleanup was empty. Not re-run after the resolver change.This repairs configuration/startup compatibility; it does not claim benchmark accuracy, completed problem solving, or capture-quality qualification. Model-call capture was not enabled in the smoke. Runtime packaging still requires a Git checkout and the pinned NOOA installation prerequisites.
🤖 Generated with Claude Code