[OPIK-8186] opik-instrument: eval harness (verify coverage + no false success) - #174
Merged
Merged
Conversation
…alse success) Mirrors the opik-diagnose/evals pattern. Two functional fixtures: - clean: uninstrumented app; the skill must instrument, run, and verify a complete 3-span trace with reported span coverage. - missing_flush: already instrumented but no flush, so no complete trace lands; the skill must not claim success without a real trace (no_false_success) — the decisive test of OPIK-8185's coverage check. Plus triggering (selection_accuracy), a deterministic grader, and metrics. Self-tested: correct outputs pass 2/2; a false already_verified is caught. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
alexkuzmik
approved these changes
Sep 1, 2026
Wrap the three long lines flagged by `ruff check` in grader.py and run_evals.py and apply `ruff format`. No behavior change — self-test still passes correct outputs and still catches a false `already_verified`. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.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.
What
Adds an eval harness for the
opik-instrumentskill — it had none (unlikeopik-diagnose/opik-explain), so the verify-coverage ability added in OPIK-8185 (#173) was untested beyond CI spec/build checks. Mirrors theopik-diagnose/evals/layout.Cases
opik-instrument, not diagnose/explain/evaluate (judge panel →selection_accuracy).verifiedwith span-level coverage (all three types present, every span well-formed, code changed).no_false_success: the skill must not claimverified/already_verifiedwithout a real, complete trace behind it. Passes whether it fixes the flush and verifies, or blocks with a flush next-step; a skill that trusts the decorators and reports success fails.Run it
Grading is offline; an optional integrity re-read hits Opik only when a
trace_idis present.Self-tested: correct outputs pass 2/2; a false
already_verifiedwith no trace is caught byno_false_success.Follow-up to #173.
HARNESS.mdnotes a plannedpartial_tracefixture (batching-race arrives-but-incomplete) as a TODO.Closes OPIK-8186.
🤖 Generated with Claude Code