Skip to content

fix(conformance): recognize verifier invocation ownership - #5114

Merged
giuliolovisotto merged 2 commits into
mainfrom
glovisotto/verifier-invocation-checks
Oct 29, 2026
Merged

giuliolovisotto merged 2 commits into
mainfrom
glovisotto/verifier-invocation-checks

Conversation

@giuliolovisotto

@giuliolovisotto giuliolovisotto commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

The evidence checker treats every captured model call as an agent call, so a judge call owned by a VerifierInvocation fails ownership and policy-step accounting.

Extend the existing P0 invocation schema and relationship checks to include ng_trajectory.verifier_invocations. Each call still requires exactly one owner. Explicit verifier calls are excluded from policy steps; missing targets, duplicate ownership and verifier calls linked to policy steps fail. Invocation schema diagnostics use the trajectory root so reported error paths identify the actual malformed agent or verifier field.

Stack: #4630 (Gym verifier evidence) → this PR (checker support) → #4631 (scripted judge scenario). This PR changes only the checker and its regression tests; it adds no scenario or producer behavior. No separate issue is needed for this split of #4630.

Validation:

  • python -m pytest scripts/harness_conformance/tests tests/unit_tests/harness_capabilities -q: 371 passed, 2 skipped.
  • pre-commit run --all-files: passed.
  • Four exact-path regressions fail before the diagnostic-prefix fix and pass afterward. Additional coverage preserves valid records with absent/empty verifier collections or programmatic verifiers with no model calls; the existing payload-redaction regression also passes.
  • Model rollouts: N/A for this checker-only update; no agent, verifier execution, or model request behavior changes.

Addresses the diagnostic-location review note. Full repository CI for the latest commit has not been validated here.

@nemo-automation-bot
nemo-automation-bot Bot requested review from a team October 27, 2026 12:29
@svcnvidia-nemo-ci svcnvidia-nemo-ci added area:agent Agent harnesses and Responses API agent behavior bug Something isn't working needs-review PR is ready for code review and waiting on a reviewer labels Oct 27, 2026

@svcnvidia-nemo-ci svcnvidia-nemo-ci left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SHIP — verifier ownership and policy-step accounting look sound; one non-blocking diagnostic-location NOTE.

Reviewed both changed files and traced the affected producer contracts, reference resolution, reporting, and HTTP-error/compaction preservation cases. Static review only; tests were not executed.

Note: formal approval is not available for this request, so this review is posted as a comment only.

Review generated by codex. This was a full review. Request a full review with /review reset=true.

tier="P0",
evidence=("TE-8",),
location="$.ng_trajectory.invocations",
location="$.ng_trajectory['invocations','verifier_invocations']",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NOTE — suggestion: align schema diagnostic locations with the validated root

Both changed schema checks validate the entire trajectory, but their location selects its child collections. SchemaCheck.evaluate appends the schema error’s absolute path to that prefix. For example, adding verifier_invocations=[{"model_calls": []}] to an otherwise valid record produces $.ng_trajectory['invocations','verifier_invocations'].verifier_invocations[0], rather than the actual failing object at $.ng_trajectory.verifier_invocations[0]. Validation still fails correctly, but persisted diagnostic JSONPaths point to the wrong location; malformed agent invocations now have the same problem.

Could you use the trajectory root here:

Suggested change
location="$.ng_trajectory['invocations','verifier_invocations']",
location="$.ng_trajectory",

and make the same replacement in invocations.references? The invariant is that the location prefix matches the root of value before schema-relative paths are appended. Keep the schemas, prerequisites and semantic-check locations unchanged. Source tracing supports this small correction; please verify before adopting it.

Preservation and proposed acceptance checks — not executed: separately remove the ID from an agent invocation and a verifier invocation; identity failures should include $.ng_trajectory.invocations[0] and $.ng_trajectory.verifier_invocations[0], respectively. Setting verifier model_calls to null should report $.ng_trajectory.verifier_invocations[0].model_calls. Valid legacy records, absent/empty verifier collections, and programmatic verifier invocations with model_calls=[] should retain their passing statuses; missing required agent invocations should retain existing blocked failures. Preserve the exact-path and payload-redaction assertions in test_schema_failure_reports_field_path_without_payload_or_definition.

stacked auto-merge was automatically disabled October 29, 2026 08:28

Auto-merge was disabled for another pull request in the stack

@giuliolovisotto
giuliolovisotto added this pull request to the merge queue Oct 29, 2026
@github-actions

Copy link
Copy Markdown
Contributor

🔄 Merge queue validation started! You can track the progress here: https://github.com/NVIDIA-NeMo/Gym/actions/runs/40842447984

Merged via the queue into main with commit 4d20a79 Oct 29, 2026
55 of 58 checks passed
@giuliolovisotto
giuliolovisotto deleted the glovisotto/verifier-invocation-checks branch October 29, 2026 09:09

This branch was previously deployed

1 inactive deployment
public — 6010fcca Deployed Oct 28, 2026 by copy-pr-bot[bot] via release / finalize / notify #7824
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:agent Agent harnesses and Responses API agent behavior bug Something isn't working needs-review PR is ready for code review and waiting on a reviewer

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants