Skip to content

feat(tier3): add fixed-source skill interaction evaluation - #392

Merged
rng1995 merged 10 commits into
NVIDIA:mainfrom
YMuskrat:feat/tier3-skill-interactions
Nov 13, 2026
Merged

rng1995 merged 10 commits into
NVIDIA:mainfrom
YMuskrat:feat/tier3-skill-interactions

Conversation

@YMuskrat

@YMuskrat YMuskrat commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Closes #390.

Adds skillevaluator tier3 interact to calculate skill lift when multiple skills are selected and measure how their combined effect compares with their individual contributions.

The command reuses the existing Tier 3 Harbor evaluator, workspace staging, and trial results. It runs one fixed task suite with the same attempt budget across:

  • No skills, to establish the baseline.
  • Each selected skill individually.
  • All selected skills together.

It reports baseline, individual and combined scores, combined skill lift, and a signed interaction score in terminal and JSON output. Per-configuration evidence and source identities are retained.

Combined lift = P(all skills) - P(no skills)
Interaction = combined lift - sum(individual skill lifts)

A positive interaction means the skills improve performance more than the sum of their individual improvements; negative means less; zero means additive.

Interaction reports identify failing configurations and deduplicate repeated reasons, while each configuration reports trial progress on stderr. Results roots honor --results-dir, then SKILLEVALUATOR_RESULTS_DIR, then the adjacent interaction-results default, and resolve home shortcuts and symlinked parents before checking input overlap. Documentation explains trial noise and sequential arm ordering.

Also makes the single-skill GitLab scan template honor TMPDIR and isolates HTTP proxy and Git-checkout test fixtures from the host environment.

Verification

  • 93 focused interaction and CLI surface tests passed, including configuration diagnostics, results-root precedence and safety, progress lifecycle, and the existing CLI snapshot.
  • Ruff lint passed.
  • Package build passed: wheel and source distribution built successfully.
  • Updated usage documentation and the CLI golden snapshot.
  • Followed the contributing guidelines; commits are signed off.

Release Impact

  • Updated CHANGELOG.md.

@YMuskrat YMuskrat reopened this Nov 7, 2026
@YMuskrat
YMuskrat marked this pull request as draft November 7, 2026 18:45
@YMuskrat
YMuskrat marked this pull request as ready for review November 7, 2026 18:56

@chrisknvidia chrisknvidia left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Reviewed at 9283d83. The design holds up, and I have no blocking issues.

Checked locally:

  • Inputs are frozen once. Each selected skill is copied with the runtime projection (so its own evals/ stays out), digest-checked after the copy, and given the same reviewed evals/. The source config can't add companions, cap cases, or add pre_agent_setup.
  • Arms differ only in the installed skills. The staging test confirms installed sets {}, {a}, {b}, {a, b} with identical instruction.md and ground_truth, and _RUNTIME_ENTRY_FIELDS keeps the per-arm entry fields (has_skill, evaluated_skill, workspace mode and names) out of the case comparison.
  • Comparability fails closed. Unequal attempt budgets, early stopping, skipped cases, missing, N/A or duplicate reward rows, and model, judge, environment or evaluator differences all give incomplete/incomparable with exit 1 and no number.
  • Aggregation matches the docs: attempts are averaged within a case, and cases are weighted equally.
  • tests/tier3 passes (9750 passed, 10 skipped), so does the CLI golden surface test, and ruff check / ruff format --check are clean.

Two non-blocking suggestions inline, both about how far one run's number can be trusted.

@chrisknvidia chrisknvidia left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Approving. No blocking issues from my review at 9283d83; the two inline notes on noise and arm ordering are optional follow-ups.

@chrisknvidia

Copy link
Copy Markdown
Collaborator

@YMuskrat Approved, thanks. This now conflicts with main, only in CHANGELOG.md (both sides added entries in the same spots, so keeping both resolves it). Could you merge or rebase onto main and push? "Allow edits by maintainers" is off on this branch, so I can't push the fix myself. I'll merge once it's clean and CI passes.

