Skip to content

feat(tier3): import production trace exports as reviewed eval cases - #378

Merged
chrisknvidia merged 19 commits into
mainfrom
feat/christopherk/trace-datasets
Nov 10, 2026
Merged

chrisknvidia merged 19 commits into
mainfrom
feat/christopherk/trace-datasets

Conversation

@chrisknvidia

Copy link
Copy Markdown
Collaborator

Summary

Teams with a skill in production want eval cases that reflect how the skill is actually used. This adds a local, LLM-free import-and-review workflow that turns exported agent sessions into eval cases without treating production behavior as the correct answer.

  • skillevaluator tier3 import-traces SKILL EXPORT [-o DIR] [--force] [--dry-run] reads a documented trace export (JSONL, or a skillevaluator.trace-export v1 JSON wrapper). Each session can carry an ATIF trajectory or a raw agent_log from a supported agent (claude-code, cursor-cli, cline, opencode, codex), which is rebuilt with the existing log converters. It writes a review bundle (candidates.json plus fixtures/<id>/) outside the skill directory. Each candidate keeps observed evidence (outcome, final output, tool-call summary), source-session provenance, redaction counts, warnings, and a pending review.
  • Secret and PII redaction is mandatory and runs before anything is written. It uses the shared credential redactor and the Tier 1 PII patterns (emails, phone numbers, SSNs, personal macOS/Windows paths, all /home/<name>/ paths). Raw logs and unknown fields are never copied.
  • Duplicate, incomplete, unsupported, and other-skill sessions are listed explicitly. So are unsupported fields and replay inputs a session read but did not export (missing replay input: …).
  • skillevaluator tier3 accept-traces SKILL REVIEW_DIR [--dry-run] promotes only reviewed candidates:
    • accept needs an expected_output written by the reviewer.
    • accept_observed reuses the observed output and is refused unless the session succeeded.
    • Failed sessions stay in the bundle as evidence and never become expected answers.
    • Accepting re-runs redaction and refuses a candidate if a reviewer pasted sensitive text.
    • Fixtures are copied to evals/files/trace/<id>/ with references local to each entry, and entries get trace_source provenance.
    • Re-running is idempotent. The dataset is validated after writing.
  • New docs page docs/trace-datasets.mdx (export contract, review decisions, what redaction does and does not catch), plus CLI reference and changelog entries.

Verification

  • I am familiar with the Contributing Guidelines
  • Added or updated focused tests (tests/test_trace_import.py; CLI golden surface regenerated)
  • Updated documentation for user-visible changes
  • Ran make lint
  • Ran make test: all new tests pass. 47 failures in test_ci_onboarding, test_plugin_dependencies/test_plugin_dependency_records/test_plugin_discovery, TestResolveGitRemoteUrl, and the same-inode mtime tests also fail on a clean origin/main checkout in the same environment (git remote / filesystem setup), so they are unrelated to this change.
  • Ran make build
  • Did not add credentials, private datasets, or proprietary benchmark content

End-to-end run on a scratch skill:

  • A mixed export produced 4 candidates and listed 1 duplicate, 1 incomplete, and 1 unsupported field. The raw secret, email, and home path did not appear in any written file.
  • accept_observed on the failed session was refused.
  • Accepting two candidates gave a dataset that passed tier3 validate.
  • A live tier3 evaluate (opencode, Docker, 1 case) built the task image with the trace fixtures copied to /workspace/input/. The trial then errored at Docker compose container start in this sandbox, so no score was produced.

Release Impact

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

Add tier3 import-traces, which turns a documented trace export (JSONL or a
versioned JSON wrapper) into a redacted review bundle outside the skill, and
tier3 accept-traces, which promotes only explicitly reviewed candidates into
evals/evals.json with entry-local fixtures and source-session provenance.

Signed-off-by: Christopher Kevin <[email protected]>
The 2 MiB redaction guard still catches quadratic regressions, but 5s was too tight for loaded runners.

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

Checked import-traces and accept-traces end to end: export parsing (wrapper, JSONL, encodings), redaction of prompts, tool summaries, fixtures and provenance, duplicate and missing-input detection, promotion into evals/evals.json, and how the Harbor adapter stages accepted fixtures and picks the Tier 3 source.
Tests run at f716d24: tests/test_trace_import.py (43 passed) and tests/golden/test_cli_surface.py (3 passed), plus probes for each comment above and a tier3 validate on an accepted dataset (3 ok).
Main: merges cleanly.
Other open PRs: real conflicts with #375 in docs/cli-reference.mdx and tests/golden/cli_surface.json, and with #388 in tests/golden/cli_surface.json (both also touch CHANGELOG.md); whichever merges second regenerates the golden surface and, for #375, rebases the CLI reference. CHANGELOG.md only with #225, #372, #374, #377, #381-#385 and #387.
Overlap with #381: accepted trace entries set expected_skill, so #381's dataset coverage counts them as positive cases; trace import can never add negative controls, which is expected.

Comment thread docs/cli-reference.mdx Resolved
@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: 674bdfa90e0a4ab54100fbe7616930c7d01d542f · Environment: docker

…ce-datasets

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

# Conflicts:
#	CHANGELOG.md
…ce-datasets

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

# Conflicts:
#	CHANGELOG.md
…ce-datasets

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

# Conflicts:
#	CHANGELOG.md
…ce-datasets

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

# Conflicts:
#	CHANGELOG.md
#	docs/cli-reference.mdx
Signed-off-by: Christopher Kevin <[email protected]>
Signed-off-by: Christopher Kevin <[email protected]>
Signed-off-by: Christopher Kevin <[email protected]>
@chrisknvidia
chrisknvidia merged commit fe60fd3 into main Nov 10, 2026
22 checks passed
@chrisknvidia
chrisknvidia deleted the feat/christopherk/trace-datasets branch November 10, 2026 15:58
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