Skip to content

feat: validate designated trajectory evidence - #4042

Merged
giuliolovisotto merged 7 commits into
codex/harness-check-registryfrom
codex/harness-rfc-checks
Oct 6, 2026
Merged

giuliolovisotto merged 7 commits into
codex/harness-check-registryfrom
codex/harness-rfc-checks

Conversation

@giuliolovisotto

@giuliolovisotto giuliolovisotto commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

Stacked on #4041. Validate each piece of evidence once at its designated saved location, with JSON Schema for fields and explicit semantic checks for relationships. Missing collections block dependent checks without invalidating unrelated evidence.

  • Keep call, step, tool, grading and sandbox requirements; resolve invocation/call references against canonical targets. All supplied reference identifiers must agree, and ambiguous targets fail.
  • Replace blanket Python-model validation and cross-copy reconciliation. Do not repeat Gym-owned uniqueness, clock-order or provider-usage normalization checks.
  • Retain independent comparisons with scripted exchanges, response metadata, token counts and tool outcomes. A behavioral failure does not erase artifact passes.
  • Emit one table per harness, with individual check rows grouped as Schema, Semantic and Behavioral, scenario columns, and compact status symbols. Process status stays separate. Missing normal rollouts leave artifact checks unassessed.

The profile is gym-p0/v3. Check IDs, report format and authoritative locations change; regenerate existing reports. TE labels only group results. ng_trajectory supplies calls, steps, invocations and tool executions; sandbox/compaction observations retain their explicitly designated source. Capture sidecars are provenance only. Benchmark execution and scoring code are unchanged.

