Repository navigation
feat(cli): document ng_init_resources_server generated config inline (#1205 friction #7) - #1597
Merged
Merged
Conversation
Contributor
|
/ok to test 192a7f3 |
cmunley1
reviewed
Jun 15, 2026
cmunley1
reviewed
Jun 15, 2026
cmunley1
reviewed
Jun 15, 2026
cmunley1
reviewed
Jun 15, 2026
Contributor
Author
|
/ok to test adb1c3c |
cmunley1
approved these changes
Jun 15, 2026
wprazuch
force-pushed
the
wprazuch/generated-config-comments
branch
from
June 15, 2026 13:59
adb1c3c to
512a4d0
Compare
Contributor
Author
|
/ok to test 512a4d0 |
Generated server configs shipped with zero comments β new authors couldn't tell what each field meant or which values were valid without consulting external docs (#1205 friction point #7). Add inline comments to every field in the generated template (server type, domain values, cross-references, dataset splits, license). Also emit 'verified: false' in the generated resources_servers block so the add-verified-flag pre-commit hook is a no-op: its yaml.safe_load + yaml.dump round-trip would otherwise rewrite the file and strip the new comments on the author's first commit. Test asserts the hook leaves the generated config byte -for-byte unchanged. Addresses #1205 friction point #7. Signed-off-by: Wojciech Prazuch <wprazuch@nvidia.com>
Fact-checked the generated comments against the code: - simple_agent isn't single-turn (it runs a tool-calling loop bounded by max_steps) β drop the 'single-turn' wording. - num_repeats repeats each example N times (pass@k/mean@k), not 'rollouts per task'. - note huggingface_identifier as an alternative to gitlab_identifier (both are first-class). Signed-off-by: Wojciech Prazuch <wprazuch@nvidia.com>
- reword resources_server comment (tools, state and verification) - rephrase agent server config header - drop 'capability under test' framing on domain (eval-only connotation) - remove gitlab_identifier from generated train/validation splits; note remote source as opt-in (gitlab/huggingface are Optional) Signed-off-by: Wojciech Prazuch <wprazuch@nvidia.com>
wprazuch
force-pushed
the
wprazuch/generated-config-comments
branch
from
June 15, 2026 14:04
512a4d0 to
c720c42
Compare
Contributor
Author
|
/ok to test c720c42 |
1 similar comment
Contributor
Author
|
/ok to test c720c42 |
wprazuch
enabled auto-merge (squash)
June 15, 2026 14:13
Contributor
Author
|
/ok to test c720c42 |
1 similar comment
Contributor
Author
|
/ok to test c720c42 |
Contributor
|
/ok to test c720c42 |
wprazuch
added a commit
that referenced
this pull request
Jun 22, 2026
β¦1205 friction #7) (#1597) ## Friction point #7 β "No inline documentation in generated configs" `ng_init_resources_server` generated a config with **zero comments**, so a new author had no way to tell what `domain: other` should be, what `type: resources_servers` meant, that `policy_model` is resolved elsewhere, or which fields are required β without reading external docs. This is friction point 7 in #1205 (also relates to #191). ## Change Add inline `#` comments to every field in the generated template β server type, the full list of valid `domain` values, the cross-reference structs, dataset splits, and the license requirement. The `domain` comment lists the values factually ("change 'other' to the closest fit") and deliberately does **not** editorialize the taxonomy (that's the separate #600 discussion). ### Generated config, after ```yaml # Resources server: owns this environment's task verification (verify()) and reward. my_server_resources_server: # instance name β how agents/CLI refer to this server resources_servers: # server type: resources_servers | responses_api_agents | responses_api_models my_server: # implementation directory under resources_servers/ entrypoint: app.py # server entry module domain: other # capability under test; one of: math, coding, agent, knowledge, # instruction_following, long_context, safety, games, translation, # e2e, rlhf, other. Change 'other' to the closest fit. verified: false # set true once the benchmark has been baselined and reviewed ... ``` ## Why `verified: false` is now in the template The `add-verified-flag` pre-commit hook (`scripts/add_verified_flag.py`) rewrites a resources-server config via `yaml.safe_load` + `yaml.dump` **whenever `verified` is missing** β which strips all comments. Since generated configs previously had no `verified` field, that hook would have nuked these new comments on the author's first commit. Emitting `verified: false` in the template makes the hook a **no-op**, so the comments survive. No hook change, no new dependency. ## Testing `test_init_resources_server_includes_domain` extended to assert: the generated config still parses and validates, `verified: false` is present, inline comments exist, and β crucially β running `ensure_verified_flag` on the generated file returns `False` and leaves it **byte-for-byte unchanged** (comments preserved). `pytest tests/unit_tests/test_cli.py` 14/14, ruff clean. Pure additive change β only affects what new servers get generated; existing configs and runtime behavior are untouched. --------- Signed-off-by: Wojciech Prazuch <wprazuch@nvidia.com>
wprazuch
added a commit
that referenced
this pull request
Jun 24, 2026
β¦#1633) ## What Adds a docstring to the `Domain` enum in `config_types.py` β a one-line description per value with a recognizable example benchmark, plus guidance to **pick the most specific domain** and use `other` only as a catch-all (addresses the [#600](#600) 'agent is too broad / no guidance' concern **without** redefining the taxonomy). ``` math β mathematical problem solving (e.g. AIME, MATH, GSM8K). coding β code generation, repair, or execution (e.g. SWE-bench, LiveCodeBench). agent β multi-step, tool-using tasks (e.g. tau2, workplace_assistant). Prefer a more specific value when it fits. ... (knowledge, instruction_following, long_context, safety, games, translation, e2e, rlhf, other) ``` ## Why Epic [#1205](#1205) friction 9 (naming confusion). Surfaces on IDE hover and when reading `config_types`; complements the inline `domain` comment added in #1597. ## Tests `test_domain_enum_documents_every_value` asserts every `Domain` value appears in the docstring, so a newly-added domain can't ship undocumented. --------- Signed-off-by: Wojciech Prazuch <wprazuch@nvidia.com>
ritaneves
pushed a commit
that referenced
this pull request
Jun 25, 2026
β¦#1633) ## What Adds a docstring to the `Domain` enum in `config_types.py` β a one-line description per value with a recognizable example benchmark, plus guidance to **pick the most specific domain** and use `other` only as a catch-all (addresses the [#600](#600) 'agent is too broad / no guidance' concern **without** redefining the taxonomy). ``` math β mathematical problem solving (e.g. AIME, MATH, GSM8K). coding β code generation, repair, or execution (e.g. SWE-bench, LiveCodeBench). agent β multi-step, tool-using tasks (e.g. tau2, workplace_assistant). Prefer a more specific value when it fits. ... (knowledge, instruction_following, long_context, safety, games, translation, e2e, rlhf, other) ``` ## Why Epic [#1205](#1205) friction 9 (naming confusion). Surfaces on IDE hover and when reading `config_types`; complements the inline `domain` comment added in #1597. ## Tests `test_domain_enum_documents_every_value` asserts every `Domain` value appears in the docstring, so a newly-added domain can't ship undocumented. --------- Signed-off-by: Wojciech Prazuch <wprazuch@nvidia.com> Signed-off-by: Rita Fernandes Neves <rfernandesne@nvidia.com>
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.
Friction point #7 β "No inline documentation in generated configs"
ng_init_resources_servergenerated a config with zero comments, so a new author had no wayto tell what
domain: othershould be, whattype: resources_serversmeant, thatpolicy_modelis resolved elsewhere, or which fields are required β without reading external docs. This is
friction point 7 in #1205 (also relates to #191).
Change
Add inline
#comments to every field in the generated template β server type, the full list ofvalid
domainvalues, the cross-reference structs, dataset splits, and the license requirement.The
domaincomment lists the values factually ("change 'other' to the closest fit") anddeliberately does not editorialize the taxonomy (that's the separate #600 discussion).
Generated config, after
Why
verified: falseis now in the templateThe
add-verified-flagpre-commit hook (scripts/add_verified_flag.py) rewrites a resources-serverconfig via
yaml.safe_load+yaml.dumpwheneververifiedis missing β which strips allcomments. Since generated configs previously had no
verifiedfield, that hook would have nukedthese new comments on the author's first commit. Emitting
verified: falsein the template makesthe hook a no-op, so the comments survive. No hook change, no new dependency.
Testing
test_init_resources_server_includes_domainextended to assert: the generated config still parsesand validates,
verified: falseis present, inline comments exist, and β crucially β runningensure_verified_flagon the generated file returnsFalseand leaves it byte-for-byteunchanged (comments preserved).
pytest tests/unit_tests/test_cli.py14/14, ruff clean.Pure additive change β only affects what new servers get generated; existing configs and runtime
behavior are untouched.