@YMuskrat

YMuskrat commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor Author

Thanks for the review, @chrisknvidia. I merged main into this branch in 4d71e51, resolved the conflicts, and kept both sets of changelog entries. Maintainer edits are enabled now. Could you approve the four pending workflows so CI can run?

@chrisknvidia chrisknvidia left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks for the update and for the careful tests and docs. I went through the merge commit against both parents and it only touches the four files that conflicted at the time, with both sides kept, so nothing odd there. The catch is that it merged main at 3fe3763 and main has moved on since: the branch now conflicts again with the current main in CHANGELOG.md, docs/cli-reference.mdx and tests/ci/test_gitlab_template.py, and GitHub shows it as not mergeable. A git rebase --signoff origin/main should sort that out, keeping both sides in each of those files, and it also drops the merge commit, whose sign-off line names Codex rather than you (the DCO job skips merge commits, so it passed, but it's tidier without it). CI has not run on the current head; the four workflows are waiting for a maintainer to approve them, and that will need to happen again after you push.

Two small fixes while you are in there. First, if an arm fails with an empty exception message (a bare TimeoutError() for example), compare_configurations reads config['result'] for that arm and the command ends in a KeyError traceback instead of an incomplete report with exit 1; storing the exception type name when the message is empty and checking 'error' in config rather than truthiness fixes it, and a test that raises TimeoutError() from a fake arm would cover it. Second, the docs say invalid arguments use Click's usage-error exit and exit 1 means incomplete evidence, but validation errors such as fewer than two skills or duplicate skills currently exit 1 through ClickException; either raise click.UsageError for those or adjust the docs sentence.

A few optional notes are in the inline comments (arm id in failure reasons, a progress reporter, --results-dir behaving like the other Tier 3 commands, and the unrelated TMPDIR/test changes that could be their own PR). The earlier notes about noise and arm order are still open as well. The formula, the arm matrix and the fixed-source handling all look right to me.

Comment thread ci/gitlab/skill-evaluation.yml Resolved
Retain an exception type when its redacted message is empty, and treat
missing configuration results or explicit errors as incomplete evidence.
Use Click usage errors for invalid experiment inputs while retaining
exit code 1 for incomplete runs and output I/O failures.

Add regression coverage for empty TimeoutError messages, missing results,
and CLI exit codes across invalid inputs and runtime failures.

Signed-off-by: YMuskrat <[email protected]>
Resolve the changelog, CLI reference, and GitLab template test conflicts
while preserving both sides' additions.

Signed-off-by: YMuskrat <[email protected]>
@YMuskrat

Copy link
Copy Markdown
Contributor Author

@chrisknvidia The two requested fixes are in 4fcc958, with details in the inline replies.

I've also merged main at 7ae25d2 and resolved all three conflicts in ff3618b, preserving both sides' additions. GitHub now reports the PR as mergeable.

After the merge, all 87 targeted tests, repository lint and the package build passed. fern check reported 0 errors; its authenticated redirect check was skipped. The four GitHub workflows are still waiting for maintainer approval so CI can run.

@chrisknvidia chrisknvidia left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Re-reviewed at ff3618b. Both fixes from my last review are in 4fcc958 and work:

  • An arm that raises a bare TimeoutError() now records TimeoutError as its error. compare_configurations treats an explicit error key or a missing result as incomplete, so the command writes the report and exits 1 instead of raising a KeyError.
  • Invalid inputs (fewer than two skills, duplicates or overlap, bad source, results dir inside the inputs, metric/grading mismatch) now raise click.UsageError and exit 2. I checked that runtime ValueErrors can't hit that path: arm exceptions are caught per arm, and interaction_scores errors become incomparable inside compare_configurations.

Checked locally: tests/tier3/test_interactions.py passes (74), and ruff check / ruff format --check are clean on the changed files.

The PR still can't merge: main has moved again since 7ae25d2, and CHANGELOG.md conflicts once more. That file is the only conflict. Could you merge main again and keep both sides? The optional inline notes from earlier (arm id in failure reasons, progress reporter, --results-dir resolution, noise and arm order) are still optional.

@rng1995 rng1995 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Automated review: 6 findings (0 P1, 1 P2, 5 P3); 6 posted inline.

Checked at ff3618b against current main: the arm plan and per-arm staging (installed skill sets, no eval-data leakage from a skill's own evals/), the comparability checks in compare_configurations, input validation and exit codes, symlinked and null-config inputs, the output-provenance key guard, and the CHANGELOG/docs claims, using local probes with faked providers (no live Harbor or LLM calls).
Tests run locally: tests/tier3/test_interactions.py, tests/ci/test_gitlab_template.py, tests/inference/test_llm_client.py, tests/test_harbor_adapter_safety.py and tests/golden/test_cli_surface.py together, 336 passed; tests/test_benchmark_source_provenance.py::TestIdentityReachesTheRunArtifact with the golden and adapter-safety files, 55 passed. ruff check is clean on the two new modules and the new test file.
The branch is 7 commits behind main (487910e) and conflicts with it in CHANGELOG.md only; both conflicting hunks are additions on each side, so keeping both sides' entries resolves it.

Comment thread CHANGELOG.md Resolved
Comment thread CHANGELOG.md Resolved
Check the original inputs and output root for a misplaced provenance key before snapshotting. Report malformed backend arguments and missing evaluator directories as usage errors. Compare judge identity independently of transient catalog availability while retaining the probe result in evidence.

Consolidate the interaction release notes and identify the GitLab template that honors TMPDIR. Cover preflight validation and judge comparisons with regression tests.

Signed-off-by: Codex <[email protected]>
@YMuskrat

Copy link
Copy Markdown
Contributor Author

@chrisknvidia @rng1995 Could you re-review a5f2b45? I addressed all six findings in b8cc43e and merged main through f4d3f02, preserving both sides of the changelog conflict.

tier3 interact now checks the original skill, evaluation source, and output paths for a misplaced provenance key before copying anything. Judge comparisons ignore the per-run catalog probe result while retaining judge identity checks. Malformed --ek values and a missing evals/ directory now exit with code 2 before creating results. I also consolidated the interaction release notes and scoped the TMPDIR entry to the GitLab template it covers.

On the current head, 137 focused tests passed, lint passed, and the wheel and source distribution built. A broader local run stopped with 16 failures. I reran all 16 on the upstream revision used for that run and reproduced each one there.

The five GitHub Actions workflows are waiting for maintainer approval. Could a maintainer approve them so CI can run on this head?

@chrisknvidia chrisknvidia left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Approving this head. The earlier requested fixes and rng1995's comments are addressed in the code (usage-error exits, the empty-exception report, the provenance key check, up-front --ek and evals/ validation, and the narrowed changelog entry). I'll merge once Tests (Python 3.12) is green.

@rng1995 rng1995 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thank you @YMuskrat for your contributions and for your patience throughout the review process. All remaining review feedback is addressed: provenance and input validation, comparable judge identity, arm diagnostics, results-root handling, stderr progress, and interpretation/documentation notes. Verified 93 interaction and CLI surface tests, Ruff lint/format checks, Fern documentation validation, and an independent review. The PR merges cleanly with main. Approved; auto-merge remains subject to required CI checks.

@rng1995
rng1995 enabled auto-merge (squash) November 13, 2026 07:51
@rng1995
rng1995 disabled auto-merge November 13, 2026 08:35
@rng1995
rng1995 merged commit 6eb7563 into NVIDIA:main Nov 13, 2026
26 checks passed
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.

[FEA]: Add Tier 3 skill interaction evaluation

3 participants