Skip to content

feat(tier3): compare a run against a prior skill version - #387

Merged
chrisknvidia merged 23 commits into
mainfrom
feat/christopherk/prior-version-baseline
Nov 10, 2026
Merged

chrisknvidia merged 23 commits into
mainfrom
feat/christopherk/prior-version-baseline

Conversation

@chrisknvidia

Copy link
Copy Markdown
Collaborator

Summary

Builds on #384 (this PR's base is that branch; only the top commit is new). Adds a way to see, next to the existing Skill Lift ("does the skill help?"), whether the current skill version did better or worse than an earlier version ("did this edit improve the skill?").

  • skillevaluator tier3 evaluate --compare-to RUN|latest compares the new run's with-skill arm to a retained run's with-skill arm. latest picks the newest eligible completed run whose skill revision differs.
  • skillevaluator tier3 compare-versions SKILL_PATH --current RUN --prior RUN [--json] computes the same comparison from two retained runs and writes nothing.
  • Both reuse the feat(tier3): reuse a compatible retained no-skill baseline #384 comparison identity: dataset and cases, agents and resolved models, environment, judge/scorer, score and attempt policy, and evaluator version must match; only skill identity may differ. An incompatible explicit run is refused before any agent runs, with every reason; latest records rejected candidates and marks the comparison unavailable. An identical skill identity is allowed but flagged.
  • Prior rows come from the retained with-skill reward.json evidence (the feat(tier3): reuse a compatible retained no-skill baseline #384 loader now handles either arm) and are paired with current rows through the collector's logical-attempt and paired-lift code.
  • result.json gains prior_version_comparison: status (available/unavailable), reasons, source run id/timestamp, both skill identities, and per agent the current and prior overall scores, delta, per-metric deltas and a regression flag. Missing or unscored evidence is unavailable with no regression flag, never zero. No-skill Skill Lift is unchanged and reported separately.
  • Terminal, Markdown, HTML and benchmark reports add one line, e.g. Versus prior version (run …, rev …) · opencode: overall 1.00 → 0.72 (-0.28, regression).
  • The existing static --previous-version option is untouched.

Verification

  • I am familiar with the Contributing Guidelines
  • Added or updated focused tests (tests/test_version_comparison.py: regression, improvement, incompatible source, missing/unscored evidence, identical skill, read-only command, runner refusal)
  • Updated documentation for user-visible changes
  • Ran make lint
  • Ran make test (focused suites only: P0, version comparison, runner/progress, CLI golden surface, skill docs)
  • Ran make build
  • Did not add credentials, private datasets, or proprietary benchmark content

Live check with a real OpenCode agent (local env mode, one arithmetic case): v1 scored 1.00; a deliberately worse v2 (agent answered 999) run with --compare-to <v1> reported 1.00 → 0.72 (-0.28, regression) while its no-skill lift stayed a separate number; compare-versions returned the same values as a table and as JSON, and left both run directories unchanged; --compare-to <v1> --n-attempts 2 was refused before execution because the attempt policy changed. A combined --compare-to + --reuse-baseline latest live run ran only the with-skill arm but the judge provider timed out twice, so it correctly recorded the comparison as unavailable; the successful combined path is covered by the fake-Harbor tests.

Release Impact

  • No user-visible release note needed
  • Updated CHANGELOG.md

Add tier3 evaluate --reuse-baseline RUN|latest. A retained run's fresh
without-skill rows are reused only when the dataset, cases, agents and
models, environment, judge/scorer, attempt policy and evaluator version
match; otherwise an explicit run id is refused before execution and
latest falls back to a fresh baseline with recorded rejection reasons.
Reused rows go through the same aggregation and lift pipeline as fresh
rows, and results record baseline provenance plus fresh versus reused
execution counts and measured usage.

Signed-off-by: Christopher Kevin <[email protected]>
Add tier3 evaluate --compare-to RUN|latest and a read-only
tier3 compare-versions command. The prior run's with-skill rows are
paired with the current run's through the same lift machinery, after the
baseline comparison identity (dataset, cases, agents and models,
environment, scorer, attempt policy, evaluator version) is checked.
Results record a prior_version_comparison block with both skill
identities and per-agent deltas; missing evidence stays unavailable and
the no-skill Skill Lift is reported separately.

Signed-off-by: Christopher Kevin <[email protected]>

@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: 5 findings (0 P1, 0 P2, 5 P3); 5 posted inline.

Checked against the #384 base (feat/christopherk/reuse-baseline): select_prior_version, compare_versions, compare_retained_runs, the shared condition_eligibility changes, the --compare-to and compare-versions CLI paths, and the report lines, with probes built on the PR's fake-Harbor evaluation fixture.
Tests run at 28707c1: tests/test_version_comparison.py and tests/test_baseline_store.py (51 passed); the golden CLI surface, reporting, unified Tier 3 report, result display, benchmark provenance and public gate suites (281, 566, 614 and 2532 passed across separate runs). tier3 --help and tier3 compare-versions --help also ran.
Merge with main: only src/skillevaluator/reporting/html.py (one import line, inherited from #384); clean against its #384 base. Merge #384 first, then rebase this PR.
Conflicts with other open PRs: src/skillevaluator/cli.py and docs/reports.mdx with #388 (the compare-versions and history commands and doc sections sit next to each other); src/skillevaluator/evaluation/options.py and CHANGELOG.md with #225 (both add a field after max_cases); CHANGELOG.md only with #372, #374, #375, #377, #378, #381-383 and #385. No conflicts with #333, #373, #376, #379, #380 or #386.
Overlap with #225: on --backend nemo-gym, --compare-to is silently ignored, because that path never reaches run_harbor_eval and its capability check does not reject the flag.

Comment thread src/skillevaluator/cli.py Resolved
Signed-off-by: Christopher Kevin <[email protected]>
@github-actions

github-actions Bot commented Nov 10, 2026 •

Copy link
Copy Markdown

Evaluation run

SkillEvaluator CI results

Required gate: Skipped

Only Tier 1 blocks CI; Tier 2 and Tier 3 are advisory.

Skill Tier 1: Static and Security Validation Tier 2: Deduplication Tier 3: Live Agent Evaluation Report
No skills evaluated SKIPPED · issues unknown · No selected skills changed; Tier 1 evaluation did not run. INCOMPLETE · issues unknown · The tier did not produce retained evidence; inspect its failed or cancelled CI job. INCOMPLETE · issues unknown · The tier did not produce retained evidence; inspect its failed or cancelled CI job. Report

Commit: 20d32b3f1046ed32776278f64d7b5115e06c4034 · Environment: docker

…se-baseline

Signed-off-by: Christopher Kevin <[email protected]>

# Conflicts:
#	CHANGELOG.md
…or-version-baseline

Signed-off-by: Christopher Kevin <[email protected]>

# Conflicts:
#	CHANGELOG.md
…se-baseline

Signed-off-by: Christopher Kevin <[email protected]>

# Conflicts:
#	CHANGELOG.md
…or-version-baseline

Signed-off-by: Christopher Kevin <[email protected]>

# Conflicts:
#	CHANGELOG.md
…se-baseline

Signed-off-by: Christopher Kevin <[email protected]>

# Conflicts:
#	CHANGELOG.md
…' into feat/christopherk/prior-version-baseline

Signed-off-by: Christopher Kevin <[email protected]>

# Conflicts:
#	CHANGELOG.md
Signed-off-by: Christopher Kevin <[email protected]>
Signed-off-by: Christopher Kevin <[email protected]>
Signed-off-by: Christopher Kevin <[email protected]>
Signed-off-by: Christopher Kevin <[email protected]>
Base automatically changed from feat/christopherk/reuse-baseline to main November 10, 2026 13:25
@chrisknvidia
chrisknvidia merged commit b61b1ef into main Nov 10, 2026
22 checks passed
@chrisknvidia
chrisknvidia deleted the feat/christopherk/prior-version-baseline branch November 10, 2026 16:01
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.

2 participants