chore(experimentalist): mark result models as deprecated contracts - #1006
Open
ngoncharenko wants to merge 2 commits into
Conversation
ngoncharenko
marked this pull request as ready for review
July 30, 2026 22:53
ngoncharenko
force-pushed
the
ngoncharenko/aalgo-312-wire-eval-into-optimizer
branch
from
July 31, 2026 04:30
503ca31 to
20813e3
Compare
Signed-off-by: Nick Goncharenko <ngoncharenko@nvidia.com>
ngoncharenko
force-pushed
the
ngoncharenko/aalgo-312-wire-eval-into-optimizer-deprecation
branch
from
July 31, 2026 16:13
bf606af to
d54f655
Compare
…t OSError
CodeRabbit flagged a bare `task_dir.resolve()` in `_cache_stamp` and suggested
routing it through `_safe_resolve` like `_task_dirs_for` does. Investigating that
turned up a larger problem: `_safe_resolve` would not have fixed it.
On CPython 3.12 -- the floor this package targets -- `Path.resolve()` translates
ELOOP into `RuntimeError("Symlink loop from ...")`, which is not an `OSError`.
`_safe_resolve` caught only `OSError`, so a symlink loop propagated straight
through the very helper written to absorb it, killing a run over a best-effort
cache fingerprint. It raises deterministically, not as a race. Verified across
interpreters: 3.12 raises RuntimeError; 3.14 resolves a loop without raising at
all, so the hazard is live only on the supported range.
The loop is reached through `_digest_directory`'s walk, which already routes every
path through `_safe_resolve` -- so this was live regardless of the flagged line.
`_cache_stamp`'s three resolve calls now use `_safe_resolve` too. Being precise
about why: that is consistency, not a demonstrated fix. `_task_dirs_for` filters
candidates with `is_dir()`, which returns False for a loop, so a looping path
never reaches them. Reverting those three lines alone does not fail the new test;
reverting the exception set does.
Regression test uses a self-referential symlink and asserts the stamp still
fingerprints the task. Mutation-checked against CodeRabbit's exact suggestion
(`_safe_resolve` with `except OSError`), which still fails.
Refs AALGO-312.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Signed-off-by: Nick Goncharenko <ngoncharenko@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.
Background
This is a follow up to these threads to "deprecate" the existing experimentalist models that have corresponding replacements in the evaluator sdk.
Solution: add metadata to models and tests.
Alternative (stronger lock): require approval in CI from codeowner on change or runtime warning
What changed
TrialResultandEvaluationResultas deprecated compatibility contracts through static Pydantic JSON Schema metadata, with explicit SDK migration targets and blockers.AgentEvalTrialadapter migration from end-to-endAgentEvalResultconvergence.Why
Validation
uv run --frozen pytest plugins/nemo-experimentalist/tests -q— 628 passed.ty, andgit diff --check— passed.