Validation:

  • Focused checker/runner suite: 253 passed, 2 skipped (jj unavailable).
  • pre-commit run --all-files: passed.
  • Fern check: zero errors, one warning.
  • Fresh scripted runs on main b0e3fa6cf plus this checker stack for simple_agent, SciCode, OpenCode, Terminus2, mini-SWE, Hermes, NOOA, Codex, Pi and Stirrup. OpenCode is also tested separately with observability stack tip ccf9f997b ([5/5] fix(health): include invocation-owned token usage #3872). Failure sidecars leave artifact checks unassessed.
  • Local additional-driver/checker suite: 272 passed, 2 skipped. Combined current OpenCode stack, producer/capture and checker tests: 625 passed, 2 skipped.

Controlled-endpoint tests execute shell commands and inspect actual model/tool/verifier exchanges. These scripted runs do not qualify production benchmarks. Stirrup also ran all seven scenarios in Lima/Apptainer with a small shell-test image: six normal rollouts and one terminal-error failure record. The six normal rollouts retain model-call evidence but lack invocation, step and tool records. This uses a local native-tool driver; it does not qualify the full GDPval environment. Full server CI was not run locally.

Follow-up to #3766 and #4041; no separate issue is needed for this focused integration.

@copy-pr-bot

copy-pr-bot Bot commented Oct 5, 2026

Copy link
Copy Markdown

Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually.

Contributors can view more details about this message here.

@giuliolovisotto giuliolovisotto changed the title feat: add missing trajectory evidence checks feat: validate designated trajectory evidence Oct 5, 2026
Resolve each reference against canonical saved calls. Require exactly one target and agreement among every supplied identifier.

Signed-off-by: Giulio Lovisotto <[email protected]>
Run focused schema and relationship checks once, with explicit prerequisite failures. Retire whole-model validation, duplicate-copy comparisons and Gym-owned normalization checks. Keep scripted witness comparisons independent.

Signed-off-by: Giulio Lovisotto <[email protected]>
@giuliolovisotto
giuliolovisotto force-pushed the codex/harness-rfc-checks branch from 294acd9 to e2fb637 Compare October 5, 2026 16:58
@giuliolovisotto
giuliolovisotto force-pushed the codex/harness-check-registry branch from a7a73e9 to e68a0ee Compare October 5, 2026 16:58
@giuliolovisotto
giuliolovisotto marked this pull request as ready for review October 6, 2026 10:46
@giuliolovisotto
giuliolovisotto merged commit ad82a4e into codex/harness-check-registry Oct 6, 2026
10 checks passed
@giuliolovisotto
giuliolovisotto deleted the codex/harness-rfc-checks branch October 6, 2026 10:46
@nemo-automation-bot
nemo-automation-bot Bot requested review from a team October 6, 2026 10:46
giuliolovisotto added a commit that referenced this pull request Oct 7, 2026
Stacked on #4041. Validate each piece of evidence once at its designated
saved location, with JSON Schema for fields and explicit semantic checks
for relationships. Missing collections block dependent checks without
invalidating unrelated evidence.

- Keep call, step, tool, grading and sandbox requirements; resolve
invocation/call references against canonical targets. All supplied
reference identifiers must agree, and ambiguous targets fail.
- Replace blanket Python-model validation and cross-copy reconciliation.
Do not repeat Gym-owned uniqueness, clock-order or provider-usage
normalization checks.
- Retain independent comparisons with scripted exchanges, response
metadata, token counts and tool outcomes. A behavioral failure does not
erase artifact passes.
- Emit one table per harness, with individual check rows grouped as
Schema, Semantic and Behavioral, scenario columns, and compact status
symbols. Process status stays separate. Missing normal rollouts leave
artifact checks unassessed.

The profile is `gym-p0/v3`. Check IDs, report format and authoritative
locations change; regenerate existing reports. TE labels only group
results. `ng_trajectory` supplies calls, steps, invocations and tool
executions; sandbox/compaction observations retain their explicitly
designated source. Capture sidecars are provenance only. Benchmark
execution and scoring code are unchanged.

Validation:
- Focused checker/runner suite: **253 passed, 2 skipped** (`jj`
unavailable).
- `pre-commit run --all-files`: passed.
- Fern check: zero errors, one warning.
- Fresh scripted runs on main `b0e3fa6cf` plus this checker stack for
simple_agent, SciCode, OpenCode, Terminus2, mini-SWE, Hermes, NOOA,
Codex, Pi and Stirrup. OpenCode is also tested separately with
observability stack tip `ccf9f997b` (#3872). Failure sidecars leave
artifact checks unassessed.
- Local additional-driver/checker suite: **272 passed, 2 skipped**.
Combined current OpenCode stack, producer/capture and checker tests:
**625 passed, 2 skipped**.

Controlled-endpoint tests execute shell commands and inspect actual
model/tool/verifier exchanges. These scripted runs do not qualify
production benchmarks. Stirrup also ran all seven scenarios in
Lima/Apptainer with a small shell-test image: six normal rollouts and
one terminal-error failure record. The six normal rollouts retain
model-call evidence but lack invocation, step and tool records. This
uses a local native-tool driver; it does not qualify the full GDPval
environment. Full server CI was not run locally.

Follow-up to #3766 and #4041; no separate issue is needed for this
focused integration.

---------

Signed-off-by: Giulio Lovisotto <[email protected]>
jeffwillette pushed a commit to jeffwillette/Gym that referenced this pull request Oct 7, 2026
Conformance reporting previously coupled check dispatch and pass/fail
gates to TE groups, and behavioral failures could obscure valid artifact
evidence. Define schema, semantic and behavioral checks as typed objects
with explicit IDs, tiers, evidence labels, locations, failure reasons
and evaluation logic. All check definitions live under
`nemo_gym/harness_capabilities/`; scripts supply scenarios, observations
and expectations.

Each check reports pass, fail, or not applicable, with reasons and
blocking prerequisites. Missing required input, blocked checks and
absent results display a cross. The P0 gate requires every applicable
individual P0 check to pass; all current checks are P0, including
ownership and call-to-step checks. TE labels only group results.
Artifact, behavioral and execution results remain separate.

The permanent first-request HTTP 400 scenario explicitly excludes step
evidence; retry-and-recovery scenarios still require it.
Previous-response history is resolved within its model server, avoiding
false failures when servers reuse response IDs. Removes unused wrappers,
internal record copies and redundant result conversions; consolidates
overlapping tests.

Includes the focused evidence checks previously stacked in NVIDIA-NeMo#4042.
Removes string-based dispatch, whole-object validation and cross-copy
fallback/consistency checks. Retains pre-PR profile/schema version
identifiers. Schema helpers and model-call reference grammar remain in
checker.py; schemas.py is removed. Follow-up to NVIDIA-NeMo#3766; no separate issue
is needed.

Harness unit tests assert native observability and health behavior
without importing the conformance checker. Removes the copy-only
`hydrate_record()` wrapper and `reader.py`; strict JSONL reading and
hashing live in the conformance CLI, shared by the scripts.

Validation:
- At rebased head `b4f30dc96` (on `main` at `e76a5c629`): 276
checker/runner tests passed, 2 skipped; mini-SWE harness suite: 124
passed, 1 skipped. Tests use the current checkout via `PYTHONPATH` with
existing dependency environments.
- Cross-server response-ID reuse, same-server ambiguity, strict JSONL
parsing and immutable report publication remain covered.
- `pre-commit run --all-files` passed.
- Earlier Fern validation: 0 errors, 1 warning; this cleanup changes no
Fern files.
- Earlier validation reinspected 76 saved conformance scenarios across
11 harness variants; all 5,775 individual statuses match the preceding
report. Restoring all checks to P0 makes ten scenario gates fail on
their existing ownership/attribution failures. Regenerated and visually
checked the HTML tables.

Default pytest discovery is limited to `tests`. Conformance runner tests
remain available through an explicit `pytest
scripts/harness_conformance/tests` invocation; dedicated CI for that
module is deferred. The core coverage threshold remains 95%. This avoids
adding incidentally imported harness implementations to the core
coverage measurement without their separate server suites.

At `da612c420`, core behavioral-check tests live in
`tests/unit_tests/harness_capabilities/test_behavior.py`. Fifteen cases
exercise model exchanges, response IDs, token counts and tool witnesses
without importing harness implementations. A shared synthetic helper
supplies independent saved evidence and witness records; scenario
integration and protocol-normalization tests remain with the runner.

Validation for this test relocation:
- Core conformance and runner suites: 277 passed, 2 skipped.
- Moved behavioral tests alone: 15 passed; `behavior.py` coverage 96.74%
(89 of 92 statements). Verified no `responses_api_agents` modules were
imported.
- `pre-commit run --all-files` passed.
- Full [CI for this
head](https://github.com/NVIDIA-NeMo/Gym/actions/runs/37628725215)
passed: core coverage **95.26%** against the unchanged 95% threshold;
core tests 6,671 passed / 2 skipped, sandbox tests 916 passed / 5
skipped, and all eight server-test shards passed.

Production harness and environment behavior is unchanged. This
validation reuses saved controlled-run artifacts; no new live-model
benchmark evaluation was performed. Full server CI was not run locally.

---------

Signed-off-by: Giulio Lovisotto <[email protected]>

This branch was previously deployed

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant