Skip to content

fix(observability): retain explicit verifier invocations - #4630

Merged
lafrancef merged 3 commits into
mainfrom
codex/judge-call-ownership
Oct 28, 2026
Merged

lafrancef merged 3 commits into
mainfrom
codex/judge-call-ownership

Conversation

@giuliolovisotto

@giuliolovisotto giuliolovisotto commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

Judge model calls lacked an explicit verifier owner. Add one VerifierInvocation per verify() execution, including its outcome and distinct model-call references, persisted in ng_trajectory.verifier_invocations.

The shared client propagates an optional correlation header; model capture retains the plain ID and observability reconstructs ownership. Verifier observations return through result/failure payloads and collection persists them. Programmatic verifiers are observed too; no verifier sidecar is written. Missing optional verifier evidence is omitted from failure payloads. The fallback turn builder excludes verifier-owned calls even if an agent also references them, while preserving both ownership claims for validation.

Stack: this PR (Gym evidence) → #5114 (conformance checker support) → #4631 (scripted judge scenario). This PR does not change the conformance checker or scenarios. Existing artifacts are not backfilled; custom routes or clients outside the shared wrappers need explicit integration. Scoring and inference payloads are unchanged. No separate issue is needed for this split of the verifier-ownership fix.

Validation on the rebased stack: 727 collection, verifier-observation and SingleAgentTurn tests; 330 checker/runner tests; 107 conformance CI tests; all-file pre-commit passed. A fresh Simple Agent judge scenario passed on #4631. The fallback exclusion uses Gym model_call_id only, matching the verifier capture path; conflicting agent ownership remains visible for validation. No new external-model run was needed for this saved-evidence projection change. Earlier live HealthBench validation retained one agent call and 19 correctly owned judge calls.

@giuliolovisotto giuliolovisotto added bug Something isn't working area:evaluation Evaluation, rollout collection, reward profiling, comparison, and exporters needs-review PR is ready for code review and waiting on a reviewer labels Oct 15, 2026
@nemo-automation-bot
nemo-automation-bot Bot requested review from a team October 15, 2026 13:13
@github-actions

github-actions Bot commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

@giuliolovisotto
giuliolovisotto force-pushed the codex/judge-call-ownership branch from 1616e1e to 03a4c39 Compare October 15, 2026 13:29
@giuliolovisotto giuliolovisotto changed the title fix(observability): retain verifier call ownership without policy turns fix(observability): retain explicit verifier invocations Oct 15, 2026
@yaoyu-33 yaoyu-33 added the complexity:high Cross-component or shared-contract change with a large review surface label Oct 15, 2026
@github-actions github-actions Bot added the sla:triage-overdue Review assignment is over the one-business-day SLA label Oct 16, 2026
@giuliolovisotto
giuliolovisotto force-pushed the codex/judge-call-ownership branch from 45f4090 to 4b20b91 Compare October 19, 2026 11:28
Base automatically changed from glovisotto/model-call-reader-refactor to main October 19, 2026 19:56
ekellbuch pushed a commit to ekellbuch/Gym that referenced this pull request Oct 19, 2026
… model (NVIDIA-NeMo#4736)

Saved-exchange readers and rollout attachment currently live beside the
model-server transport implementation. Move that code into
`nemo_gym.observability.model_calls`, leaving capture middleware,
streaming reconstruction and persistence in
`base_responses_api_model.py`.

This is the refactor-only prerequisite for NVIDIA-NeMo#4630. All 18 moved
definitions and all definitions remaining in the base-model module have
identical ASTs to the original implementations. Consumers and test patch
targets use the new import locations; 25 reader tests now live in
`test_model_calls.py`, with their assertions unchanged. Verifier IDs,
ownership and lifecycle tracking belong to NVIDIA-NeMo#4630.

Compatibility: old imports remain available through the repository’s
lazy deprecation helper and warn with the replacement path. New code
should import `ModelCallRecord` and the reader/aggregation helpers from
`nemo_gym.observability.model_calls`; the docs example uses that path.
No artifact-format, runtime-behavior or benchmark-result change. A
separate issue is unnecessary: this extracts the structural portion of
NVIDIA-NeMo#4630 for independent review.

Validation of the final review follow-up: 643 focused tests, all-file
pre-commit, Fern validation and `git diff --check` passed. All 20
relocated symbols retain identity through legacy imports, both module
import orders work, and the docs example executes. Before this
follow-up, 1,638 core/conformance tests and 223 adapter tests passed on
main `285224a04` plus the refactor. Live model rollouts: N/A for this
relocation and compatibility shim; the verifier follow-up retains its
live HealthBench validation.

```bash
PYTHONPATH="$PWD" .venv/bin/python -m pytest tests/unit_tests/test_base_responses_api_model.py tests/unit_tests/test_model_calls.py tests/unit_tests/test_rollout_collection.py tests/unit_tests/test_rollout_observability.py -q -o addopts='' --disable-warnings --maxfail=2
.venv/bin/pre-commit run --all-files
(cd fern && npm run check)
git diff --check
```

---------

Signed-off-by: Giulio Lovisotto <[email protected]>
@giuliolovisotto
giuliolovisotto force-pushed the codex/judge-call-ownership branch from 4b20b91 to ae5f3df Compare October 20, 2026 10:35
@giuliolovisotto
giuliolovisotto force-pushed the codex/judge-call-ownership branch from 8276cfd to af6d766 Compare October 26, 2026 16:07
@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/40721854670

This branch was previously deployed

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

Labels

area:evaluation Evaluation, rollout collection, reward profiling, comparison, and exporters bug Something isn't working complexity:high Cross-component or shared-contract change with a large review surface 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