Repository navigation
feat(policy): add operator host and hook URL allowlists and run options - #852
Conversation
Add three optional validation policy keys: mcp.allowed_private_hosts (private MCP hosts the operator trusts), hooks.allowed_urls (trusted hook URL prefixes) and endpoints.resolve (whether declared endpoints may be resolved). A new validators module normalizes the allowlists without DNS lookups: at most 64 entries of bounded length, no control, format or surrogate characters, URL prefixes only in hooks.allowed_urls, and no cloud metadata endpoints. Each policy block must be a mapping that holds only its own key. The keys feed the policy digest and appear in the policy summary as counts, only when set, so the default policy's digest and summary are unchanged. The bounded policy loader is unchanged. Add a frozen run options dataclass to evaluation/options.py. It validates its load mode, lift mode, MCP probe switch and environment grants, trial retries, allowlists and policy on construction; the grant bounds are module constants. It is not exported from skillevaluator.evaluation. Accept an optional top-level block with load and lift_mode keys, and harbor.trial_retries (0 to 5), in evals/config.yml. The new block checks its keys with the existing _unknown_keys helper, like the top level and the harbor, skill_workspace and grading sections, so a non-string key such as 1, yes or ~ is reported as a config error instead of raising TypeError. Add a helper to tier3/results_location.py that picks a results directory from an explicit path, SKILLEVALUATOR_RESULTS_DIR or <root>/results, without creating it. No check, probe or Tier 3 step uses the new policy keys or the values of the new evals/config.yml keys, and no CLI command or public API entry point reaches the options dataclass or the results helper yet, so no check, finding or score changes. A policy file with mcp, hooks or endpoints blocks is now validated instead of having them ignored with a warning, and an evals/config.yml with the new keys now loads instead of being rejected. The existing public-policy compatibility test now asserts that these keys change the digest and appear in the summary only as counts. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Narendran Raghavan <nraghavan@nvidia.com>
rng1995
left a comment
There was a problem hiding this comment.
Thanks @rng1995 for this contribution. The new policy allowlists, run options and evals/config.yml settings parse cleanly in the common cases. However, some inputs load when they should fail or are silently ignored, a parsing change that users will see has no CHANGELOG entry, and several of the new rules have no tests. 10 findings: 10 P3.
Outside the changed lines:
tests/validators/test_public_plugin_policy.py(line 92): P3: This is the only test input with an invisible format character, and it does not pin the control/format-character guard. Both that guard andurl_ambiguitiesreject this input, so removing either one alone leaves the test passing. No host-list case uses an invisible character. Without the category check,mcp.allowed_private_hosts: ["localhost"]loads: the stored entry keeps the zero-width space, whileHostAllowlistreduces it tolocalhost.
Suggested fix: add ["localhost"] and ["localhost\u0000"] to test_invalid_mcp_host_entries_fail_closed with match="control or invisible". Also add a hook URL case that only url_ambiguities rejects, such as one with a percent-encoded host.
Host entries can no longer contain '%'. The host matcher percent-decodes an entry, so %2A, a%20b or 0.0.0.0%2F0 loaded as names or networks that had skipped the syntax checks. A host that starts with '.' (the error points to the '*.suffix' form) or has an empty label is rejected, and the host of a URL entry follows the same wildcard and label rules, so http://*/ no longer loads. With --backend nemo-gym, the config check rejects harbor.trial_retries above 0 and the load and lift_mode settings of the new top-level block, which no Gym run reads. Limit the run options docstring to what the class does. Add CHANGELOG entries for the policy and evals/config.yml parsing changes. Add tests for the evals/config.yml settings, the run options bounds and allowlists, the allowlist normalizer and parser rules, and the results-directory helper. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Narendran Raghavan <nraghavan@nvidia.com>
…ettings Match hook URL prefixes to exact hosts, keep bare wildcard patterns, and reject dead host labels with leading or trailing hyphens. Report plugin settings ignored during ordinary Harbor skill runs. Signed-off-by: Narendran Raghavan <nraghavan@nvidia.com>
Signed-off-by: Narendran Raghavan <nraghavan@nvidia.com>
The host matcher folds fullwidth forms to ASCII, so a host entry such as a fullwidth at sign, colon or slash loaded as a name that no host can match. Run the whitespace, reserved-character and IP-network checks on the NFKC form of the entry as well, and cover the fullwidth spellings in the invalid host entry cases. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Narendran Raghavan <nraghavan@nvidia.com>
rng1995
left a comment
There was a problem hiding this comment.
Thanks @rng1995 for this contribution. The latest commits fix the earlier comments, including the wildcard URL prefix, but fullwidth characters still get host entries past the syntax checks, and the PR description no longer matches the last two commits. 2 findings: 2 P3.
chrisknvidia
left a comment
There was a problem hiding this comment.
The fullwidth folding fix does what the thread asked. I re-ran the examples from it at this head: a fullwidth at sign, colon, question mark, hash, backslash, slash and percent in a host entry, and a fullwidth CIDR, are all rejected now, while ü.example.com, 日本.jp, münchen.de, fullwidth letters and digits, fullwidth and ideographic dots, and a decomposed é still load and normalize to the same punycode or ASCII name as their plain spellings; zero-width joiner and zero-width space entries are still refused as invisible characters. The eight new cases fail on the previous head and pass here.
One small regression from the folding inline: an IP literal in fullwidth brackets used to be rejected and now loads as a dead name. Fail-closed, so not blocking.
* feat(tier1): add a runner for the bounded static checks Add a Tier 1 runner (a new module in tier1/) for the existing bounded static-check assembler, which checks a folder whose manifest declares member skills and other components such as hooks and MCP servers. The runner runs those checks with the options of a Tier 1 skill run. No CLI command or public API entry point reaches it yet, so there is no user-visible change. - New runner: check selection and skips, LLM verification, quality settings, PII waivers, policy allowlists, fail-fast, progress and the SkillSpector baseline. Each result is reported under a Tier 1 check name with publication evidence. - Check assembler (tier1/): injectable check factories, fail-fast and progress callbacks. repo_root and the hook URL allowlist reach the dependency and endpoint checks, and a complete tree snapshot records a success detail. - validate_inventory_schema passes repo_root to the dependency records. collect_endpoint_targets adds the hosts of hook URL allowlist prefixes to hook endpoint targets only, not to MCP targets. - Static evidence projection (reporting/): a result counts as blocking only when its canonical status is failed, so a scan that is only incomplete stays incomplete. Only three report modules that no CLI command reaches call the projection. - reporting/base.py: assess_publication no longer counts the quality-score name of a result scoped to a member skill as a separate target identity. The result's publication target is still compared. The tests call the runner directly, because no command routes to it yet. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Narendran Raghavan <nraghavan@nvidia.com> * fix(tier1): report the dependency audit and honor fail-fast in the runner - Tag the dependency audit with its check and report it as "Dependency Vulnerability Audit" under the dependency check, as a skill run does. - Resolve both paths before mapping a SkillSpector baseline into the scan view, and keep the source path when no staged copy exists. - Stop fail-fast after a failed tree staging or endpoint check. - Reject schema in the skip list: the manifest and component check always runs and is reported under it. - Name PII waiver review rows relative to the target, as the PII findings are named. - Add runner tests for these fixes and for the policy, previous version, repo root and continue-on-failure wiring. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Narendran Raghavan <nraghavan@nvidia.com> --------- Signed-off-by: Narendran Raghavan <nraghavan@nvidia.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* feat(tier3): add a workflow for prepared runtime packages Add a Tier 3 workflow function in a new module. Given a source directory with a supported manifest, it validates the component inventory, prepares a runtime package in a temporary wrapper, runs the package through the existing evaluation engine and retains its runtime evidence. Add the engine changes it relies on: the verified authored source for the results root, full repo context and publication identity; bounded setup retries; fail-closed unstaged skill and rule references; MCP probe grant notes before error text; and saved runtime evidence and the report content label for results rebuilt from a run directory. No CLI command or public API entry point reaches the workflow yet; only its tests call it. With no prepared package active, the new source-path hook returns its argument and a Tier 3 result keeps the typed skill path's name, so skill runs keep their behavior. A skill report rebuilt from a run directory keeps the Skill label and gains no warning. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: Christopher Kevin <christopherk@nvidia.com> Signed-off-by: Narendran Raghavan <nraghavan@nvidia.com> * fix(tier3): keep saved run feedback and verifier datasets out of the workflow run - Refresh the run report with the feedback the run saved, so its Insights output and what_to_fix.json are not replaced by rule-based text. - Leave member evaluation directories, including a legacy eval/ dataset, out of full repo context staged from the authored source. - Resolve include, decoy_manifest and price_file from the resolved source. - Refuse a results root inside the source outside results/ (or evals/results/ when evals/ exists), which the source digest would count. - Name the file and the cause when the config or a grader cannot be read. - Add tests for the refusals, the authored settings fallback, the results directory variable and the runner path under prepared-package hooks. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Narendran Raghavan <nraghavan@nvidia.com> * fix(tier3): recognize trusted aliases of plugin results paths Apply the same trusted-root alias normalization as the publication digest and output-directory validator before checking in-source results. Cover mixed macOS path spellings and relative results in an aliased working directory. Signed-off-by: Narendran Raghavan <nraghavan@nvidia.com> --------- Signed-off-by: Narendran Raghavan <nraghavan@nvidia.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: Christopher Kevin <christopherk@nvidia.com>
Signed-off-by: Narendran Raghavan <nraghavan@nvidia.com>
Signed-off-by: Narendran Raghavan <nraghavan@nvidia.com>
Signed-off-by: Narendran Raghavan <nraghavan@nvidia.com>
chrisknvidia
left a comment
There was a problem hiding this comment.
The bracket fix checks out: fullwidth and mixed bracket pairs around IP literals are rejected again with the invalid-address message, while ASCII [::1], [10.0.0.0/8] and [127.0.0.1] still load as networks and match, and the earlier fullwidth rejections hold. Policy tests pass here (2732, ten new bracket cases fail on the previous head).
One thing on the PR itself: #853 and #854 were based on this branch and have been merged into it, so this PR now carries the static-checks runner and the prepared-package workflow as well (about 3,500 added lines across 42 files), but the description still covers only the policy settings. Since the squash commit takes its message from here, please fold the two features into the description before merging. I checked file by file that the squashed hunks match the heads of #853 and #854 that were reviewed clean, so nothing new to re-review on that side.
Summary
This PR adds three settings to the validation policy file, two optional settings to
evals/config.yml, a run options dataclass and a results-directory helper. No check, probe or Tier 3 step uses the new policy settings. The newevals/config.ymlsettings are validated now and read by the prepared-package workflow added separately; no command uses their values yet, Harbor skill runs log a warning that names each of these settings they ignore, and the NeMo Gym backend rejects a config that setsharbor.trial_retriesabove 0,loadorlift_mode. No CLI command or public API entry point reaches the options dataclass or the results-directory helper yet. No check, finding or score changes. The visible effects are limited to parsing, that Harbor warning and that NeMo Gym check: two kinds of existing files now load or fail differently (listed below), and a policy file that sets the new keys gets a different digest and policy summary.What it adds:
mcp.allowed_private_hosts(private MCP hosts the operator trusts),hooks.allowed_urls(trusted hook URL prefixes) andendpoints.resolve(whether declared endpoints may be resolved and checked). Entries are checked without DNS lookups:mcp.allowed_private_hosts) or 2048 characters (hooks.allowed_urls), with no Unicode control, format or surrogate characters. Surrounding whitespace is stripped and duplicates are dropped.HostAllowlistmatcher rules: exact names,*.suffixwildcards, IP addresses and CIDR networks. Whitespace inside an entry,% @ ? # \(the matcher percent-decodes an entry, so%2Awould become*), a*anywhere but a leading*.(so a bare*), a/or:outside an IP address or network (so paths and ports), a host that starts with.(the error suggests the*.suffixform), an empty label such asexample..comand a label with a leading or trailing hyphen such as-are rejected. The matcher folds fullwidth forms to ASCII, so these checks also run on the NFKC form of an entry:user@localhost,example.com:8080and10.0.0.0/99are rejected like their ASCII spellings.hooks.allowed_urlsaccepts host entries too.://are allowed only inhooks.allowed_urls. They must usehttporhttpsand pass the existing hook URL and URL-ambiguity checks, which reject embedded credentials, queries, fragments and percent-encoding in the host. A URL prefix needs an exact host: any*in its host is rejected, sohttp://*/andhttps://*.example.test/fail, and the bare*.example.testhost pattern covers subdomains instead. The host of a URL entry also follows the leading-dot, empty-label and hyphen rules for host entries.169.254.169.254,metadata.google.internalor a hook URL on one of them, is rejected. CIDR entries are not compared with metadata addresses, so169.254.0.0/16loads;HostAllowlist.allowsnever matches a metadata endpoint, whatever the entries.endpoints.resolvemust be a boolean;nullcounts asfalse.nullcounts as absent.nullor an empty list clears either list, andnullorfalseclearsendpoints.resolve.endpoints.resolveonly when they are set. The policy summary that each result records in its metadata gainsmcp_allowed_private_host_count,hook_allowed_url_countandresolve_endpointsonly when they are set, never the hosts or URLs themselves. The default policy's digest and summary are unchanged.skillevaluator.evaluation.options: a frozen dataclass of run controls, all unset by default: a load mode,lift_mode,probe_mcp,probe_mcp_env,trial_retries,repo_root,allowed_private_hosts,hook_allowed_urlsandpolicy. The module also gains the boundsMAX_PROBE_MCP_ENV_GRANTS(64) andMAX_PROBE_MCP_ENV_GRANT_CHARS(512). The dataclass checks every field exceptrepo_rooton construction: the load mode andlift_modetake the values listed forevals/config.ymlbelow,probe_mcpmust be a boolean,trial_retriesan integer from 0 to 5, andprobe_mcp_enva tuple (not a list) of at most 64 strings of at most 512 characters each. The two allowlists follow the policy rules above, andpolicymust be aValidationPolicy. No CLI command constructs it, andskillevaluator.evaluationdoes not export it.evals/config.yml: an optional top-level block withload(wrapper,nativeorauto) andlift_mode(effectiveness,integration,bothorladder), andharbor.trial_retries(an integer from 0 to 5). They are validated now and read by the prepared-package workflow added separately; no command uses their values yet, so skill runs ignore them, and a Harbor skill run logs a warning that names each of these settings it ignores (harbor.trial_retriesonly when above 0). With--backend nemo-gym, the config check rejectsharbor.trial_retriesabove 0 and anyloadorlift_modesetting, as it rejects other settings Gym cannot honor. Unknown keys in the new block are rejected, and so are non-string keys such as1,yesor~, which fail with a... keys must be stringserror that names the block. This is the check that the top level and theharbor,skill_workspaceandgradingsections already apply. The new block with no value (YAML null) is rejected as not being a mapping and the block set to{}loads, while aharbor:with no value still counts as absent.tier3/results_location.py: given a root directory and an optional requested path, it returns the requested path when given, elseSKILLEVALUATOR_RESULTS_DIR(with~expanded), else<root>/results, and creates nothing.Two cases change for existing files:
mcp,hooksorendpointskey:mainlogsIgnoring unknown top-level key(s)and drops it. With this PR the block is parsed and validated: a malformed block is an error, and a valid one changes the digest and policy summary as described above.evals/config.ymlwith the new top-level block orharbor.trial_retries:mainrejects it as an unknown top-level key, or withunknown harbor key(s): trial_retries. With this PR a valid setting loads and no command uses it (a Harbor skill run warns that it ignores it), except that--backend nemo-gymrejectstrial_retriesabove 0,loadandlift_modewith an error that names the setting. A malformed one is still rejected, with an error that names the block or key.main's bounded policy loader (_load_policy_yaml, from #812) is unchanged.Changes
src/skillevaluator/validators/(new module): the allowlist normalizer, its host-pattern check (shared by host entries and the host of a URL entry), the strict policy block parser andoverlay_sets. The URL and host helpers are imported only for a non-empty list, so default policies stay cheap.src/skillevaluator/validators/policy.py: the threeValidationPolicyfields and their__post_init__validation; the digest andto_dictadditions;mcp,hooksandendpointsadded to the known top-level keys; parsing in_policy_from_data; overlay handling inload_policy_file.src/skillevaluator/evaluation/options.py: the run options dataclass (its docstring says it only holds and validates the fields),MAX_PROBE_MCP_ENV_GRANTSandMAX_PROBE_MCP_ENV_GRANT_CHARS. The module importsValidationPolicyat module level so thepolicyannotation resolves, and importingskillevaluator.evaluationnow also loadsskillevaluator.validators, 137 more modules in all (528 instead of 391 in a fresh interpreter, with the Python 3.12 environment used for the tests below).src/skillevaluator/tier3/evals_config.py: the new top-level block andharbor.trial_retries. The new block checks its keys with the existing_unknown_keyshelper, like the top level and theharbor,skill_workspaceandgradingsections.src/skillevaluator/tier3/results_location.py: the results-directory helper.src/skillevaluator/tier3/harbor/runner.py: when no prepared runtime hooks are installed, a Harbor skill run logs one warning that names each new top-level block setting and a nonzeroharbor.trial_retries, the settings it ignores.src/skillevaluator/tier3/nemo_gym/backend.py:nemo_gym_config_errorsrejectsharbor.trial_retriesabove 0 and eachloadorlift_modesetting of the new block. Zero retries is Gym's own behavior, so it loads.CHANGELOG.md: twoUnreleased/Changedentries, one for the policy keys (the error for a malformed block, the digest and summary change) and one for theevals/config.ymlkeys (now accepted, used by no command yet, named in a Harbor skill run warning, rejected by NeMo Gym). The policy entry also says a hook URL prefix needs an exact host.tests/validators/(new policy test module, 68 tests): the default digest and summary stay compatible; allowlists are typed, order-independent and summarized as counts; entries are stripped and deduplicated; existing host patterns stay valid, and a bare*.suffixhost pattern loads beside an exact URL prefix; each invalid host entry, hook URL prefix andendpoints.resolvevalue is rejected with its own error text (including@ ? # \and their fullwidth forms, a fullwidth:or/outside an IP network, percent-encoded hosts, a leading., an empty label, a hyphen-only label, zero-width and NUL characters,http://*/, a*.suffixURL prefix host and a percent-encoded URL host); overlays keep omitted keys and allow explicit clearing; anullblock keeps the base value andresolve: nullclears it; unknown block shapes are rejected.tests/cli/test_private_foundations_public_compatibility.py:main'stest_private_policy_keys_do_not_change_public_policyasserted that these policy keys were ignored, which is no longer true. It is renamed and now asserts that the keys change the digest, appear in the summary only as counts, and leave every other summary field unchanged. The rest of the file is unchanged.tests/tier3/(new test module, 8 tests, 21 cases): run options validation.trial_retriesrejects -1, 6,Trueand 1.5;probe_mcp_envrejects a list, 65 grants, a 513-character grant and a non-string grant, and accepts 64 grants of 512 characters; both allowlists follow the policy rules and are stripped and deduplicated; the load mode,lift_modeandprobe_mcpreject invalid values;policyrejects a profile name or a dict; andEvaluationOptions.engine_kwargs()never includes the load mode,lift_mode,probe_mcportrial_retries. It imports the dataclass fromskillevaluator.evaluation.options, becauseskillevaluator.evaluationdoes not export it.tests/test_tier3_progress.py: one new test: a Harbor skill run whose config setsharbor.trial_retries: 2,loadandlift_modelogs the warning and names all three settings.tests/tier3/test_evals_config.py: a case for the new block inmain'stest_load_evals_config_rejects_non_string_keys, which already covers the other mappings whose keys_unknown_keyschecks (the top level,harbor,harbor.resources,harbor.agents.<name>,skill_workspaceandgrading). Two new tests (11 cases):load: native,lift_mode: ladderandtrial_retriesof 0 and 5 load with those values;trial_retriesof 6, -1,trueand 1.5, a badloadorlift_mode, an unknown key in the block, and a null or list block are rejected with an error that names the field.tests/test_results_location.py: one new test (4 cases) for the results-directory helper: a requested path wins,SKILLEVALUATOR_RESULTS_DIR=~/...expands the home directory, an empty or unset variable gives<root>/results, and nothing is created.tests/test_nemo_gym_backend.py: two new tests (4 cases):nemo_gym_config_errorsreportsharbor.trial_retries: 2,loadandlift_mode, and acceptstrial_retries: 0with the new block set to{}.Verification
make lintmake testmake buildRan locally (Python 3.12, Harbor 0.25.0,
pytest -n 3). The first bullet is at this PR's head; the bullets after it, up to theruffbullet, ran at the PR's first commit, before the review fixes in the second commit:After the review fixes: the focused set below gives 633 passed (586 before, plus the 47 new cases). 34 modules (every test module that mentions NeMo Gym, the run options or the allowlist module, or reads
CHANGELOG.md, plus the changed policy, evals-config and results-location test modules,tests/test_tier3_config_key_parity.pyandtests/validators/test_policy.py): 2,180 passed, 3 skipped. The PR's 6 changed test files against the first commit's source: 17 failed, 453 passed, 2 skipped (Linux-only); the 17 are exactly the new rejection cases (13 host or URL entries, 1 run options entry, 3 NeMo Gym settings). The same 6 files againstmain's source: 76 failed, 373 passed, 2 skipped and 1 collection error (the newtests/tier3/module cannot import the run options dataclass); only the default digest and summary test of the new policy module passes there. With--backend nemo-gym,nemo_gym_preflight_errorson a copy oftests/fixtures/skills/simplewhose config setstrial_retries: 3,loadandlift_modelists the three settings first.validate --policywith.corp.example,%2Aorhttp://*/exits 1 with a one-lineError: ...and no traceback. Each mutation named in the review (dropping the> 5bound, the stored value, the_enumcheck, the unknown-key error or the mapping check; disabling theprobe_mcp_envguard or either allowlist normalization; removing the dedupe, the.strip(), the@?#\check, the control-character check or the URL-ambiguity check; makingresolve: nullraise; and ignoring the requested path, the environment variable or the~expansion in the results-directory helper) now fails a test, as does dropping the new NeMo Gymtrial_retriescheck.Focused set: the 3 new or renamed test groups above (33 policy tests, 12 run options cases, and the 9 tests of
tests/cli/test_private_foundations_public_compatibility.py), plusmain's policy, evals-config, results-location, CLI golden-surface and docs-test selection tests (tests/validators/test_policy.py,tests/test_quality_policy_gate.py,tests/test_unbounded_yaml_parsers.py,tests/tier3/test_evals_config.py,tests/test_evals_config_branding.py,tests/test_results_location.py,tests/test_results_location_legacy_compatibility.py,tests/golden/,tests/test_select_docs_tests.py): 586 passed. The CLI surface golden file is unchanged.Broad set: 164 test modules: every module that imports or uses the policy module,
skillevaluator.evaluationor its options module,tier3.evals_configortier3.results_location;tests/golden/,tests/test_oss_packaging.py,tests/test_select_docs_tests.pyand the 4 changed test files; and 7 modules that reach the changed code through shared test helpers. Result: 12,973 passed, 91 skipped, 21 failed. The same 21 tests fail on unchangedmainin the same environment, with the same assertion text, so none is caused by this PR:tests/tier3/test_mcp_proof.py,tests/tier3/test_mcp_proof_sdk_compat.py,tests/tier3/test_private_evidence_review2.py): the localmcp1.23.3 has nomcp.client.streamable_http.streamable_http_client;pyproject.tomlrequiresmcp>=1.28.1.tests/test_tier3_public_runtime.py, withUnexpected auth header.tests/ci/test_run_tiers.py::test_consumer_python_module_cannot_shadow_installed_evaluator, whose child interpreter fails in this environment.5 more modules (
tests/test_base_install.py,tests/test_tier3_config_key_parity.py,tests/validators/test_hygiene.py,tests/validators/test_hygiene_link_boundaries.py,tests/test_ci_workflows.py): 240 passed.The 4 changed test files against
main's source: 34 failed, 111 passed and 1 collection error (the newtests/tier3/module cannot import the run options dataclass). The failures are 32 of the 33 new policy tests, the renamed compatibility test and the newtest_evals_configcase; the policy test that passes is the one that checks the default digest and summary stay compatible.The new
test_evals_configcase catches a real crash: against an earlier revision of this change that built the new block's unknown-key set directly, it fails withTypeError: sequence item 0: expected str instance, int found, and the other 8 cases pass. With_unknown_keys, all 9 pass.CLI on a copy of
tests/fixtures/skills/simple, with a scratchHOMEand an empty environment, on this branch and onmain:evals/config.ymlwhose new block has the key1:tier3 evaluateexits 2 with the... keys must be stringserror (main: exit 2, rejecting the block as an unknown top-level key).tier3 validatereports that error and exits 1 (main: the unknown-key error, exit 1).validate --tiers 1,3 --skip security,secrets -r jsonprints no traceback and writes its JSON report, which records the same error; it exits 1 for this skill on both trees.load: native) andharbor.trial_retries: 2:tier3 validatemarksevals/config.ymlas ok (its one error is the skill's missingevals/evals.json), andtier3 evaluategets past the config and stops because no model provider is configured (exit 1).mainreports the unknown top-level key in both (exit 1 and exit 2).validate --tiers 1 --skip security,secrets --policy <file>: 5 malformedmcp,hooksorendpointsblocks each give a cleanError: ...and exit 1, wheremainwarnsIgnoring unknown top-level key(s). With a valid policy, the JSON report differs frommain's only in the policy digest and the three new summary fields (apart from temp-path-derived IDs), and contains no host or URL text.With the default policy,
validate --tiers 1and--tiers 1,2(with--skip security,secrets) ontests/fixtures/skills/simplegive JSON reports identical tomain's apart fromgenerated_atand the policy source path.Load fuzzing: 123
evals/config.ymlvariants raise onlyEvalsConfigError. 356 policy allowlist entries, list shapes and whole policy files raise onlyValueErrororFileNotFoundError, which the CLI reports as errors, and withsocket.getaddrinfoandgethostbynamepatched to raise, none of them makes a DNS lookup.ruff check src tests(make lint): passed at this PR's head;ruff format --checkpasses on every changed file.Release Impact
CHANGELOG.mdTwo
Unreleased/Changedentries cover the visible effects: the two parsing cases above, on files thatmainrejects (evals/config.ymlwith these settings) or warns about and ignores (a policy file with these blocks); the digest and policy summary of a policy file that sets the new keys; and the NeMo Gym rejection of the newevals/config.ymlsettings. No check, probe or Tier 3 step uses the new settings yet, so no check, finding or score changes.🤖 Generated with Claude Code