Multi-tier framework for evaluating AI agent skills and plugins with quality gates, security scanning, harness compatibility checks, semantic overlap detection, synthetic evaluation dataset generation, and live agent evaluation that measures how skills affect agent behavior. Ships reusable CI templates that bring every check to any repository.
Python agent-evaluationagent-pluginsagent-securityagent-skillsagentic-aibenchmarkci-templatesclaude-codecodexevaluateevaluationharnesspluginplugin-evaluationsecurity-scannerskill-evalskill-evaluationskill-evaluatorskill-gap-analysisskills
feat(cli): simplify tier workflows and improve evaluation feedback (#152)
Christopher Kevin4dcbe371f562
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex 706b1489..e37c5e88 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -4,6 +4,65 @@ All notable changes to SkillEvaluator are documented in this file.## Unreleased+### Fixed++- Preserve full Codex gateway model IDs in cloud environments, including E2B+ and Daytona, while retaining local runtime setup and native provider routing.+- Keep Tier 2 execution diagnostics visible alongside duplicate findings in+ CLI, HTML, and Markdown reports, without repeating the findings as errors.+- Use `nvidia/nemotron-3-super-120b-a12b` as the shared NVIDIA Build default for+ evaluator chat, agent execution, and judging, preserving explicit model overrides.+ Request nonstreaming chat responses explicitly to match the response parser.+- Tier 2 LLM failures now identify the selected provider and model, HTTP status,+ safe error metadata, and failed-cluster count without exposing response bodies.+- Replace the retired NVIDIA embedding default with `nvidia/nemotron-3-embed-1b`+ and send the required passage input type for NVIDIA document comparisons.+ Existing catalogs and caches must be rebuilt when switching embedding models.+- Report Tier 2 embedding and LLM service failures as incomplete checks, retaining+ a nonzero exit without inventing duplicate-content findings. Provider error+ messages include recovery guidance without echoing raw response bodies.++### Added++- Interactive top-level help now opens with a green SkillEvaluator wordmark,+ installed version, and tier overview. Narrow terminals use a compact header;+ redirected output and subcommands keep their existing output format.++- OpenAI-compatible gateways now have chat, embedding, and separate Codex,+ Claude Code, and OpenCode model defaults. Set the provider, URL, and key;+ override model IDs when the gateway uses different catalog names. Claude+ Code inherits the gateway route unless an explicit Anthropic route is set.+ Run reports identify harness defaults separately from CLI/config overrides.++- Run individual tiers directly with `skillevaluator tier1 PATH`, `tier2 PATH`,+ and `tier3 PATH`, while retaining the expert subcommands. Tier 1 includes+ dependency checks and enables LLM checks when configured; Tier 2 reports+ whether a catalog comparison ran; Tier 3 creates a missing starter dataset+ and preserves existing evaluation sources.++### Changed++- `validate PATH` now runs all three tiers for skills by default. Tier 3+ autopilot reuses an existing evaluation source or creates one starter case+ when none exists. `--full` remains compatible but is unnecessary;+ `--tiers`, `--no-tier3`, and `--no-autopilot` provide explicit scope controls.+ Keyless static CI gates should select `--tiers 1`.+- Tier 3 now selects a provider-native agent when `--agents` is omitted:+ OpenCode for NVIDIA Build, Codex for OpenAI, and Claude Code for Anthropic.+ NVIDIA Build agent runs default to Nemotron Super; explicit agent and model+ overrides remain unchanged.+- Tier 3's extra agent runtime preflight is now disabled by default because it+ executes the first real task prompt and incurs agent runtime and model cost.+ Enable it explicitly with `--agent-runtime-preflight` on either `tier3` or+ `validate`, or with `harbor.agent_runtime_preflight: true` in `evals/config.yml`.+- Missing-provider and API-key errors now show concise, copyable setup steps+ and a link to advanced configuration. Tier 1 also explains `--no-llm`.+- `tier1 validate` now runs only Tier 1, matching `tier1 PATH`. The top-level+ `validate` command retains its combined pipeline behavior.+- README and getting-started guides lead with provider-plus-key setup for+ NVIDIA Build and OpenAI, explain inherited model defaults, and separate+ credentials from scanner and agent runtime requirements.+## 0.3.0 - 2026-09-17### Addeddiff --git a/README.md b/README.mdindex 6ad0dfda..c9d802a1 100644--- a/README.md+++ b/README.md@@ -30,123 +30,153 @@ Skills that pass are published to the-Tiers are independent entry points; nothing requires running earlier ones first.+Run each tier independently.-| Tier | Purpose | Representative commands | Requires |+| Tier | Purpose | Run one tier | Requires || --- | --- | --- | --- |-| Tier 1: Validation | Safe & well-formed? | `validate`, `quality-check`, `security-scan`, `pii-scan`, `lint-scripts`, `rubric-eval` | No API key for deterministic checks; the `security` extra plus external Semgrep, SkillSpector, and Gitleaks for full scanner coverage; a provider key for LLM checks |-| Tier 2: Deduplication | Overlap with what exists? | `context-optimization-check`, `similarity-check` | An embeddings provider; intra-skill analysis also needs a chat LLM — local OpenAI-compatible endpoints work |-| Tier 3: Live Evaluation | Does it help the agent? | `create-eval-dataset`, `tier3 evaluate`, `compare` | No credential for keyless templates and report inspection; a provider key for LLM generation and grading; live evaluation also needs the agent CLI with its credential and a Docker, local OS, or cloud sandbox |+| Tier 1: Validation | Safe & well-formed? | `skillevaluator tier1 ./my-skill` | External scanners for full coverage; a provider enables rubric and LLM security checks |+| Tier 2: Deduplication | Repeated or overlapping guidance? | `skillevaluator tier2 ./my-skill` | Embeddings and chat; add `--catalog ./skill-catalog.json` for inter-skill comparison |+| Tier 3: Live Evaluation | Does it help the agent? | `skillevaluator tier3 ./my-skill` | Provider access, a supported agent, and a running sandbox (Docker by default) |-[SkillSpector](https://github.com/NVIDIA/SkillSpector) provides specialized-security scanning for Tier 1 validation.-[Harbor](https://github.com/harbor-framework/harbor), the open-source agent-evaluation framework, powers the sandboxed agent runs in Tier 3 live-evaluation. Full tier guides live in the-[documentation](https://docs.nvidia.com/skills/skillevaluator/).+[SkillSpector](https://github.com/NVIDIA/SkillSpector) provides Tier 1 security+scanning; [Harbor](https://github.com/harbor-framework/harbor), the open-source agent+evaluation framework, powers Tier 3 sandboxed agent runs.+See the [tier guides](https://docs.nvidia.com/skills/skillevaluator/).## Quickstart-Install all SkillEvaluator evaluation extras with-[uv](https://docs.astral.sh/uv/), then run the built-in deterministic validation-gates. This first result needs no API key, Docker daemon, or repository clone:+Install with [uv](https://docs.astral.sh/uv/):```bashuv tool install --python 3.13 "skillevaluator[all] @ git+https://github.com/NVIDIA/SkillEvaluator.git"-skillevaluator validate ./my-skill \- --checks schema,pii,license,quality,unicode,lint \- --no-dedup```-`./my-skill` is any directory containing a `SKILL.md`. The command checks its-schema, PII, license, quality, Unicode safety, and scripts. The scoped check-list keeps this first run keyless; the complete Tier 1 security scan also uses-external tools described in the-[installation guide](https://docs.nvidia.com/skills/skillevaluator/installation).-If your shell cannot find the command after installation, run-`uv tool update-shell` and open a new terminal.--## LLM provider setup--NVIDIA Build offers free inferencing with a free API key from-[build.nvidia.com](https://build.nvidia.com). Its default chat model is the-open-source Nemotron `nvidia/nemotron-3-nano-30b-a3b`. Choose another free model-on [build.nvidia.com](https://build.nvidia.com) with `SKILL_EVAL_LLM_MODEL`.-One credential supports chat and embeddings across Tier 1 LLM checks, Tier 2,-and Tier 3:+**NVIDIA Build: set just two variables.** [API key](https://build.nvidia.com):```bashexport SKILL_EVAL_LLM_PROVIDER=nv_buildexport NVIDIA_API_KEY='nvapi-...'-skillevaluator models --limit 10```-Other supported provider setups are:+This key covers chat, Tier 2 embeddings, and supported Tier 3 agents in+Docker or local mode.++For gateways, set `SKILL_EVAL_LLM_PROVIDER=openai-compatible`,+`SKILL_EVAL_LLM_BASE_URL`, and `SKILL_EVAL_LLM_API_KEY`.+[Model defaults are overridable](docs/configuration.mdx#choose-an-llm-provider);+the gateway must support the selected models and APIs.++Run all tiers on `./my-skill`, a directory containing `SKILL.md`:++```bash+skillevaluator validate ./my-skill+```++Run individual tiers:++```bash+skillevaluator tier1 ./my-skill+skillevaluator tier2 ./my-skill+skillevaluator tier3 ./my-skill+```++- **Tier 1** runs static checks, including dependency checks, plus rubric,+ LLM security analysis, and finding verification when a provider is configured.+ Without a provider, LLM stages are reported as skipped.+ Use `--no-llm` to opt out of LLM checks.+- **Tier 2** checks for repeated content inside the skill. Add+ `--catalog ./skill-catalog.json` to compare against other skills too; without+ a catalog, the output explicitly says inter-skill comparison did not run.+- **Tier 3** creates one starter evaluation case if no dataset or task source+ exists, then runs the provider-native agent in Docker with and without the+ skill. Valid existing sources are reused unchanged; invalid ones produce an+ error. Review starter cases; they provide limited coverage.++A tier without a path shows help.+Expert commands such as `tier1 security-scan`, `tier2 similarity-check`, and+`tier3 create-eval-dataset` remain available.++### Runtime requirements++`[all]` installs Python extras; full Tier 1 needs Semgrep, SkillSpector, and Gitleaks,+and Tier 3 needs an agent runtime and sandbox. Follow the+[installation guide](https://docs.nvidia.com/skills/skillevaluator/installation),+then check readiness:++```bash+skillevaluator doctor --env-mode docker+```++For a keyless check without external scanners, run+`skillevaluator quality-check ./my-skill`. If the command is unavailable,+run `uv tool update-shell` and reopen your terminal.-- OpenAI: `SKILL_EVAL_LLM_PROVIDER=openai` and `OPENAI_API_KEY`.-- Anthropic: `SKILL_EVAL_LLM_PROVIDER=anthropic` and `ANTHROPIC_API_KEY`.-- Amazon Bedrock: `SKILL_EVAL_LLM_PROVIDER=bedrock` plus the standard AWS- credential chain and region.-- Local or hosted OpenAI-compatible endpoint: set- `SKILL_EVAL_LLM_PROVIDER=openai-compatible`,- `SKILL_EVAL_LLM_BASE_URL`, `SKILL_EVAL_LLM_MODEL`, and- `SKILL_EVAL_LLM_API_KEY`.+### Other providers and optional model overrides-The pinned chat defaults are `gpt-5.6-sol` for OpenAI,-`claude-opus-5` for Anthropic, and-`us.anthropic.claude-opus-5` for Amazon Bedrock. Override any provider with-`SKILL_EVAL_LLM_MODEL`; `gpt-5.4-mini` is the documented lower-cost OpenAI-alternative.+OpenAI uses two variables and defaults to Codex for Tier 3:-When exactly one of `NVIDIA_API_KEY`, `OPENAI_API_KEY`, or `ANTHROPIC_API_KEY`-is present, SkillEvaluator can auto-select that provider. Anthropic and Bedrock-do not provide embeddings, so Tier 2 also needs a separate OpenAI, NVIDIA-Build, or OpenAI-compatible embedding provider. See-[Providers & Credentials](https://docs.nvidia.com/skills/skillevaluator/configuration)-for model defaults, endpoint overrides, and fully local setup.+```bash+export SKILL_EVAL_LLM_PROVIDER=openai+export OPENAI_API_KEY='sk-...'+```-## Run deeper evaluations+NVIDIA Build defaults to `nvidia/nemotron-3-super-120b-a12b` for evaluator chat,+Tier 3 agent execution, and judging. Its embedding default is+`nvidia/nemotron-3-embed-1b`; OpenAI defaults to `gpt-5.6-sol` and+`text-embedding-3-small`. These are configured defaults, not automatically+updated selections of the latest models. To select a different evaluator model:-`similarity-check` needs an embeddings provider. `context-optimization-check`-also needs a chat provider to check one skill for repeated guidance:+```bash+export SKILL_EVAL_LLM_MODEL='your-provider-model-id'+```++The standard judge inherits that model unless overridden. Tier 3 defaults to+OpenCode for NVIDIA Build, Codex for OpenAI, and Claude Code for Anthropic.+Use `--agents` and `--agent-model` to override the agent and its model separately.++Anthropic and Bedrock need a separate embedding provider for Tier 2. Custom+OpenAI-compatible endpoints also require explicit endpoint and model settings.+See [Providers & Credentials](https://docs.nvidia.com/skills/skillevaluator/configuration)+for these setups and advanced overrides.++## Run the combined pipeline++`validate` runs Tier 1, Tier 2, and Tier 3 with autopilot by default for skills:```bash-skillevaluator context-optimization-check ./my-skill-skillevaluator similarity-check ./skills+skillevaluator validate ./my-skill```-Install Semgrep, SkillSpector, and Gitleaks before a full run; missing Tier 1-scanner evidence makes validation incomplete. Then verify the selected agent-runtime and use `validate --full`:+`--full` remains supported but is unnecessary.+Use `--tiers 1,2` or `--no-tier3` to skip live evaluation; `--tiers 1` runs+only the static suite. `--no-autopilot` requires an existing evaluation source.+Rules, workflows, and plugins retain their applicable validation stages without+automatically enabling skill evaluation.++To prepare broader coverage before a run, generate and review a four-bucket dataset:```bash-skillevaluator doctor --agents codex --env-mode docker-skillevaluator validate ./my-skill \- --full \- --agents codex \- --env-mode docker+skillevaluator tier3 create-eval-dataset ./my-skill --full```-`--full` runs Tiers 1, 2, and 3 and enables autopilot. If the skill has no-accepted evaluation source, autopilot creates one initial case at-`evals/evals.json`; if the file already exists, SkillEvaluator reuses it. For a-broader four-bucket dataset, generate and review it first:+Tier 1 always gates `validate`. Tier 2 gates by default;+`--no-block-on-dedup` makes its findings advisory. Tier 3 is advisory by default;+`--block-on-agent-eval` makes its findings gate too. Live model calls and managed+sandboxes can incur charges; start with one agent and a small dataset. See the+[Tier 3 guide](https://docs.nvidia.com/skills/skillevaluator/tier3-live-evaluation#plan-for-cost)+for runtime and cost details.++## Run from a source checkout```bash-skillevaluator create-eval-dataset ./my-skill --full+git clone https://github.com/NVIDIA/SkillEvaluator.git+cd SkillEvaluator+uv sync --python 3.13 --extra all+uv run --extra all skillevaluator tier1 ./my-skill```-Tier 2 needs chat and embedding providers. Tier 3 also needs the evaluator-provider, the selected agent's credential, and a Docker, local, or cloud-sandbox. Live model calls and managed sandboxes can incur charges; local mode-avoids managed sandbox charges, not hosted model charges. It is experimental-and only for trusted skills and workspaces; use Docker or cloud for untrusted-code. Start with one agent and a small dataset.-See the [Tier 3 guide](https://docs.nvidia.com/skills/skillevaluator/tier3-live-evaluation#plan-for-cost)-before scaling a run. Tier 1 always gates `validate`. Tier 2 gates by default;-`--no-block-on-dedup` keeps its scan and reports but makes its findings-advisory. Tier 3 is advisory by default; `--block-on-agent-eval` promotes its-findings, including invalid task-source evidence, into the exit gate.+Use the provider exports above. Prefix other commands with+`uv run --extra all` to select this checkout.## Research and citation@@ -160,10 +190,8 @@ SkillEvaluator release or commit. See [CITATION.cff](CITATION.cff).## Documentation-Read the complete documentation at-[docs.nvidia.com/skills/skillevaluator](https://docs.nvidia.com/skills/skillevaluator/)-for installation, the quickstart, provider configuration, tier guides, results-and CI integration, the CLI reference, and contributor guidance.+See [the documentation](https://docs.nvidia.com/skills/skillevaluator/) for+setup, tier guides, reports, CI integration, and the CLI reference.## Installation and third-party softwarediff --git a/docs/agents-and-sandboxes.mdx b/docs/agents-and-sandboxes.mdxindex 56782200..7ca7e014 100644--- a/docs/agents-and-sandboxes.mdx+++ b/docs/agents-and-sandboxes.mdx@@ -16,13 +16,14 @@ local, and cloud environment backends.## Supported agents-Pass agents as a comma-separated list with `-a/--agents`. The default is-`codex`. Three agents are supported:+Pass agents as a comma-separated list with `-a/--agents`. Without that option,+SkillEvaluator selects the provider-native default: `opencode` for NVIDIA Build,+`codex` for OpenAI, and `claude-code` for Anthropic. Three agents are supported:| Agent | Notes || --- | --- || `claude-code` | Anthropic's Claude Code CLI. `claude` is an accepted alias. |-| `codex` | OpenAI's Codex CLI. The default agent. |+| `codex` | OpenAI's Codex CLI. The OpenAI-provider default. || `opencode` | The OpenCode CLI. |The `claude` alias is canonicalized to `claude-code` everywhere an agent@@ -75,12 +76,12 @@ orchestration and server tools Build cannot execute — `WebFetch`,### Models on the one-key path-With `nv_build` and no explicit override, the bridged agents (`codex` and-`claude-code`) default to `nvidia/nemotron-3-super-120b-a12b`. Direct-OpenCode defaults to `nvidia/nemotron-3-nano-30b-a3b` and is automatically-qualified with the `nvidia/` adapter namespace, so it renders as-`nvidia/nvidia/nemotron-3-nano-30b-a3b` in run output — the doubled prefix-is the adapter namespace plus the catalog publisher, not a bug.+With `nv_build` and no explicit model override, every supported agent defaults+to `nvidia/nemotron-3-super-120b-a12b`. The provider-native agent selection is+OpenCode. Its model is automatically qualified with the `nvidia/` adapter+namespace, so it renders as `nvidia/nvidia/nemotron-3-super-120b-a12b` in run+output — the doubled prefix is the adapter namespace plus the catalog publisher,+not a bug.An explicit `--agent-model` value with NVIDIA Build must be a full`publisher/model` catalog ID; an explicit OpenCode override also carries the@@ -280,8 +281,9 @@ pass, warn, or fail row per agent. A warning means the catalog result isnon-authoritative, such as a public NVIDIA Build listing or an OpenAI catalogpermission failure that does not decide inference access. Browse catalogmembership with `skillevaluator models` (top 10 by default; `--limit` and-`--json` adjust the result), but use the Tier 3 runtime preflight to prove that-the agent can actually invoke the model. A different route used only by the+`--json` adjust the result). To prove that the agent can actually invoke the+model before the measured matrix, opt into the extra Tier 3 execution with+`--agent-runtime-preflight`. A different route used only by thestandard grader is not exercised by that smoke and remains unproven untilgrading begins.diff --git a/docs/ci-integration.mdx b/docs/ci-integration.mdxindex 99ca3d16..6174a752 100644--- a/docs/ci-integration.mdx+++ b/docs/ci-integration.mdx@@ -16,18 +16,18 @@ Turn SkillEvaluator into a merge gate for your skill repository. The recommended| `2` | Configuration error — bad flags or an unreadable target | Fix the pipeline, not the skill || `3` | Runtime error — an unexpected internal failure | Re-run; the skill was never judged. File an issue if it persists |-Tier 1 checks always gate the exit code. Tier 2 deduplication findings gate when dedup runs unless you pass `--no-block-on-dedup`; the recommended keyless gate below instead disables Tier 2 with `--no-dedup`. Tier 3 live-evaluation results are advisory inside `validate` unless you pass `--block-on-agent-eval`. Reports record the effective choice for each tier.+Tier 1 checks always gate the exit code. Tier 2 deduplication findings gate when dedup runs unless you pass `--no-block-on-dedup`; the recommended keyless gate below selects `--tiers 1` to exclude Tier 2 and Tier 3. Tier 3 live-evaluation results are advisory inside `validate` unless you pass `--block-on-agent-eval`. Reports record the effective choice for each tier. Without an explicit scope, `validate` runs all three tiers for skills, including Tier 3 autopilot.## The recommended gate```bash title="Keyless CI gate"-skillevaluator validate ./skills --external --no-dedup -r json,markdown -o reports --min-score 70+skillevaluator validate ./skills --external --tiers 1 -r json,markdown -o reports --min-score 70```Each flag earns its place:- **`--external`** pins the public-publication profile explicitly instead of relying on the environment, so the gate behaves identically on every runner. The active profile name is stamped into the HTML report and `BENCHMARK.md` (and printed in the run banner with `--verbose`), so a run always records which gate was applied.-- **`--no-dedup`** skips Tier 2, which needs an embedding-capable provider key (`--no-tier2` is an equivalent alias). Without it the run is fully keyless and hermetic. Drop this flag once you add a provider secret.+- **`--tiers 1`** runs static checks without the provider-backed Tier 2 and Tier 3 stages. Use `--tiers 1,2` once you add a provider secret, or omit the option to include Tier 3 after configuring its runtime. `--no-dedup` alone skips only Tier 2 and still runs Tier 3.- **`-r json,markdown,sarif`** writes machine-readable JSON, a Markdown PR comment, and a SARIF file for GitHub Code Scanning.- **`-o reports`** collects everything in one directory for artifact upload.- **`--min-score 70`** is the default quality bar, written out explicitly so raising it later is a visible one-line diff.@@ -78,7 +78,7 @@ jobs:- name: Validate skillsrun: |- skillevaluator validate ./skills --external --no-dedup \+ skillevaluator validate ./skills --external --tiers 1 \-r json,markdown,sarif -o reports --min-score 70- name: Upload reports@@ -160,7 +160,7 @@ The same shape ports to any CI system: install, run `validate`, gate on the exitPoint `validate` at a folder of skills and it validates each one:```bash title="Validate a whole collection"-skillevaluator validate ./skills --external --no-dedup -c -r json,markdown -o reports+skillevaluator validate ./skills --external --tiers 1 -c -r json,markdown -o reports```Two flags control how a multi-skill run behaves:@@ -182,7 +182,7 @@ You do not have to turn on the strictest gate on day one. A path that works wellRun the gate but never fail the build. Contributors see reports and get used to the findings before anything blocks a merge.```bash title="Report-only mode"- skillevaluator validate ./skills --external --no-dedup -r markdown -o reports || true+ skillevaluator validate ./skills --external --tiers 1 -r markdown -o reports || true```### Gate on Tier 1@@ -195,11 +195,11 @@ You do not have to turn on the strictest gate on day one. A path that works well### Add LLM-backed checks- Add a provider key as a masked CI secret, set `SKILL_EVAL_LLM_PROVIDER`, then add `--llm` (and `--llm-verify` to suppress false positives) and drop `--no-dedup` so Tier 2 overlap checks run too. Once dedup runs, its findings gate alongside Tier 1 by default; add `--no-block-on-dedup` if you want evidence without enforcing it yet. See [Providers & Credentials](configuration.mdx) for provider setup.+ Add a provider key as a masked CI secret, set `SKILL_EVAL_LLM_PROVIDER`, then add `--llm` (and `--llm-verify` to suppress false positives) and select `--tiers 1,2` so Tier 2 overlap checks run too. Once dedup runs, its findings gate alongside Tier 1 by default; add `--no-block-on-dedup` if you want evidence without enforcing it yet. See [Providers & Credentials](configuration.mdx) for provider setup.### Add an advisory Tier 3 job- Run live agent evaluation as a separate job — either `skillevaluator tier3 evaluate` on its own or `validate --tier3` (`--agent-eval` is a supported compatibility alias and is not currently deprecated; `validate --full` runs Tier 1+2+3 in one shot). Attached Tier 3 is advisory by default; add `--block-on-agent-eval` when the team is ready for its findings or invalid source evidence to fail the merge gate. The standalone `tier3 evaluate` exits non-zero when the run itself fails to complete. Expose agent credentials as CI secrets in the job environment — the `env:` block of the workflow step — because SkillEvaluator reads operator credentials from the host environment only. With the `nv_build` provider and `--env-mode docker`, a single `NVIDIA_API_KEY` secret covers the evaluator and all three agents. See [Tier 3: Live Evaluation](tier3-live-evaluation.mdx).+ Run live agent evaluation as a separate job with `skillevaluator tier3 ./my-skill`, or remove `--tiers 1,2` from `validate` to run all three tiers. Both workflows reuse existing evaluation sources and generate one starter case when none exists. Attached Tier 3 is advisory by default; add `--block-on-agent-eval` when the team is ready for its findings or invalid source evidence to fail the merge gate. Standalone Tier 3 exits non-zero when the run itself fails to complete. Expose agent credentials as CI secrets in the job environment — the `env:` block of the workflow step — because SkillEvaluator reads operator credentials from the host environment only. With the `nv_build` provider and `--env-mode docker`, a single `NVIDIA_API_KEY` secret covers the evaluator and all three agents. See [Tier 3: Live Evaluation](tier3-live-evaluation.mdx).</Steps><Note>@@ -220,7 +220,7 @@ severity_overrides:``````bash title="Gate with a pinned policy"-skillevaluator validate ./skills --external --policy ./policy.yaml --no-dedup -r json,markdown -o reports+skillevaluator validate ./skills --external --policy ./policy.yaml --tiers 1 -r json,markdown -o reports```The policy overlays the external profile, and the resulting profile name is stamped into the HTML report and `BENCHMARK.md` (and printed in the run banner with `--verbose`) — so a run always tells you which gate produced it. Full overlay syntax is on the [Tier 1: Validation](tier1-validation.mdx) page.diff --git a/docs/cli-reference.mdx b/docs/cli-reference.mdxindex 9760cb24..4cee93e9 100644--- a/docs/cli-reference.mdx+++ b/docs/cli-reference.mdx@@ -1,6 +1,6 @@---title: "CLI Reference"-description: "Every SkillEvaluator command, flag, and default — validate, quality-check, similarity-check, tier3 evaluate, and the tier1/tier2/tier3 expert groups."+description: "Run tiers directly, explore expert subcommands, and look up SkillEvaluator flags and defaults."layout: reference---@@ -17,7 +17,10 @@ commands referenced below.| Command | Purpose | Needs || --- | --- | --- |-| [validate](#validate) | Run Tier 1 checks plus Tier 2 dedup by default, with explicit Tier 2 and Tier 3 gating controls | Nothing by default |+| [tier1 PATH](#direct-tier-workflows) | Run Tier 1 static and configured LLM checks | External scanners; provider for LLM stages |+| [tier2 PATH](#direct-tier-workflows) | Run intra-skill dedup; include inter-skill comparison with `--catalog` | Chat and embeddings provider |+| [tier3 PATH](#direct-tier-workflows) | Prepare a missing starter dataset and run live evaluation | Provider, supported agent, and sandbox |+| [validate](#validate) | Run all three tiers for skills, including Tier 3 autopilot, with explicit scope and gating controls | Provider access, scanners, supported agent, and sandbox; `--tiers 1` selects static checks || [quality-check](#quality-check) | Score skill quality across four weighted categories | Nothing || [rubric-eval](#rubric-eval) | LLM-as-judge rubric evaluation | LLM provider key || [security-scan](#security-scan) | Scan for security vulnerabilities | Nothing (key only with `--llm`/`--llm-verify`) |@@ -40,14 +43,16 @@ commands referenced below.## Global conventions-**Reports.** Every Tier 1 and Tier 2 command accepts the same two report options:+**Reports.** Every Tier 1 and Tier 2 command accepts the same two report options.+Direct `tier1 PATH`, `tier1 validate PATH`, and `tier2 PATH` default to+`cli,json,html`; focused expert commands default to `cli`:| Flag | Default | Effect || --- | --- | --- |-| `-r, --report [cli\|json\|html\|markdown\|sarif]` | `cli` | Report format(s). Accepts comma- or space-separated values (`-r cli,json,html` or `-r cli json html`) and may be repeated. The compact default view writes html+json unless `-r` is passed explicitly, which is honored exactly (including `cli`). |+| `-r, --report [cli\|json\|html\|markdown\|sarif]` | `cli,json,html` for direct workflows; `cli` for focused commands | Report format(s). Accepts comma- or space-separated values (`-r cli,json,html` or `-r cli json html`) and may be repeated. The compact default view writes html+json unless `-r` is passed explicitly, which is honored exactly (including `cli`). || `-o, --output-dir DIRECTORY` | `reports` | Directory for generated reports. |-In practice: a default `validate` run (no `-r`) shows the compact pipeline view **and** writes `json` + `html` report files; passing `-r` takes over completely — `-r cli` really means terminal output only, no files. The standalone commands take the `cli` default literally: they print the full terminal report and write files only for the formats you request with `-r`. A `validate` run writes `skillevaluator-output-<timestamp>.json` / `.html` (plus `.md` with `-r markdown` or `.sarif.json` with `-r sarif`); standalone commands write a fixed `skillevaluator-<kind>` basename (for example `skillevaluator-quality.json`), so a re-run overwrites the previous report. Filename conventions and report anatomy live in [Reports & Results](reports.mdx).+In practice: a default `validate` run (no `-r`) shows the compact pipeline view **and** writes `json` + `html` report files; passing `-r` takes over completely — `-r cli` really means terminal output only, no files. The focused expert commands take the `cli` default literally: they print the full terminal report and write files only for the formats you request with `-r`. A `validate` run writes `skillevaluator-output-<timestamp>.json` / `.html` (plus `.md` with `-r markdown` or `.sarif.json` with `-r sarif`); standalone commands write a fixed `skillevaluator-<kind>` basename (for example `skillevaluator-quality.json`), so a re-run overwrites the previous report. Direct workflows write `skillevaluator-tier1` or `skillevaluator-tier2` reports in the selected formats and also overwrite previous files with that basename. Filename conventions and report anatomy live in [Reports & Results](reports.mdx).**Exit codes.** Commands communicate through a small exit-code contract — this is what your CI gates on (see [Gate Your CI](ci-integration.mdx)):@@ -60,9 +65,66 @@ In practice: a default `validate` run (no `-r`) shows the compact pipeline view**Version.** `skillevaluator --version` prints the installed version.-## Expert tier groups+## Direct tier workflows-Most commands are also reachable under a tier-prefixed group — `skillevaluator tier1 validate` behaves exactly like `skillevaluator validate`. The groups exist so you can discover a tier's commands in one place:+```bash title="Run each tier independently"+skillevaluator tier1 ./my-skill+skillevaluator tier2 ./my-skill --catalog ./skill-catalog.json+skillevaluator tier3 ./my-skill+```++There is no required `run` subcommand. A bare `tier1`, `tier2`, or `tier3` shows+help and does not evaluate the current directory. Prefix a path with `./` when+its name matches an expert command: `tier1 ./validate` evaluates a directory+named `validate`; `tier1 validate ./my-skill` invokes the Tier 1 workflow.++| Workflow | Default scope | Scope controls |+| --- | --- | --- |+| `tier1 PATH` | All static checks including dependencies; rubric, LLM security, and finding verification when a provider is configured | `--no-llm` skips LLM stages; `--llm` requires provider access; `--checks` selects static checks |+| `tier2 PATH` | Intra-skill analysis | `--catalog FILE` adds inter-skill comparison against a saved JSON catalog; without it, inter-skill is explicitly not run |+| `tier3 PATH` | One missing starter case is generated, then the provider-native agent runs in Docker with and without the skill | Accepts the [tier3 evaluate](#tier3-evaluate) options; missing-source generation is implicit |++Direct Tier 1 can run keyless, but marks its LLM stages as skipped. Missing+required scanner evidence remains incomplete. Direct Tier 2 needs both chat and+embedding access and takes one skill, not a collection. Create its catalog with+`similarity-check ./skills --save-catalog ./skill-catalog.json`. Direct Tier 3+preserves valid existing sources and rejects invalid ones; it does not overwrite+a dataset to repair it.++`validate PATH` runs all three tiers for skills by default, including Tier 3+autopilot. It is separate from these tier-only workflows.++### Direct Tier 1 options++| Flag | Default | Effect |+| --- | --- | --- |+| `--checks TEXT` | All applicable static checks, including dependency auditing | Comma-separated subset of static checks |+| `--llm / --no-llm` | Enabled when a provider is configured | Enable or skip rubric, LLM security, and finding verification; explicit `--llm` requires valid provider configuration |+| `--min-score INTEGER` | `70` | Minimum passing quality and rubric score, from 0 to 100 |+| `--profile TEXT` | `SKILLEVALUATOR_PROFILE`, then `external` | Validation policy profile |+| `--previous-version TEXT` | unset | Previous version for version checks |++Also accepts `-r/--report` and `-o/--output-dir` described above.++### Direct Tier 2 options++| Flag | Default | Effect |+| --- | --- | --- |+| `--catalog FILE` | unset | Saved JSON catalog for inter-skill comparison |+| `--threshold FLOAT` | `0.80` | Intra-skill candidate similarity threshold |+| `--similarity-threshold FLOAT` | `0.75` | Inter-skill reporting threshold |+| `--full-body` | off | Compare the full `SKILL.md` against a catalog created in full-body mode |++Both thresholds accept values from 0 to 1. Also accepts `-r/--report` and+`-o/--output-dir`. Direct Tier 3 accepts the options in+[tier3 evaluate](#tier3-evaluate), with missing-source generation already enabled.++## Expert tier subcommands++The commands below remain available for focused operations.+`skillevaluator tier1 validate PATH` now runs the same isolated Tier 1 workflow+as `tier1 PATH`. Use top-level `skillevaluator validate PATH` for the combined+pipeline.| Group | Members || --- | --- |@@ -70,7 +132,7 @@ Most commands are also reachable under a tier-prefixed group — `skillevaluator| `tier2` | `context-optimization-check`, `dedup-scan`, `similarity-check` || `tier3` | `evaluate`, `create-eval-dataset`, `init-custom-grader`, `init-harbor-task`, `doctor`, `view`, `compare`, `validate`, `harbor-view` |-The exceptions run in both directions. `health-check` and [models](#models) are top-level only, with no tier-prefixed twin. And two commands are advertised **only** inside the `tier3` group: [tier3 evaluate](#tier3-evaluate), documented with its full flag set below, and `tier3 validate`:+`health-check` and [models](#models) are top-level only. Two expert commands are advertised **only** inside the `tier3` group: [tier3 evaluate](#tier3-evaluate), documented with its full flag set below, and `tier3 validate`:### tier3 validate@@ -88,23 +150,25 @@ skillevaluator tier3 validate ./my-skill --strict## validate-Validate a skill, rule, workflow, or plugin. Tier 1 static, security, and quality checks always gate the exit code. Tier 2 deduplication runs and gates by default, but `--no-block-on-dedup` keeps the scan while making its findings advisory. Tier 3 live evaluation attaches as an advisory pass when enabled with `--tier3`, `--autopilot`, `--full`, or the supported `--agent-eval` compatibility alias; add `--block-on-agent-eval` to make its findings gate.+Validate a skill, rule, workflow, or plugin. For skills, all three tiers run by default. Tier 3 uses autopilot to reuse an existing evaluation source or generate one starter case when none exists; invalid sources are reported rather than replaced. Tier 1 static, security, and quality checks always gate the exit code. Tier 2 deduplication runs and gates by default, but `--no-block-on-dedup` keeps the scan while making its findings advisory. Tier 3 is advisory unless `--block-on-agent-eval` is set. Rules, workflows, and plugins retain their applicable validation stages without automatically enabling live skill evaluation.```bash title="Common invocations"-skillevaluator validate ./my-skill # Tier 1 + Tier 2+skillevaluator validate ./my-skill # Tier 1 + Tier 2 + Tier 3 autopilotskillevaluator validate ./my-skill --llm # add LLM security analysisskillevaluator validate ./my-skill -r cli,json,html # multiple report formatsskillevaluator validate ./my-skill --no-dedup # skip Tier 2 dedupskillevaluator validate ./my-skill --no-block-on-dedup # run Tier 2 as advisoryskillevaluator validate ./my-skill --external # strict publication profile-skillevaluator validate ./my-skill --tier3 -a codex # add advisory Tier 3 eval-skillevaluator validate ./my-skill --tier3 -a codex \+skillevaluator validate ./my-skill -a codex # choose the Tier 3 agent+skillevaluator validate ./my-skill -a codex \--block-on-agent-eval # gate on Tier 3 too-skillevaluator validate ./my-skill --autopilot # Tier 3, generating evals if missing-skillevaluator validate ./my-skill --full -a codex # everything, one shot+skillevaluator validate ./my-skill --no-autopilot # require an existing eval source+skillevaluator validate ./my-skill --full -a codex # compatibility: same default scope+skillevaluator validate ./my-skill --tiers 1,2 # skip live evaluation+skillevaluator validate ./my-skill --tiers 1 # static checks onlyskillevaluator validate ./my-skill --tiers 1,3 # explicit tier selection-skillevaluator validate ./skills-folder --full # whole catalog, serially-skillevaluator validate ./my-skill --tier3 -a codex,claude-code \+skillevaluator validate ./skills-folder # whole catalog, serially+skillevaluator validate ./my-skill -a codex,claude-code \--env-mode docker --harbor-keep-jobs # Tier 3, retain Harbor jobs```@@ -119,8 +183,8 @@ Applies to the whole run: target typing, policy profile, reports, tier selection| Flag | Default | Effect || --- | --- | --- || `--type [skill\|rules\|workflows\|plugin\|auto]` | `auto` | Force the content type instead of auto-detecting it from the target path. |-| `--tiers TEXT` | unset | Explicit tier selection, e.g. `--tiers 1,3`. Tier 1 always runs. |-| `--full` | off | One-shot validation: Tier 1+2+3 with `--autopilot` dataset generation. |+| `--tiers TEXT` | all three for skills | Explicit tier selection, e.g. `--tiers 1,2` skips live evaluation and `--tiers 1,3` skips dedup. Tier 1 always runs. |+| `--full` | unnecessary for skills | Compatibility flag for all three tiers with autopilot. Explicit tier selection and disable flags still apply. || `--verbose` | off | Print the full per-check detail stream instead of the compact pipeline view. || `--profile TEXT` | `$SKILLEVALUATOR_PROFILE`, then `external` | Validation profile: `external` or a custom name. || `--external` | — | Shortcut for `--profile external` (validate for public publication). |@@ -155,15 +219,15 @@ Embedding + LLM dedup; on by default, skips gracefully without a provider key.### Tier 3 · Live Agent Evaluation<Note>-The following flags are forwarded to the live-eval engine **only when Tier 3 is enabled** — with `--tier3`, `--autopilot`, `--full`, or the supported `--agent-eval` compatibility alias. On their own they have no effect. The Dockerfile-, workspace-, resource-, preflight-, and progress-tuning flags (`--custom-dockerfile-mode`, `--skill-workspace-mode`, the `--override-*` flags, `--agent-runtime-preflight`, and `--progress`) are not forwardable — use the standalone [tier3 evaluate](#tier3-evaluate) command for those.+The following flags are forwarded to the live-eval engine when Tier 3 is enabled, which is the default for skills. They do not re-enable a stage excluded by `--tiers` or `--no-tier3`. The Dockerfile-, workspace-, resource-, and progress-tuning flags (`--custom-dockerfile-mode`, `--skill-workspace-mode`, the `--override-*` flags, and `--progress`) are not forwardable — use the standalone [tier3 evaluate](#tier3-evaluate) command for those.</Note>| Flag | Default | Effect || --- | --- | --- |-| `--tier3, --agent-eval` | off | Also run Tier 3 live agent evaluation. Accepts a supported YAML/JSON dataset or native Harbor source and validates it before execution. Tier 3 is advisory by default. `--tier3` is the primary name; `--agent-eval` is a supported compatibility alias and is not currently deprecated. |+| `--tier3 / --no-tier3` | enabled for skills | Run or skip Tier 3 live agent evaluation. Accepts a supported YAML/JSON dataset or native Harbor source and validates it before execution. `--agent-eval` / `--no-agent-eval` are compatibility aliases. Explicit `--tiers` selection controls scope; `--no-tier3` also disables autopilot. || `--block-on-agent-eval / --no-block-on-agent-eval` | advisory | Choose whether Tier 3 findings, including missing or invalid selected task-source evidence, participate in the `validate` exit gate. This flag does not enable Tier 3 by itself. |-| `--autopilot` | off | Generate an evaluation source automatically when missing, then run Tier 3 (implies `--tier3`). |-| `-a, --agents TEXT` | `codex` | Comma-separated Harbor agents to evaluate. |+| `--autopilot / --no-autopilot` | enabled for skills | Generate one starter case when no evaluation source exists, then run Tier 3. Existing sources are reused unchanged; invalid sources are reported. `--no-autopilot` requires an existing source. Explicit tier selection or `--no-tier3` can exclude Tier 3. |+| `-a, --agents TEXT` | provider-native | Comma-separated Harbor agents to evaluate. Defaults: NVIDIA Build=`opencode`, OpenAI=`codex`, Anthropic=`claude-code`. || `--env-mode` | `docker` | Harbor environment backend (full list under [tier3 evaluate](#tier3-evaluate)). || `--skip-baseline` | off | Skip the without-skill baseline (no lift analysis, faster). || `--n-concurrent INTEGER` | unset | Concurrent eval cases per agent. |@@ -179,6 +243,7 @@ The following flags are forwarded to the live-eval engine **only when Tier 3 is| `--copy-repo` | off | Copy the surrounding repo into the eval environment. || `--timeout-multiplier FLOAT` | unset | Scale Harbor step timeouts. || `--harbor-keep-jobs` | off | Retain Harbor job dirs and artifacts after the run for inspection. |+| `--agent-runtime-preflight / --no-agent-runtime-preflight` | disabled | Opt into an extra agent-only execution of the first staged task before the measured A/B matrix. The CLI value overrides `harbor.agent_runtime_preflight`; without either, no extra agent runs. |Flags marked "unset" fall back to their matching keys in `evals/config.yml` where one exists, then to the built-in defaults ([Eval Datasets](eval-datasets.mdx) documents the config keys and precedence). The exception is `--results-dir`, which resolves independently of `evals/config.yml` (see [Reports & Results](reports.mdx)).@@ -309,12 +374,12 @@ skillevaluator tier3 evaluate ./my-skill --agents codex --env-mode docker```<Note>-The old top-level spelling `skillevaluator evaluate` still works for existing scripts, but no longer appears in `--help`; `tier3 evaluate` is the advertised name.+Use `skillevaluator tier3 PATH` for the complete workflow with automatic missing-source generation. `tier3 evaluate` retains explicit execution and opt-in `--autopilot`. The old top-level spelling `skillevaluator evaluate` still works for existing scripts but does not appear in `--help`.</Note>| Flag | Default | Effect || --- | --- | --- |-| `-a, --agents TEXT` | `codex` | Comma-separated Harbor agents. Supported: `claude-code`, `codex`, `opencode`; the alias `claude` is accepted for `claude-code`. See [Agents & Sandboxes](agents-and-sandboxes.mdx). |+| `-a, --agents TEXT` | provider-native | Comma-separated Harbor agents. Defaults: NVIDIA Build=`opencode`, OpenAI=`codex`, Anthropic=`claude-code`. Supported: `claude-code`, `codex`, `opencode`; the alias `claude` is accepted for `claude-code`. See [Agents & Sandboxes](agents-and-sandboxes.mdx). || `--env-mode` | `docker` | Where trials run. All 16 values: `docker`, `daytona`, `e2b`, `modal`, `runloop`, `langsmith`, `gke`, `novita`, `apple-container`, `singularity`, `islo`, `tensorlake`, `cwsandbox`, `wandb`, `use-computer`, `local`. Cloud modes are provider-managed Harbor backends enabled by the matching Harbor extra; `local` runs on your host. See [Agents & Sandboxes](agents-and-sandboxes.mdx). || `--autopilot` | off | Create one eval case when no dataset/task source exists, then evaluate. The case is LLM-generated with the configured provider, with a deterministic keyless template fallback; an existing source is never overwritten. || `--skip-baseline` | off | Skip the without-skill baseline (no lift analysis, faster). |@@ -332,7 +397,7 @@ The old top-level spelling `skillevaluator evaluate` still works for existing sc| `--grading-mode [default\|default_plus_custom\|custom_only]` | unset | Reward/grading mode — see [Custom Graders & Tasks](custom-graders.mdx). The legacy aliases `aces_default` (→ `default`) and `aces_plus_custom` (→ `default_plus_custom`) are still accepted. || `--results-dir DIRECTORY` | unset | Directory for live-eval results (precedence rules in [Reports & Results](reports.mdx)). || `--harbor-keep-jobs` | off | Retain Harbor job dirs and artifacts for inspection with [harbor-view](#harbor-view). |-| `--agent-runtime-preflight / --no-agent-runtime-preflight` | enabled | Run one real, bounded agent smoke task before the full A/B evaluation matrix. |+| `--agent-runtime-preflight / --no-agent-runtime-preflight` | disabled | Opt into an extra agent-only execution of the first staged task before the full A/B evaluation matrix. || `--timeout-multiplier FLOAT` | unset | Scale Harbor step timeouts. || `--override-cpus INTEGER` | unset | Override eval-environment CPU allocation (passed through to Harbor). || `--override-memory-mb INTEGER` | unset | Override eval-environment memory in MB (passed through to Harbor). |@@ -342,7 +407,11 @@ The old top-level spelling `skillevaluator evaluate` still works for existing sc| `--evaluator-container-revision TEXT` | unset | Digest-pinned evaluator image reference recorded beside the evaluated source. || `--progress [auto\|rich\|plain\|off]` | `auto` | Progress display for the run: `rich` live view, `plain` line output, or `off`. |-Without a `--model`/`--agent-model` override, each agent uses the selected provider's default model: `gpt-5.6-sol` on OpenAI, and Nemotron on the NVIDIA provider — `nvidia/nemotron-3-super-120b-a12b` for bridged agents, `nvidia/nemotron-3-nano-30b-a3b` for direct OpenCode.+Without a `--model`/`--agent-model` override, agent execution uses+`gpt-5.6-sol` for OpenAI, `claude-opus-5` for Anthropic, and+`nvidia/nemotron-3-super-120b-a12b` for NVIDIA Build. OpenCode displays the+last value as `nvidia/nvidia/nemotron-3-super-120b-a12b` because its adapter+namespace precedes the NVIDIA catalog ID.Flags marked "unset" fall back to their matching keys in `evals/config.yml` where one exists, then to the built-in defaults. The exception is `--results-dir`, which resolves independently of `evals/config.yml`.@@ -437,12 +506,12 @@ skillevaluator harbor-view ./path/to/jobs-dirCheck live-evaluation runtime readiness: the CLI install, the configured provider, the requested agents and their credentials, and the selected backend. Run it before your first `tier3 evaluate` — see [Agents & Sandboxes](agents-and-sandboxes.mdx) for what each check means.```bash title="Deep readiness check"-skillevaluator doctor --agents codex --env-mode docker+skillevaluator doctor --env-mode docker```| Flag | Default | Effect || --- | --- | --- |-| `-a, --agents TEXT` | `codex` | Comma-separated agents to check. |+| `-a, --agents TEXT` | provider-native | Comma-separated agents to check. Defaults: NVIDIA Build=`opencode`, OpenAI=`codex`, Anthropic=`claude-code`. || `--env-mode` | `docker` | Backend to check (same 16 values as [tier3 evaluate](#tier3-evaluate)). || `--agent-model TEXT` | unset | Per-agent model override, `AGENT=MODEL` (repeatable) — check readiness with the model each agent will actually run. || `--verify-models` | off | Live per-agent catalog probe. Prints pass for verified access, warn for an inconclusive or non-authoritative result (success or failure), and fail only for a definitive credential, model, or configuration rejection. |@@ -459,7 +528,7 @@ skillevaluator health-check| Flag | Default | Effect || --- | --- | --- |-| `-a, --agents TEXT` | `codex` | Comma-separated agents to check. |+| `-a, --agents TEXT` | provider-native | Comma-separated agents to check. Defaults: NVIDIA Build=`opencode`, OpenAI=`codex`, Anthropic=`claude-code`. || `--env-mode` | `docker` | Backend to check (same 16 values as [tier3 evaluate](#tier3-evaluate)). |## modelsdiff --git a/docs/configuration.mdx b/docs/configuration.mdxindex 2ebeb89e..d64afb23 100644--- a/docs/configuration.mdx+++ b/docs/configuration.mdx@@ -3,7 +3,36 @@ title: "Providers & Credentials"description: "Configure LLM providers, embeddings, and agent credentials for SkillEvaluator — and see exactly which commands run with no key at all."----This page gets SkillEvaluator's LLM-backed features working: choosing a provider, wiring embeddings for Tier 2, and separating evaluator credentials from agent credentials in Tier 3. Most of Tier 1 needs no credential at all — start with the map below to see whether you need a key in the first place.+**For NVIDIA Build, getting started requires just two variables: the provider+and its API key.** Default chat and embedding models are already configured:++```bash title="One provider and key for all three tiers"+export SKILL_EVAL_LLM_PROVIDER=nv_build+export NVIDIA_API_KEY='nvapi-...'+```++The same key covers Tier 1 LLM checks, Tier 2 embeddings and chat, and supported+Tier 3 agents in Docker or local mode. OpenAI likewise starts with+`SKILL_EVAL_LLM_PROVIDER=openai` and `OPENAI_API_KEY`, using Codex for Tier 3.+External scanners, agent runtimes, and sandboxes remain prerequisites; model+credentials do not install them.++```bash title="Run the tier you need"+skillevaluator tier1 ./my-skill+skillevaluator tier2 ./my-skill+skillevaluator tier3 ./my-skill+```++No model override is needed. Defaults are pinned in the installed release,+not automatically selected as the latest available model. Set+`SKILL_EVAL_LLM_MODEL` only when you want a different evaluator model; the+standard judge inherits it unless a judge override is set. Embeddings use their+own model, and Tier 3 agent selection is separate. NVIDIA Build's Codex and+Claude Code agents use a Super default even when the evaluator uses Nano.++Anthropic and Bedrock need a separate embedding provider for Tier 2; custom+OpenAI-compatible endpoints require an explicit URL and key, with optional model overrides.+Those advanced setups are covered below.For the exhaustive variable-by-variable inventory, see [Environment Variables](environment-variables.mdx).@@ -14,18 +43,22 @@ the live agents need from the backend configuration Harbor itself reads.## What needs a key-Tiers describe evaluation depth; credentials are a separate axis. This is the complete map — everything not listed under "needs a provider" runs fully offline:+Tiers describe evaluation depth; model credentials are a separate concern.+Keyless checks do not need an LLM provider, although dependency audits can+contact package and vulnerability services.-| Runs with no credential at all | Needs a provider key |+| Runs without an LLM credential | Needs a provider key || --- | --- |-| `validate --no-dedup` (all deterministic checks: schema, security scanners including secret detection, PII, license, code-integrity, unicode, quality, lint) | `rubric-eval` — LLM-as-judge scoring (chat LLM) |-| `quality-check`, `security-scan`, `pii-scan`, `lint-scripts` | `validate --llm` / `security-scan --llm` — deeper LLM security analysis |+| `tier1 PATH --no-llm` and `validate PATH --tiers 1` (deterministic checks: schema, security scanners including secret detection, PII, license, code-integrity, unicode, quality, lint; direct Tier 1 also checks dependencies) | `rubric-eval` — LLM-as-judge scoring (chat LLM) |+| `quality-check`, `security-scan`, `pii-scan`, `lint-scripts` | `tier1 PATH` automatically enables LLM stages when configured; `validate --llm` / `security-scan --llm` — deeper LLM security analysis || `doctor`, `health-check` (offline readiness probes by default; missing credentials are reported as not ready) | `--llm-verify` on `validate`, `security-scan`, `pii-scan` — LLM false-positive suppression || | All Tier 2 commands — embeddings API; `context-optimization-check` and `dedup-scan` also use a chat LLM (`similarity-check` is embeddings-only). A local OpenAI-compatible server works too — see [Fully local setup](#fully-local-setup) || Tier 3 scaffolding and inspection: `create-eval-dataset --no-llm`, `init-custom-grader`, `init-harbor-task`, `tier3 validate`, `view`, `harbor-view`, and `compare` | Tier 3 LLM dataset generation needs a provider key; `tier3 evaluate` needs a provider key plus a credential the selected live agent can use — with NVIDIA Build in `--env-mode docker` or `local`, one `NVIDIA_API_KEY` covers both roles || | `models` and `doctor --verify-models` — provider-catalog reachability and membership checks; public catalogs do not prove that an inference key works |-`validate` without `--no-dedup` stays usable keyless: the Tier 2 dedup pass skips gracefully when no embedding provider is configured.+`validate PATH` runs all three tiers for skills and needs the provider and+Tier 3 runtime setup. Use `--tiers 1` for keyless static checks. `--no-dedup`+alone skips Tier 2 but still runs Tier 3.Before Tier 3 prepares images or stages Harbor tasks, `tier3 evaluate` alsomakes a bounded credential-bearing catalog request for each distinct agent route@@ -34,18 +67,19 @@ A definitive native-provider credential rejection or deterministic Bedrockcredential/configuration error fails immediately. Catalog permission andmembership are not authoritative for OpenAI Responses access, and NVIDIA Buildor a compatible gateway may expose a catalog without authenticating inference,-so those checks are reported as degraded and evaluation continues to the real-per-agent runtime preflight. That smoke proves agent routes only: when a+so those checks are reported as degraded and evaluation continues. When enabled+with `--agent-runtime-preflight` or `harbor.agent_runtime_preflight: true`, the+extra agent-only execution proves agent routes only: when adegraded credential route is used solely by the standard grader, inference onthat route remains unproven until grading begins. The same applies when nativeHarbor must resolve at runtime whether a task or step verifier declarationsupersedes the configured judge fallback. Redacted per-route outcomes are retained under-`run_config.credential_validation` in `result.json`, including when that later-agent runtime preflight fails.+`run_config.credential_validation` in `result.json`, including when an enabled+agent runtime preflight fails. The extra execution is disabled by default.## Choose an LLM provider-Set `SKILL_EVAL_LLM_PROVIDER` to one of `openai`, `anthropic`, `nv_build`, `bedrock`, or `openai-compatible`. The selected provider determines which credential SkillEvaluator reads. All but `openai-compatible` ship a default model that `SKILL_EVAL_LLM_MODEL` overrides.+Set `SKILL_EVAL_LLM_PROVIDER` to one of `openai`, `anthropic`, `nv_build`, `bedrock`, or `openai-compatible`. The selected provider determines which credential SkillEvaluator reads. Each ships a default evaluator model that `SKILL_EVAL_LLM_MODEL` overrides.<Tabs><Tab title="OpenAI" language="openai">@@ -74,7 +108,9 @@ Set `SKILL_EVAL_LLM_PROVIDER` to one of `openai`, `anthropic`, `nv_build`, `bedrexport NVIDIA_API_KEY='nvapi-...'```- Default model: `nvidia/nemotron-3-nano-30b-a3b`. The endpoint is fixed to `https://integrate.api.nvidia.com/v1` — `SKILL_EVAL_LLM_BASE_URL` and `SKILL_EVAL_EMBEDDING_BASE_URL` do not override it. To point at a custom or self-hosted endpoint, use the `openai-compatible` provider instead.+ Default model: `nvidia/nemotron-3-super-120b-a12b`, shared by evaluator chat, Tier 3's default OpenCode agent, and the standard judge. The endpoint is fixed to `https://integrate.api.nvidia.com/v1` — `SKILL_EVAL_LLM_BASE_URL` and `SKILL_EVAL_EMBEDDING_BASE_URL` do not override it. To point at a custom or self-hosted endpoint, use the `openai-compatible` provider instead.++ The previous default, `nvidia/nemotron-3-nano-30b-a3b`, has a deprecated public endpoint. If you explicitly pinned that model in `SKILL_EVAL_LLM_MODEL`, remove the override to use the current default. Explicit model selections are preserved; SkillEvaluator does not silently switch models after a failed request.<Tip>The quickest start is a free NVIDIA API Catalog key from [build.nvidia.com](https://build.nvidia.com/), exported as `NVIDIA_API_KEY` — it covers LLM judging and Tier 2 embeddings with one credential.@@ -94,11 +130,24 @@ Set `SKILL_EVAL_LLM_PROVIDER` to one of `openai`, `anthropic`, `nv_build`, `bedr```bash title="OpenAI-compatible setup"export SKILL_EVAL_LLM_PROVIDER=openai-compatibleexport SKILL_EVAL_LLM_BASE_URL='http://your-server:8000/v1'- export SKILL_EVAL_LLM_MODEL='your-model-name'export SKILL_EVAL_LLM_API_KEY='your-key'```- All three values are required — there is no default model or endpoint. Any OpenAI-compatible server works: vLLM, Ollama, llama.cpp, NVIDIA NIM, or a hosted gateway.+ These three variables select the gateway. Model overrides are optional when the gateway serves the defaults below; no endpoint or credential is built into SkillEvaluator.++ | Role | Default model | Override |+ | --- | --- | --- |+ | Evaluator and standard judge | `nvidia/nvidia/nemotron-3-super-120b-long-ctx` | `SKILL_EVAL_LLM_MODEL`; judge-only: `LLM_JUDGE_MODEL` then `SKILL_EVAL_JUDGE_MODEL` |+ | Tier 2 embeddings | `nvidia/nvidia/nemotron-3-embed-1b` | `SKILL_EVAL_EMBEDDING_MODEL` |+ | Codex agent | `openai/openai/gpt-5.6-sol` | `--agent-model codex=MODEL` |+ | Claude Code agent | `aws/anthropic/bedrock-claude-opus-5` | `--agent-model claude-code=MODEL` |+ | OpenCode agent | `nvidia/nvidia/nemotron-3-super-120b-long-ctx` | `--agent-model opencode=openai/MODEL` |++ Gateways can use different catalog IDs. Supply those exact IDs through the overrides; SkillEvaluator never substitutes a different model after a request fails. OpenCode's `openai/` prefix selects its adapter and is removed before sending the catalog ID. `SKILL_EVAL_LLM_MODEL` controls evaluation and judging; it does not replace these separate gateway agent defaults. Agent selection uses `--agent-model` / `--model`, then `harbor.agents.AGENT.model`, then the harness default, and records the model source in the run report.++ For Tier 3 in Docker, OpenCode requires Chat Completions, Codex requires Responses, and Claude Code requires Anthropic Messages, each with tool-call support. Selecting a shared URL does not add those APIs to a server. See the [Claude gateway requirements](https://code.claude.com/docs/en/llm-gateway).++ Claude Code inherits the shared key and URL, stripping a terminal `/v1` from its API root while retaining any path prefix. An explicit `ANTHROPIC_BASE_URL` overrides that root. An explicit `ANTHROPIC_API_KEY` selects an independent Claude route: without `ANTHROPIC_BASE_URL`, it keeps the native Anthropic endpoint and defaults to `claude-opus-5`. CLI and skill-config model overrides still take precedence. Existing native-provider routes are unchanged.</Tab></Tabs>@@ -119,11 +168,15 @@ Tier 2 uses an OpenAI-compatible embeddings API. `SKILL_EVAL_EMBEDDING_PROVIDER`| Provider (`SKILL_EVAL_EMBEDDING_PROVIDER`) | Credential | Default embedding model || --- | --- | --- || `openai` | `OPENAI_API_KEY` | `text-embedding-3-small` |-| `nv_build` | `NVIDIA_API_KEY` | `nvidia/nv-embed-v1` |-| `openai-compatible` | `SKILL_EVAL_EMBEDDING_API_KEY` (falls back to `SKILL_EVAL_LLM_API_KEY`) | _(explicit — `SKILL_EVAL_EMBEDDING_MODEL` required)_ |+| `nv_build` | `NVIDIA_API_KEY` | `nvidia/nemotron-3-embed-1b` |+| `openai-compatible` | `SKILL_EVAL_EMBEDDING_API_KEY` (falls back to `SKILL_EVAL_LLM_API_KEY`) | `nvidia/nvidia/nemotron-3-embed-1b` |Use `SKILL_EVAL_EMBEDDING_MODEL` and `SKILL_EVAL_EMBEDDING_BASE_URL` to override defaults; for `openai-compatible`, the base URL falls back to `SKILL_EVAL_LLM_BASE_URL`. The `nv_build` endpoint is fixed to `https://integrate.api.nvidia.com/v1` — only its model can be overridden.+NVIDIA Build uses the same `NVIDIA_API_KEY` for chat and embeddings; no extra key is needed. Deduplication sends document inputs with `input_type=passage`, as required by the [NVIDIA embedding API](https://docs.api.nvidia.com/nim/reference/nvidia-nemotron-3-embed-1b-infer).++The previous NVIDIA default, `nvidia/nv-embed-v1`, is retired. Remove any explicit override to that model to use the current default. Rebuild comparison catalogs and embedding caches when changing models: vectors from different models cannot be compared, and similarity scores may change. A provider failure is reported as **INCOMPLETE**, not a duplicate-content finding.+<Note>Anthropic and Bedrock do not provide embeddings, and SkillEvaluator rejects them as embedding providers. When one of those is your LLM provider, configure an embedding-capable provider separately for Tier 2:@@ -173,7 +226,7 @@ The `openai-compatible` provider accepts any local OpenAI-compatible server (Oll## Tier 3 credentials: two roles-Live evaluation involves two distinct credentials, and they are not interchangeable:+Live evaluation has two credential roles. They can share a key when the selected provider supports both:| Role | Who uses it | How you configure it || --- | --- | --- |@@ -185,6 +238,11 @@ Both roles resolve from the operator's environment; a skill's `evals/config.yml`- **NVIDIA Build, one key** (`--env-mode docker` or `local`): a single `NVIDIA_API_KEY` powers the evaluator and all three supported agents — `opencode` calls NVIDIA Build directly, while `claude-code` and `codex` route through SkillEvaluator's compatibility bridge (in-container in Docker mode; an authenticated in-process host bridge in `local` mode). Agent models must be full NVIDIA Build catalog IDs in `publisher/model` form.- **NVIDIA Build on Harbor cloud modes** (`daytona`, `e2b`, ...): the bridge is not available. `claude-code` needs its own native `ANTHROPIC_API_KEY`, `codex` needs a full OpenAI Responses API credential (`OPENAI_API_KEY` plus `OPENAI_BASE_URL`), and each needs an explicit model via `--agent-model` or `harbor.agents.<agent>.model`.- **Matching native provider**: when the evaluator provider is the agent's own (for example `anthropic` with `claude-code`, or `openai` with `codex`), the same key serves both roles automatically.+- **OpenAI-compatible gateway**: Codex, OpenCode, and Claude Code inherit the shared URL and key. The gateway must support the selected harness's API and model. Explicit Claude credentials and endpoint settings take precedence as described above.++When `--agents` is omitted, SkillEvaluator chooses that native route:+NVIDIA Build uses OpenCode, OpenAI uses Codex, and Anthropic uses Claude Code.+Passing `--agents` always replaces the automatic selection.### Judge failures are not zero scores@@ -215,7 +273,7 @@ skillevaluator models --limit 20skillevaluator models --json```-`skillevaluator models` prints a filtered, bounded view of the provider catalog (`--limit` accepts 1–100, default 10; `--json` emits machine-readable output). It uses the same provider and credential resolution as evaluation, so it checks catalog routing and model discovery where that surface is supported. NVIDIA Build and some compatible gateways can expose a public catalog, so a listed model is not proof that the inference key works or that a given agent harness supports it. Tier 3's real per-agent runtime preflight is the stronger check for agent routes; a separate degraded standard-grader route remains unproven until grading begins. Bedrock exposes no HTTP model catalog, so `models` errors on that provider; use `doctor --verify-models` there instead.+`skillevaluator models` prints a filtered, bounded view of the provider catalog (`--limit` accepts 1–100, default 10; `--json` emits machine-readable output). It uses the same provider and credential resolution as evaluation, so it checks catalog routing and model discovery where that surface is supported. NVIDIA Build and some compatible gateways can expose a public catalog, so a listed model is not proof that the inference key works or that a given agent harness supports it. Tier 3's optional real per-agent runtime preflight is the stronger check for agent routes; enable it with `--agent-runtime-preflight` when that extra billable execution is appropriate. A separate degraded standard-grader route remains unproven until grading begins. Bedrock exposes no HTTP model catalog, so `models` errors on that provider; use `doctor --verify-models` there instead.### `runtime_env` is for task values, not credentials@@ -259,8 +317,8 @@ Setting `SKILLSPECTOR_PROVIDER` yourself overrides the bridge, but it must name<Accordion title=""SKILL_EVAL_EMBEDDING_PROVIDER is required because anthropic does not provide embeddings"">Your LLM provider is `anthropic` or `bedrock`, and neither offers an embeddings API. Set `SKILL_EVAL_EMBEDDING_PROVIDER` to `openai`, `nv_build`, or `openai-compatible` with the matching credential — see [Embeddings](#embeddings).</Accordion>- <Accordion title=""SKILL_EVAL_LLM_MODEL is required for openai-compatible providers"">- The `openai-compatible` provider has no defaults. Set all three of `SKILL_EVAL_LLM_MODEL`, `SKILL_EVAL_LLM_BASE_URL`, and `SKILL_EVAL_LLM_API_KEY` (local servers still require the key variable to be set, even if they ignore its value).+ <Accordion title="A gateway rejects the default model or API">+ Check your gateway's catalog and API support. Override `SKILL_EVAL_LLM_MODEL`, `SKILL_EVAL_EMBEDDING_MODEL`, or `--agent-model AGENT=MODEL` with its exact model IDs. OpenCode uses Chat Completions, Codex uses Responses, and Claude Code uses Anthropic Messages; a server exposing only one API cannot run all three harnesses. Older releases requiring an explicit model must be upgraded to use these defaults. Local servers still require the key variable even if they ignore its value.</Accordion></AccordionGroup>diff --git a/docs/environment-variables.mdx b/docs/environment-variables.mdxindex d981158a..e3d49ea9 100644--- a/docs/environment-variables.mdx+++ b/docs/environment-variables.mdx@@ -26,7 +26,7 @@ These variables select and configure the provider used for LLM-backed checks and| Variable | Default | Effect || --- | --- | --- || `SKILL_EVAL_LLM_PROVIDER` | auto-selected (see below) | Provider for chat and judging: `openai`, `anthropic`, `nv_build`, `bedrock`, or `openai-compatible`. |-| `SKILL_EVAL_LLM_MODEL` | OpenAI: `gpt-5.6-sol`; Anthropic: `claude-opus-5`; NVIDIA Build: `nvidia/nemotron-3-nano-30b-a3b`; Bedrock: `us.anthropic.claude-opus-5` | Chat model override. Required for `openai-compatible` — that provider has no default. Setting it to an empty string is a configuration error. For a lower-cost OpenAI option, use `gpt-5.4-mini`. |+| `SKILL_EVAL_LLM_MODEL` | OpenAI: `gpt-5.6-sol`; Anthropic: `claude-opus-5`; NVIDIA Build: `nvidia/nemotron-3-super-120b-a12b`; OpenAI-compatible: `nvidia/nvidia/nemotron-3-super-120b-long-ctx`; Bedrock: `us.anthropic.claude-opus-5` | Chat model override. For gateways, use the exact catalog ID when it differs from the default. Setting it to an empty string is a configuration error. For a lower-cost OpenAI option, use `gpt-5.4-mini`. || `SKILL_EVAL_LLM_BASE_URL` | provider default endpoint | Endpoint override; takes precedence over `OPENAI_BASE_URL` and `ANTHROPIC_BASE_URL`. Required for `openai-compatible`. Ignored by `nv_build`, whose endpoint is fixed to `https://integrate.api.nvidia.com/v1` — point a custom endpoint at the `openai-compatible` provider instead. || `SKILL_EVAL_LLM_API_KEY` | — | API key for the `openai-compatible` provider (local servers still require it to be set). || `SKILL_EVAL_MODEL_CATALOG_ALLOW_HTTP_HOSTS` | unset | Comma-separated hosts whose model catalog may be read over plain HTTP. Catalog reads otherwise require HTTPS unless the host is loopback, because the request carries a bearer token. Use this only when the transport is already encrypted and authenticated below HTTP — a WireGuard or comparable tunnel peer, for example — where the tool cannot see that the link is protected. Each entry matches one whole host as written, with no resolution, no suffix matching, and no wildcards. A plain-HTTP request to an accepted host also bypasses any inherited HTTP proxy, so the bearer token is never offered to an intermediary. The transport rechecks authorization before dispatch and rejects hosts that are no longer allowed. HTTPS routing is unchanged. |@@ -70,7 +70,7 @@ Tier 2 semantic checks use an OpenAI-compatible embeddings API. Workflow context| Variable | Default | Effect || --- | --- | --- || `SKILL_EVAL_EMBEDDING_PROVIDER` | falls back to `SKILL_EVAL_LLM_PROVIDER` | Embedding provider: `openai`, `nv_build`, or `openai-compatible`. `anthropic` and `bedrock` are rejected — they provide no embeddings API. |-| `SKILL_EVAL_EMBEDDING_MODEL` | provider default | Embedding model override. Required for `openai-compatible`. |+| `SKILL_EVAL_EMBEDDING_MODEL` | OpenAI: `text-embedding-3-small`; NVIDIA Build: `nvidia/nemotron-3-embed-1b`; OpenAI-compatible: `nvidia/nvidia/nemotron-3-embed-1b` | Optional embedding model override using the exact provider catalog ID. || `SKILL_EVAL_EMBEDDING_BASE_URL` | provider default endpoint | Embedding endpoint override; for `openai-compatible` it falls back to `SKILL_EVAL_LLM_BASE_URL`. Ignored by `nv_build`, whose endpoint is fixed to `https://integrate.api.nvidia.com/v1` — use `openai-compatible` for a custom endpoint. || `SKILL_EVAL_EMBEDDING_API_KEY` | falls back to `SKILL_EVAL_LLM_API_KEY` | API key for `openai-compatible` embeddings. `openai` and `nv_build` use their own provider keys. |diff --git a/docs/eval-datasets.mdx b/docs/eval-datasets.mdxindex 004f71eb..4f655033 100644--- a/docs/eval-datasets.mdx+++ b/docs/eval-datasets.mdx@@ -134,13 +134,15 @@ same templates `--no-llm` uses, so the command always succeeds. Exact defaultsfor every flag are in the[CLI Reference](cli-reference.mdx#create-eval-dataset).-You don't have to generate a dataset up front at all: `tier3 evaluate---autopilot` (and `validate --full` or `validate --autopilot`) creates exactly+You don't have to generate a dataset up front at all: `validate PATH`,+`tier3 PATH`, or `tier3 evaluate PATH --autopilot` creates exactlyone eval case when no evaluation source exists — LLM-generated with yourconfigured provider, falling back to a deterministic template case when nokey is available. Autopilot never overwrites an existing source; if`evals/evals.json` (or `evals/harbor/`) is already there, it runs with what-you wrote.+you wrote. Dataset generation does not replace the provider and runtime+requirements for the live evaluation. Use `validate PATH --no-autopilot` to+require an existing source instead of generating one.<Warning>`--force` overwrites `evals/evals.json` without a backup. `--refine` implies@@ -243,7 +245,7 @@ grading:| `harbor.n_concurrent` | integer ≥ 1 | Concurrent trials. || `harbor.max_agents` | integer ≥ 1 | Cap on agents evaluated in one run. || `harbor.timeout_multiplier` | number > 0 | Scales task timeouts. |-| `harbor.agent_runtime_preflight` | boolean | Bounded one-task smoke run that checks agent runtime readiness before the full evaluation. Default: `true`. |+| `harbor.agent_runtime_preflight` | boolean | Opt-in extra agent-only execution of the first staged task before the measured evaluation. Default: `false`; the CLI flag overrides this value. || `harbor.agent_workdir` | string | Working directory for the agent inside the container. || `harbor.resources` | `cpus`, `memory_mb`, `storage_mb` | Per-container resource requests. || `harbor.runtime_env` | list or mapping | Non-credential task values passed into the container. Prefer a list of plain names — each expands to `${NAME}` from your shell; a mapping sets explicit templates. Entries that name or reference operator-owned credentials (`OPENAI_API_KEY`, `ANTHROPIC_API_KEY`, `NVIDIA_API_KEY`, base-URL variables, AWS credential variables) fail with a hard error. Alias: `passthrough_env`. |diff --git a/docs/index.mdx b/docs/index.mdxindex 3292538c..a47e3e60 100644--- a/docs/index.mdx+++ b/docs/index.mdx@@ -32,7 +32,7 @@ Every tier is an independent entry point — run any command directly; nothing r| Tier | Representative commands | Requires || --- | --- | --- |-| [Tier 1](tier1-validation.mdx) | `validate`, `quality-check`, `security-scan`, `pii-scan`, `lint-scripts`, `rubric-eval` | No API key for deterministic checks; the `security` extra plus external Semgrep, SkillSpector, and Gitleaks executables for full scanner coverage; a provider key for LLM checks |+| [Tier 1](tier1-validation.mdx) | `tier1 PATH`, `quality-check`, `security-scan`, `pii-scan`, `lint-scripts`, `rubric-eval` | No API key for deterministic checks; the `security` extra plus external Semgrep, SkillSpector, and Gitleaks executables for full scanner coverage; a provider key for LLM checks || [Tier 2](tier2-deduplication.mdx) | `context-optimization-check`, `similarity-check` | An embeddings provider; intra-skill analysis also needs a chat LLM — local OpenAI-compatible endpoints work || [Tier 3](tier3-live-evaluation.mdx) | `create-eval-dataset`, `tier3 evaluate`, `compare` | No credential for keyless templates and report inspection; a provider key for LLM generation and grading; live evaluation also needs the agent CLI with its credential and a Docker, local OS, or cloud sandbox |@@ -53,7 +53,9 @@ You get a 0–100 quality score with an A–F grade. From there, the [Quickstart<img src="./assets/pipeline-overview.svg" alt="SkillEvaluator pipeline: skill directory through Tier 1 static validation, Tier 2 semantic deduplication, and Tier 3 live agent evaluation, producing reports and a verdict" /></Frame>-Tier 1's deterministic gates run offline. Tier 2 and the optional Tier 1 LLM checks need a provider key, and Tier 3 adds the agent credential and a sandbox. Every run ends in [reports](reports.mdx) — CLI, JSON, HTML, or Markdown.+`skillevaluator validate ./my-skill` runs all three tiers by default, with+Tier 3 autopilot reusing an existing evaluation source or creating one starter+case when none exists. Tier 1's deterministic gates run offline. Tier 2 and the optional Tier 1 LLM checks need a provider key, and Tier 3 adds the agent credential and a sandbox. Every run ends in [reports](reports.mdx) — CLI, JSON, HTML, or Markdown.## What Tier 3 measuresdiff --git a/docs/installation.mdx b/docs/installation.mdxindex e4ed106e..1ba858bb 100644--- a/docs/installation.mdx+++ b/docs/installation.mdx@@ -95,7 +95,7 @@ docker build -t skillevaluator:local .docker run --rm skillevaluator:local --versiondocker run --rm \-v "$PWD/tests/fixtures/skills/simple:/workspace/skills/simple:ro" \- skillevaluator:local validate /workspace/skills/simple --no-llm --no-dedup+ skillevaluator:local validate /workspace/skills/simple --no-llm --tiers 1```The image does not bundle the external Semgrep, SkillSpector, or Gitleaks executables, so their required scanner evidence is incomplete and `validate` exits non-zero — the other checks still run and the report is still produced (see [Troubleshooting](#troubleshooting)). Tier 3 still requires credentials for the selected provider and agent at runtime — pass them into the container as environment variables when you get there.@@ -149,7 +149,7 @@ skillevaluator --versionskillevaluator health-check```-`--version` confirms the CLI is on PATH — that is the whole smoke test for a Tier 1-only install. `health-check` goes one step further: a quick readiness check of the CLI and the selected live-eval backend (defaults: the `codex` agent, `docker` environment), useful once you plan to run Tier 3. On an install without the `tier3` extra or a configured provider it lists the missing pieces and exits non-zero — expected for a Tier 1-only setup, not a broken install. For a deeper diagnosis, `doctor` covers the same ground; add `doctor --verify-models` to make a live credential-bearing catalog request for each resolved agent model. A public or otherwise non-authoritative result is reported as a warning because catalog access alone does not prove inference access. See the [CLI Reference](cli-reference.mdx) for both commands.+`--version` confirms the CLI is on PATH — that is the whole smoke test for a Tier 1-only install. `health-check` goes one step further: a quick readiness check of the CLI and the selected live-eval backend (the agent follows the configured provider; the environment defaults to `docker`), useful once you plan to run Tier 3. On an install without the `tier3` extra or a configured provider it lists the missing pieces and exits non-zero — expected for a Tier 1-only setup, not a broken install. For a deeper diagnosis, `doctor` covers the same ground; add `doctor --verify-models` to make a live credential-bearing catalog request for each resolved agent model. A public or otherwise non-authoritative result is reported as a warning because catalog access alone does not prove inference access. See the [CLI Reference](cli-reference.mdx) for both commands.## Troubleshootingdiff --git a/docs/quickstart.mdx b/docs/quickstart.mdxindex 76e49547..1cb4b575 100644--- a/docs/quickstart.mdx+++ b/docs/quickstart.mdx@@ -1,109 +1,143 @@---title: Quickstart-description: Install SkillEvaluator and get your first skill evaluation result in about two minutes — no API key required.+description: Install SkillEvaluator, configure one provider and key, and run all three tiers or one tier independently.----Get your first evaluation result in about two minutes, with no API key. This page walks you from install to a scored skill, then adds a provider key to unlock the LLM-backed checks.+Set a provider and its key, then run `validate ./my-skill` for all three tiers.+Default models are already configured for NVIDIA Build and OpenAI.-## Evaluate your first skill+## Install and configure<Steps>### Install- One command installs the CLI with every Python feature. [uv](https://docs.astral.sh/uv/) provisions Python 3.13 automatically:+ [uv](https://docs.astral.sh/uv/) provisions Python 3.13 and installs every+ Python evaluation extra:```bash title="Install with uv"uv tool install --python 3.13 "skillevaluator[all] @ git+https://github.com/NVIDIA/SkillEvaluator.git"- ```-- Confirm the install:-- ```bash title="Verify"skillevaluator --version```- You should see `skillevaluator, version 0.3.0` (or newer).-<Tip>- If the shell can't find `skillevaluator`, run `uv tool update-shell` and open a new terminal — uv installs tools to `~/.local/bin`, which may not be on your PATH yet.+ If the shell cannot find `skillevaluator`, run `uv tool update-shell` and+ open a new terminal.</Tip>- ### Run the keyless quality check+ ### Set the provider and key- Point SkillEvaluator at any skill directory (a folder with a `SKILL.md`):+ These two variables configure NVIDIA Build for all three tiers:- ```bash title="No API key required"- skillevaluator quality-check ./my-skill+ ```bash title="NVIDIA Build"+ export SKILL_EVAL_LLM_PROVIDER=nv_build+ export NVIDIA_API_KEY='nvapi-...'```- You get a deterministic quality score from 0–100 and an A–F grade; the check passes at 70 (a C) or above by default.+ Get a key from [build.nvidia.com](https://build.nvidia.com/). That same key+ covers evaluator chat, Tier 2 embeddings, and supported Tier 3 agents in+ Docker or local mode. No model or embedding settings are required.- ### Run the complete offline Tier 1 validation+ For OpenAI, use `SKILL_EVAL_LLM_PROVIDER=openai` and `OPENAI_API_KEY` instead;+ the default Codex agent uses the same OpenAI key. Other providers and optional+ model overrides are covered in [Providers & Credentials](configuration.mdx).- `validate` runs the full static and security check suite. The `[all]` install- above includes the Python scanners, but complete evidence also requires the- separate Semgrep, SkillSpector, and Gitleaks executables. Install all three,- and pass `--no-dedup` to skip the Tier 2 pass that needs an embeddings key:+ ### Install the runtime tools- ```bash title="Complete offline Tier 1"- brew install semgrep gitleaks # macOS+ Full Tier 1 scanner coverage needs Semgrep, SkillSpector, and Gitleaks in+ addition to the Python extras:++ ```bash title="Tier 1 scanner setup on macOS"+ brew install semgrep gitleaksuv tool install git+https://github.com/NVIDIA/SkillSpector.git- skillevaluator validate ./my-skill --no-dedup```- On other platforms, follow [Installation: System tools](installation.mdx#system-tools)- for the Semgrep, SkillSpector, and Gitleaks setup. The terminal shows a- compact pipeline view, and HTML and JSON reports land in `reports/` — pass- `-r cli` explicitly for terminal-only output, or `--verbose` for the full- per-check detail stream. The command exits `0` only when every check passes- and every required scanner returns complete evidence. A failed check or- missing scanner evidence leaves the result `INCOMPLETE` and exits `1`. See- [Gate Your CI](ci-integration.mdx) for the full recipe.-- ### Add an LLM provider+ See [Installation](installation.mdx#system-tools) for other platforms.+ Tier 1 exits `0` when its selected checks pass. A failed check exits `1`;+ missing scanner evidence leaves the result `INCOMPLETE` and exits `1`.- LLM-backed features — rubric judging, deeper security analysis, and Tier 2 deduplication — use whichever provider you configure. A free [NVIDIA API Catalog](https://build.nvidia.com/) key covers both LLM judging and embeddings with one variable:+ Tier 3 needs a supported agent runtime and a running sandbox (Docker by+ default). Check those prerequisites before the first live run:- ```bash title="Configure a provider"- export SKILL_EVAL_LLM_PROVIDER=nv_build- export NVIDIA_API_KEY='nvapi-...'+ ```bash title="Tier 3 readiness"+ skillevaluator doctor --env-mode docker```+</Steps>- <Note>- If `SKILL_EVAL_LLM_PROVIDER` is unset and exactly one of `NVIDIA_API_KEY`, `OPENAI_API_KEY`, or `ANTHROPIC_API_KEY` is present, that provider is auto-selected; with more than one key set, you must name the provider explicitly. OpenAI, Anthropic, Bedrock, OpenAI-compatible endpoints, and fully local servers all work; see [Providers & Credentials](configuration.mdx).- </Note>+## Run all three tiers- ### Check for redundancy+Point `validate` at a directory containing a `SKILL.md`:- With a provider configured, find repeated guidance inside your skill, or compare every skill in a collection for overlap:+```bash title="Validate a skill"+skillevaluator validate ./my-skill+```- ```bash title="Tier 2 deduplication"- skillevaluator context-optimization-check ./my-skill # inside one skill- skillevaluator similarity-check ./skills # across a collection- ```+This runs Tier 1 checks, Tier 2 deduplication, and Tier 3 live evaluation.+Tier 3 uses autopilot: it reuses valid existing evaluation sources or generates+one starter case when none exists, then evaluates with and without the skill.+`--full` remains supported but is not required. Use `--tiers 1,2` to skip the+live evaluation, or `--no-autopilot` to require an existing source.- Cross-skill matches are classified by similarity, from `EXACT_DUPLICATE` down to `LOOSELY_RELATED`; intra-skill duplicate findings include a suggested fix. See [Tier 2: Deduplication](tier2-deduplication.mdx).-</Steps>+Tier 1 and Tier 2 gate the result by default. Tier 3 is advisory unless you+add `--block-on-agent-eval`; that setting affects the exit code, not whether+the live evaluation runs.-## Where to go next+## Run one tier++Point each command at a directory containing a `SKILL.md`. Each tier is+independent; it does not require running earlier tiers first.++```bash title="Choose the evaluation you need"+skillevaluator tier1 ./my-skill+skillevaluator tier2 ./my-skill+skillevaluator tier3 ./my-skill+```++| Command | What it runs |+| --- | --- |+| `tier1 PATH` | All static checks, including dependencies; with a provider, rubric judging, LLM security analysis, and finding verification also run |+| `tier2 PATH` | Intra-skill deduplication; add `--catalog ./skill-catalog.json` for inter-skill comparison |+| `tier3 PATH` | Creates one starter case when the evaluation source is missing, then runs the provider-native agent with and without the skill |++Without a catalog, Tier 2 explicitly reports that inter-skill comparison did+not run. Build a reusable catalog with+`skillevaluator similarity-check ./skills --save-catalog ./skill-catalog.json`.-| Your goal | Command | Guide | What success looks like |-| --- | --- | --- | --- |-| Gate skill quality and security | `validate` | [Tier 1: Validation](tier1-validation.mdx) | Exit code `0`, no CRITICAL findings |-| Find overlapping or duplicate skills | `similarity-check` | [Tier 2: Deduplication](tier2-deduplication.mdx) | No `EXACT_DUPLICATE` or `HIGH_SIMILARITY` findings |-| Prove the skill helps a real agent | `tier3 evaluate` | [Tier 3: Live Evaluation](tier3-live-evaluation.mdx) | Positive Skill Lift across the five dimensions |-| Run all three tiers in one shot | `validate --full` | [Tier 3: Live Evaluation](tier3-live-evaluation.mdx) | Exit code `0` plus an auto-generated dataset; Tier 3 is advisory unless you add `--block-on-agent-eval` |-| Block bad skills at merge time | `validate` in CI | [Gate Your CI](ci-integration.mdx) | A red check on failing PRs |-| Look up every flag and default | — | [CLI Reference](cli-reference.mdx) | — |+Tier 3 reuses valid existing datasets or task sources without rewriting them;+invalid sources produce an error. The generated starter case is enough to try+the pipeline, not to establish broad coverage. Generate and review a larger+dataset with `skillevaluator tier3 create-eval-dataset ./my-skill --full`.+Without `--agents`, Tier 3 selects OpenCode for NVIDIA Build, Codex for OpenAI,+and Claude Code for Anthropic. An explicit `--agents` value always wins.+Live evaluations make paid model calls; see+[Tier 3: Plan for cost](tier3-live-evaluation.mdx#plan-for-cost).-## What each tier needs+A tier without a path shows help. Expert subcommands remain available, such as+`skillevaluator tier1 security-scan ./my-skill` and+`skillevaluator tier3 evaluate ./my-skill`. No `run` subcommand is needed.-Every tier is an independent entry point — nothing requires running the earlier tiers first.+## Try a keyless check++You can start before configuring a provider:++```bash title="Deterministic quality score"+skillevaluator quality-check ./my-skill+```++This prints a score from 0–100 and an A–F grade, passing at 70 by default.+For the static Tier 1 suite, use `skillevaluator tier1 ./my-skill --no-llm`.+Scanner tools still need to be installed. Without a provider, direct Tier 1+also runs the static suite and reports the LLM stages as skipped; it does not+claim those stages passed.++## Where to go next-| Tier | CLI only | Provider key | External scanners | Docker + agent CLI |-| --- | --- | --- | --- | --- |-| **Tier 1** — validation | All deterministic checks | Only `rubric-eval` and the optional `--llm`/`--llm-verify` flags | Semgrep, SkillSpector, and Gitleaks for a complete security result | — |-| **Tier 2** — deduplication | — | Embeddings; intra-skill analysis also needs a chat LLM | — | — |-| **Tier 3** — live evaluation | Keyless dataset templates (`--no-llm`) and report viewing | LLM dataset generation and grading | — | Live runs need a sandbox plus the agent CLI and its credential |+| Your goal | Command | Guide |+| --- | --- | --- |+| Check quality and security | `tier1 ./my-skill` | [Tier 1: Validation](tier1-validation.mdx) |+| Check repeated and overlapping guidance | `tier2 ./my-skill --catalog ./skill-catalog.json` | [Tier 2: Deduplication](tier2-deduplication.mdx) |+| Measure a skill's effect on an agent | `tier3 ./my-skill` | [Tier 3: Live Evaluation](tier3-live-evaluation.mdx) |+| Run the combined pipeline | `validate ./my-skill` | [CLI Reference](cli-reference.mdx#validate) |+| Gate changes in CI | `validate` with explicit gates | [Gate Your CI](ci-integration.mdx) |-Ready for the deeper install options — extras, pip, source, Docker? Head to [Installation](installation.mdx).+For rules, workflows, and plugins, `validate` runs their applicable validation+stages without automatically enabling live skill evaluation.diff --git a/docs/tier1-validation.mdx b/docs/tier1-validation.mdxindex fbdc90cd..a7bd6827 100644--- a/docs/tier1-validation.mdx+++ b/docs/tier1-validation.mdx@@ -4,42 +4,63 @@ sidebar-title: "Tier 1: Validation"description: "Deterministic quality gates for skills — schema, quality, security, PII, license, code-integrity, Unicode, and script checks, plus optional LLM judging."----Tier 1 gives you a deterministic quality gate for your skill: schema, quality, security, PII, license, secrets, code-integrity, Unicode-safety, and script checks that all run offline once the scanner binaries are installed. You need no API key for any of it — the only LLM-backed pieces are `rubric-eval` and the optional `--llm`/`--llm-verify` flags, which require a configured provider (see [Providers & Credentials](configuration.mdx)).+Run Tier 1 directly to check a skill's structure, security, quality, and+dependencies:++```bash title="Run Tier 1"+skillevaluator tier1 ./my-skill+```++Static checks need no model key. With a configured provider, this command also+runs rubric judging, LLM security analysis, and finding verification. Without a+provider, those LLM stages are explicitly reported as skipped. Use `--no-llm`+for static checks only, or `--llm` to require a provider instead of allowing a+keyless run. Full scanner coverage still requires the external tools listed in+[Installation](installation.mdx#system-tools).++The two-variable [provider setup](configuration.mdx) is enough to configure the+LLM stages for NVIDIA Build or OpenAI. Calling `skillevaluator tier1` without a+path shows help; expert subcommands remain available below.## What Tier 1 checks-Tier 1 is exposed through one umbrella command and five standalone commands. Each is also available under the expert alias group as `skillevaluator tier1 <command>`.+The direct `tier1 PATH` workflow runs Tier 1 only, as does+`tier1 validate PATH`. The focused checks below are also available as+`skillevaluator tier1 <command>`. Top-level `validate` is the combined pipeline.| Command | Purpose | Needs a key? || --- | --- | --- |-| `validate` | Run the selected Tier 1 checks, Tier 2 deduplication by default, and optional advisory Tier 3 evaluation | No (only with `--llm`/`--llm-verify`) |+| Top-level `validate` | Run the selected Tier 1 checks, Tier 2 deduplication, and Tier 3 autopilot for skills | Yes for the full pipeline; `--tiers 1` selects keyless static checks || `quality-check` | Score skill quality across four weighted categories | No || `rubric-eval` | Run the nine-criterion LLM-as-judge rubric | Yes || `security-scan` | Run SkillSpector static scanning and optional LLM analysis | No (only with `--llm`/`--llm-verify`) || `pii-scan` | Detect PII, credentials, secrets, and local identifiers | No (only with `--llm-verify`) || `lint-scripts` | Run advisory AST-based checks on Python scripts | No |-`validate` is the umbrella command: Tier 1 checks always gate the exit code (non-zero on failure or incomplete required scanner evidence), Tier 2 dedup runs and gates by default while degrading gracefully without embedding access, and Tier 3 can be attached as an advisory pass with `--tier3`, `--autopilot`, `--full`, or an explicit tier selection such as `--tiers 1,3` (`--agent-eval` remains a supported compatibility alias and is not currently deprecated). Use `--no-block-on-dedup` to keep Tier 2 advisory or `--block-on-agent-eval` to promote Tier 3 into the gate.+`validate` is the umbrella command: all three tiers run by default for skills, with autopilot creating one starter evaluation case if no source exists. Tier 1 checks always gate the exit code (non-zero on failure or incomplete required scanner evidence), Tier 2 dedup runs and gates by default, and Tier 3 is advisory by default. Use `--tiers 1` for static checks only, `--no-block-on-dedup` to keep Tier 2 advisory, or `--block-on-agent-eval` to promote Tier 3 into the gate.++## Run the combined or focused validation commands-## Run a validation+Unlike direct `tier1 PATH`, `validate` includes Tier 2 and Tier 3 by default+for skills. Its Tier 1 LLM checks still run only when requested.<Steps>### Run the default suite- ```bash title="Tier 1 + Tier 2, no key needed"+ ```bash title="All three tiers, provider and runtime required"skillevaluator validate ./my-skill```- By default you get a compact pipeline view in the terminal — a per-check ticker per tier — and the run writes HTML and JSON report files unless you pass `-r` explicitly, which is then honored exactly (including `-r cli` for terminal-only output). Add `--verbose` for the full per-check detail stream instead of the compact view. Tier 2 dedup is skipped gracefully when no embedding provider is configured. The exit code is `0` when every gate passes and `1` when one fails.+ By default you get a compact pipeline view in the terminal — a per-check ticker per tier — and the run writes HTML and JSON report files unless you pass `-r` explicitly, which is then honored exactly (including `-r cli` for terminal-only output). Add `--verbose` for the full per-check detail stream instead of the compact view. The full pipeline needs the [provider and runtime setup](quickstart.mdx); use `--tiers 1` for static checks only. The exit code is `0` when every gate passes and `1` when one fails.### Run the complete offline gate- Install Gitleaks once, then disable dedup for a fully hermetic run:+ Install the scanners, then select only Tier 1 for a fully hermetic run:```bash title="Complete offline Tier 1"brew install gitleaks semgrepuv tool install git+https://github.com/NVIDIA/SkillSpector.git- skillevaluator validate ./my-skill --no-dedup+ skillevaluator validate ./my-skill --tiers 1```With `skillevaluator[security]`, Semgrep, SkillSpector, and Gitleaks installed, every required scanner produces evidence and the run is deterministic — the same input yields the same exit code, with nothing leaving your machine.@@ -49,7 +70,7 @@ Tier 1 is exposed through one umbrella command and five standalone commands. Eac`--checks` (alias `--tier1-checks`) takes a comma-separated subset when you want fast, targeted feedback:```bash title="Selective checks"- skillevaluator validate ./my-skill --checks schema,security+ skillevaluator validate ./my-skill --tiers 1 --checks schema,security```Only the selected Tier 1 checks run; the others are skipped entirely.@@ -59,12 +80,15 @@ Tier 1 is exposed through one umbrella command and five standalone commands. EacWith a provider configured, `--llm` (alias `--tier1-llm`; disable with `--no-llm` or `--no-tier1-llm`) adds LLM security analysis on top of the static findings, and `--llm-verify` runs a second pass that reviews each static finding in context:```bash title="LLM-backed validation"- skillevaluator validate ./my-skill --llm --llm-verify+ skillevaluator validate ./my-skill --tiers 1 --llm --llm-verify```Confirmed findings keep their original severity. High-confidence false positives stay visible but are downgraded to INFO and carry verification metadata explaining the review. Static scanning always runs first — if a requested LLM stage is unavailable or returns unusable evidence, the run does not silently turn green. `security-scan` and `pii-scan` accept `--llm-verify` too.</Steps>+Direct `tier1 PATH` and `tier1 validate PATH` print the terminal report and+write JSON and HTML reports by default. Use `-r cli` for terminal-only output.+Reports for any of these runs are selected with `-r`/`--report` (`cli`, `json`, `html`, `markdown`) and written to `-o`/`--output-dir` (default `reports/`). File naming, `BENCHMARK.md`, and the JSON contract are covered in [Reports & Results](reports.mdx).## Content types@@ -120,7 +144,7 @@ Precedence, highest to lowest: `--policy` overlay, `--profile` flag, `SKILLEVALU## The checks-The default set is `schema`, `version`, `security`, `pii`, `license`, `code-integrity`, `unicode`, `quality`, and `lint`. Only the `dependency` check requires explicit selection with `--checks` (alias `--tier1-checks`). Accepted check-name aliases include `code`/`code-risk` for `code-integrity`, `scripts`/`script-lint` for `lint`, `dependencies`/`deps`/`dependency-audit` for `dependency`, and `licence`/`license-check` for `license`.+For `validate`, the default set is `schema`, `version`, `security`, `pii`, `license`, `code-integrity`, `unicode`, `quality`, and `lint`. The `dependency` check requires explicit selection with `--checks` (alias `--tier1-checks`) for `validate`; direct `tier1 PATH` includes it by default. Accepted check-name aliases include `code`/`code-risk` for `code-integrity`, `scripts`/`script-lint` for `lint`, `dependencies`/`deps`/`dependency-audit` for `dependency`, and `licence`/`license-check` for `license`.<AccordionGroup><Accordion title="schema — frontmatter and repository governance">diff --git a/docs/tier2-deduplication.mdx b/docs/tier2-deduplication.mdxindex 30f15ede..f28943ea 100644--- a/docs/tier2-deduplication.mdx+++ b/docs/tier2-deduplication.mdx@@ -15,6 +15,33 @@ must not leave your machine.Both checks read local files only.No external vector database or catalog service is required.+## Run Tier 2++```bash title="Check one skill"+skillevaluator tier2 ./my-skill+```++This runs intra-skill analysis. To also compare with other skills, supply a+saved local JSON catalog:++```bash title="Check inside the skill and against a catalog"+skillevaluator tier2 ./my-skill --catalog ./skill-catalog.json+```++Without `--catalog`, the output explicitly reports that inter-skill comparison+did not run; it does not claim the skill is distinct from a catalog it never+checked. Use `similarity-check ./skills --save-catalog ./skill-catalog.json` to+build the catalog. Direct Tier 2 takes one skill directory; the expert+`similarity-check` command also supports collection scans.++Direct Tier 2 prints the terminal report and writes JSON and HTML reports to+`reports/` by default. Use `-r cli` for terminal-only output, or+`-o/--output-dir` to choose a different report directory.++For NVIDIA Build or OpenAI, the same provider and key configure both chat and+embeddings; no separate embedding variables are needed. See+[Providers & Credentials](configuration.mdx) for other providers.+## Which check do you need<CardGroup cols={2}>@@ -192,14 +219,17 @@ sharing like any other generated project artifact.`validate` runs the intra-skill deduplication pass by default as part of a fullevaluation. When the optional Tier 2 dependencies or an embeddings provider are-unavailable, the pass skips gracefully with a warning — a keyless `validate`-still completes. Use `--no-tier2` (or `--no-dedup`) to disable the pass-explicitly:+unavailable, the pass skips gracefully with a warning. The full skill pipeline+also includes Tier 3, which needs provider access and a sandbox. Use+`--no-tier2` (or `--no-dedup`) to disable only the deduplication pass:```bash title="Skip the Tier 2 pass"skillevaluator validate ./my-skill --no-dedup```+This still runs Tier 3 with autopilot. For keyless static checks only, select+`skillevaluator validate ./my-skill --tiers 1`.+All Tier 2 commands accept the standard report options (`-r cli,json,html,markdown`and `-o`). HIGH and CRITICAL findings, along with blocking analysis errors,produce a non-zero exit code; MEDIUM and LOW findings are advisory. Exitdiff --git a/docs/tier3-live-evaluation.mdx b/docs/tier3-live-evaluation.mdxindex 924ab2d5..ee9c0e5f 100644--- a/docs/tier3-live-evaluation.mdx+++ b/docs/tier3-live-evaluation.mdx@@ -6,8 +6,9 @@ description: "Run a real agent with and without your skill in a sandboxed enviroTier 3 answers the question the other tiers can't: **does your skill actuallymake an agent better at the task?** It is the one tier that needs real-infrastructure — an evaluator LLM key, the selected agent's own credential, and-Docker or another sandbox. This guide takes you from a skill directory to a+infrastructure — model access for the evaluator and selected agent, and+Docker or another sandbox. NVIDIA Build in Docker or local mode uses one key+for both roles; OpenAI with Codex can also share its key. This guide takes you from a skill directory to afinished with-skill vs. without-skill comparison.## What a live eval measures@@ -46,18 +47,45 @@ depth.| Requirement | How to check | Covered in || --- | --- | --- || The `tier3` extra installed (`[all]` includes it) | `skillevaluator health-check` | [Installation](installation.mdx) |-| An evaluator LLM provider key | `skillevaluator doctor --agents codex --env-mode docker` names any missing key | [Providers & Credentials](configuration.mdx) |+| An evaluator LLM provider key | `skillevaluator doctor --env-mode docker` names any missing key | [Providers & Credentials](configuration.mdx) || The agent and its credential | Same `doctor` run, with your agents; `tier3 evaluate` re-validates before any run | [Agents & Sandboxes](agents-and-sandboxes.mdx) || Docker running (the default environment) | `docker info` | [Agents & Sandboxes](agents-and-sandboxes.mdx) |-## Run your first evaluation+## Start with one command++After the [provider setup](configuration.mdx) and runtime prerequisites above:++```bash title="Run Tier 3"+skillevaluator tier3 ./my-skill+```++The direct workflow uses Docker and selects an agent from the provider: OpenCode+for NVIDIA Build, Codex for OpenAI, or Claude Code for Anthropic. If no accepted+dataset or task source exists, it generates one starter case and proceeds to the+live with-skill and without-skill comparison. It reuses valid existing sources+unchanged; invalid sources produce an error rather than being replaced.+A generated starter case lets you try the pipeline, but does not establish+broad positive and negative coverage.++The same agent, model, environment, grading, and reporting options described for+`tier3 evaluate` apply to this direct workflow. For example:++```bash title="Choose the agent"+skillevaluator tier3 ./my-skill --agents opencode --env-mode docker+```++`tier3 evaluate` remains available for explicit execution; its missing-source+generation requires `--autopilot`. To prepare and review a fuller dataset before+running, follow the steps below.++## Prepare and review a fuller evaluation<Steps toc={true}>### Check readiness```bash title="Verify the runtime before spending compute"-skillevaluator doctor --agents codex --env-mode docker+skillevaluator doctor --env-mode docker````doctor` takes seconds and names anything missing: the evaluator provider,@@ -65,8 +93,9 @@ the selected backend's prerequisites, and unsupported agent names. Add`--verify-models` to live-probe each agent's model against the provider'scatalog — one pass, warn, or fail row per agent — and `--agent-model AGENT=MODEL`to check an override before committing to a run. Warnings identify catalog-results that do not authoritatively prove inference access. Tier 3's runtime-preflight is the stronger check for agent routes; it does not invoke a separate+results that do not authoritatively prove inference access. If you need proof+before the measured matrix, `--agent-runtime-preflight` adds an agent-only+execution of the first staged task. It does not invoke a separatestandard-grader-only route before the evaluation reaches grading.`skillevaluator health-check` is the quickerCLI-and-backend variant; [Agents & Sandboxes](agents-and-sandboxes.mdx) covers@@ -157,8 +186,7 @@ skill source.### Run the comparison```bash title="With-skill vs. without-skill in Docker"-skillevaluator tier3 evaluate ./my-skill --agents codex --env-mode docker \- --agent-model codex=gpt-5.6-sol+skillevaluator tier3 ./my-skill --env-mode docker```Every supported agent harness works the same way:@@ -211,18 +239,19 @@ immediately. Non-authoritative OpenAI catalog permission or membership results,compatible-gateway catalog authentication, unsupported catalogs, and transientfailures are reported as degraded rather than blocking the run. A successfulNVIDIA Build or compatible-gateway listing is also inconclusive when that-catalog does not authenticate inference; the real per-agent runtime preflight-is the stronger check for agent routes. A degraded route used only by the+catalog does not authenticate inference. The optional real per-agent runtime+preflight is the stronger check for agent routes. A degraded route used only by thestandard grader remains unproven until grading begins. Native Harbor judge selection is likewise inconclusiveuntil runtime when no host judge override is set. `result.json` retains theredacted target-by-target outcome under `run_config.credential_validation`,-including when the subsequent agent runtime preflight fails.+including when an enabled agent runtime preflight fails.SkillEvaluator then builds the Harbor task bundle. Before spending the full-A/B matrix, a runtime preflight runs one real, bounded smoke task per agent to-confirm each agent runtime actually works (on by default; disable with-`--no-agent-runtime-preflight`). Harbor then starts the selected environment-and runs the agent in both arms; with standard grading, each transcript is+A/B matrix, you can pass `--agent-runtime-preflight` to run one extra agent-only+execution per agent. It uses the first staged evaluation task and its real prompt,+so it can consume substantial tokens and exercise task actions; grading is the+only part disabled. It is off by default. Harbor then starts the selected+environment and runs the agent in both arms; with standard grading, each transcript isjudged against the case's expected output and assertions using the configuredevaluator provider. Finally, SkillEvaluator collects the artifacts andcomputes the dimension scores, pass rates, and Skill Lift. Harbor task and job@@ -261,12 +290,11 @@ One deliberate exception collapses the two roles: with the `nv_build` providerin `--env-mode docker` or `local`, a single `NVIDIA_API_KEY` powers theevaluator and all three agents. Direct OpenCode talks to NVIDIA Build directly;Codex and experimental Claude Code use a Docker or local compatibility bridge.-SkillEvaluator never changes models silently: explicit overrides are preserved.-Without an override, bridged agents default to Nemotron Super-(`nvidia/nemotron-3-super-120b-a12b`); direct OpenCode defaults to-`nvidia/nemotron-3-nano-30b-a3b` (rendered-`nvidia/nvidia/nemotron-3-nano-30b-a3b`). Override models explicitly when you-want to compare harnesses or models:+Explicit model overrides are preserved exactly. Without an override, all three+agents default to Nemotron Super (`nvidia/nemotron-3-super-120b-a12b`); direct+OpenCode renders it as `nvidia/nvidia/nemotron-3-super-120b-a12b` because its+adapter namespace precedes the NVIDIA catalog ID. Override models explicitly+when you want to compare harnesses or models:```bash title="NVIDIA Build model overrides"skillevaluator tier3 evaluate ./my-skill --agents opencode --env-mode docker \@@ -304,27 +332,29 @@ cloud backend for untrusted code.| Use case | Command | When to use || --- | --- | --- |-| Full validation | `skillevaluator validate ./my-skill --tier3` | Add Tier 3 after the standard stages; advisory by default, optionally blocking |+| Full validation | `skillevaluator validate ./my-skill` | Run all three tiers; Tier 3 uses autopilot and is advisory by default, optionally blocking || Focused evaluation | `skillevaluator tier3 evaluate ./my-skill --agents codex` | Iterate on datasets, agents, environments, and grading settings |Attached to `validate`, Tier 3 is advisory by default: its results appear in thecombined reports without changing the exit code. Add `--block-on-agent-eval`to make its findings gate, including evidence that the selected YAML/JSON-dataset or native Harbor source is missing or invalid. `--full` is the one-shot-variant — Tier 1+2+3 with `--autopilot` dataset generation — and `--autopilot`-on its own enables Tier 3 while generating an eval case when none exists.+dataset or native Harbor source is missing or invalid. Autopilot is enabled+by default for skills: it generates one starter case when no source exists and+reuses valid existing sources unchanged. `--full` remains supported but is+unnecessary. Use `--tiers 1,2` or `--no-tier3` to skip live evaluation;+`--no-autopilot` requires an existing evaluation source.```bash title="Make attached Tier 3 blocking"-skillevaluator validate ./my-skill --tier3 --agents codex \+skillevaluator validate ./my-skill --agents codex \--block-on-agent-eval```<Note>`validate` forwards a dedicated Tier 3 flag group (`--agents`, `--env-mode`,`--grading-mode`, and the rest) to the live-eval engine whenever Tier 3 is-enabled — via `--tier3`, `--autopilot`, `--full`, or the `--agent-eval` alias.-`--agent-eval` is a supported compatibility alias and is not currently-deprecated. See the [CLI Reference](cli-reference.mdx) for the full group.+enabled, which is the default for skills. `--agent-eval` remains a supported+alias for `--tier3`; explicit tier selection and disable flags control the+scope. See the [CLI Reference](cli-reference.mdx) for the full group.</Note>## Plan for cost@@ -339,8 +369,8 @@ eval cases × agents × attempts × armsA standard comparison has two arms (with-skill and without-skill). Each trialcan make multiple agent-model requests, standard grading adds evaluator-model-calls, dataset generation can add more, and the default runtime preflight adds-one small smoke task per agent. Actual charges therefore depend on the selected+calls, dataset generation can add more, and the optional runtime preflight adds+one extra agent execution per agent. Actual charges therefore depend on the selectedmodels, token usage, agent behavior, and environment pricing; SkillEvaluatordoes not estimate a fixed dollar amount. Check the current pricing for your[NVIDIA API Catalog](https://build.nvidia.com/),@@ -388,7 +418,7 @@ The high-signal flags, with defaults:| `--max-agents` | selected-agent count | Maximum agents run in parallel || `--skip-baseline` | off | Skip the without-skill arm; faster, but no Skill Lift || `--stop-on-pass` | off | Stop a case's remaining attempts once one passes |-| `--agent-runtime-preflight` | on | One real, bounded smoke task per agent before the full A/B matrix; `--no-agent-runtime-preflight` skips it |+| `--agent-runtime-preflight` | off | Add one agent-only execution of the first staged task per agent before the full A/B matrix; `--no-agent-runtime-preflight` overrides a config value that enables it || `--progress` | `auto` | Progress rendering: `auto`, `rich` (live TTY view with secret redaction), `plain`, or `off` || `--autopilot` | off | When no evaluation source exists, generate exactly one eval case — with the configured provider, falling back to a deterministic keyless template — never overwriting an existing source || `--grading-mode` | `default` | `default`, `default_plus_custom`, or `custom_only` — see [Custom Graders & Tasks](custom-graders.mdx) |diff --git a/src/skillevaluator/cli.py b/src/skillevaluator/cli.pyindex 4e2cd673..c10a48b8 100644--- a/src/skillevaluator/cli.py+++ b/src/skillevaluator/cli.py@@ -51,6 +51,7 @@ from skillevaluator.tier1.commands import (run_validation,)from skillevaluator.tier3_environments import HARBOR_ENVIRONMENTS+from skillevaluator.tier_group import TierGroupfrom skillevaluator.utils.tier2_paths import (is_link_or_reparse,paths_refer_to_same_location,@@ -103,7 +104,7 @@ _TIER1_GROUP_DESC = "Static checks; LLM-free by default. Tier 1 gates the exit c_TIER2_GROUP = "Tier 2 · Deduplication"_TIER2_GROUP_DESC = "Embedding + LLM dedup; on by default, skips gracefully without a provider key."_TIER3_GROUP = "Tier 3 · Live Agent Evaluation"-_TIER3_GROUP_DESC = "Forwarded to the live-eval engine only when --agent-eval is also passed."+_TIER3_GROUP_DESC = "On by default for skills, with automatic dataset preparation; advisory unless made blocking."# Detailed, sectioned epilog for ``validate --help`` (parity with# ``skill-evaluator validate -h``). Authored pre-formatted and rendered raw.@@ -124,16 +125,17 @@ Report formats (-r/--report):Tiers:Tier 1 Static, security, and quality validation (gates the exit code).Tier 2 Embedding similarity + deduplication (on by default; --no-dedup).- Tier 3 Live agent evaluation (advisory; enable with --tier3, --autopilot,- --full, or the --agent-eval alias).+ Tier 3 Live agent evaluation (on by default for skills; advisory).+ Reuses an existing dataset or creates one when missing.+ Use --no-tier3 to skip, or --no-autopilot to require an existing dataset.-LLM analysis (Tier 1 security + Tier 3 dimension judge):- Off by default. Configure a public LLM provider with- SKILL_EVAL_LLM_PROVIDER and its provider credential, then add --llm.+LLM analysis:+ Configure SKILL_EVAL_LLM_PROVIDER and its provider credential for Tier 2/3.+ Tier 1 LLM security analysis is off by default; enable it with --llm.Add --llm-verify for a second pass that suppresses false positives.Examples:- skillevaluator validate ./my-skill # Tier 1 + Tier 2 (cli)+ skillevaluator validate ./my-skill # all three tiers + autopilotskillevaluator validate ./my-skill --llm # add LLM security scanskillevaluator validate ./my-skill -r cli -r json -r html # multiple reports (repeat -r)skillevaluator validate ./my-skill -r cli,json,html # comma-separated too@@ -141,17 +143,18 @@ Examples:skillevaluator validate ./my-skill --no-dedup # skip Tier 2 dedupskillevaluator validate ./my-skill --external # strict publish profileskillevaluator validate ./my-skill -c # continue on failure (record all issues)- skillevaluator validate ./my-skill --tier3 -a codex # + Tier 3 eval- skillevaluator validate ./my-skill --autopilot # + Tier 3, generating evals- skillevaluator validate ./my-skill --full -a codex # everything, one shot+ skillevaluator validate ./my-skill -a codex # choose the Tier 3 agent+ skillevaluator validate ./my-skill --no-autopilot # require an existing dataset+ skillevaluator validate ./my-skill --tiers 1,2 # omit live evaluationskillevaluator validate ./my-skill --tiers 1,3 # explicit tier selection- skillevaluator validate ./skills-folder --full # whole catalog, serially- skillevaluator validate ./my-skill --agent-eval -a codex,claude-code \\- --env-mode docker --harbor-keep-jobs # + Tier 3, retain Harbor jobs+ skillevaluator validate ./skills-folder # whole catalog, serially+ skillevaluator validate ./my-skill -a codex,claude-code \\+ --env-mode docker --harbor-keep-jobs # retain Harbor jobs"""_TOP_LEVEL_COMMAND_HELP_GROUPS = (+ ("Tier workflows", ("tier1", "tier2", "tier3")),("Core workflows", ("validate", "health-check", "doctor", "models")),("Tier 1 · Static and security",@@ -165,7 +168,6 @@ _TOP_LEVEL_COMMAND_HELP_GROUPS = ("Tier 3 · Live evaluation",("create-eval-dataset", "init-custom-grader", "init-harbor-task", "compare", "view", "harbor-view"),),- ("Expert aliases", ("tier1", "tier2", "tier3")),)@@ -173,6 +175,7 @@ _TOP_LEVEL_COMMAND_HELP_GROUPS = (cls=RichGroup,context_settings=CONTEXT_SETTINGS,help_command_groups=_TOP_LEVEL_COMMAND_HELP_GROUPS,+ show_banner=True,)@click.version_option(version=__version__, prog_name="skillevaluator")@click.option("-v", "--verbose", is_flag=True, help="Enable verbose logging.")@@ -186,19 +189,30 @@ def cli(verbose: bool) -> None:setup_logging(verbose=verbose)[email protected](cls=TierGroup)def tier1() -> None:- """Expert aliases for Tier 1 static checks."""+ """Run Tier 1 checks: tier1 PATH. LLM checks join automatically when configured.++ With no path, show help. Expert commands remain available below.+ """[email protected](cls=TierGroup)def tier2() -> None:- """Expert aliases for Tier 2 similarity and deduplication checks."""+ """Run Tier 2 deduplication: tier2 PATH [--catalog FILE].++ Compare content within the skill, and against other skills when a saved+ catalog is supplied. With no path, show help.+ """[email protected](cls=TierGroup)def tier3() -> None:- """Expert aliases for Tier 3 dataset creation and live agent evaluation."""+ """Run Tier 3 evaluation: tier3 PATH. Prepare a missing dataset automatically.++ Reuse valid existing tasks; otherwise create one starter case and evaluate+ with and without the skill. With no path, show help.+ """def _target_argument(func):@@ -407,7 +421,7 @@ def _run_dedup_or_skip(target_path: Path) -> list[ValidationResult]:try:resolve_embedding_provider()except ProviderConfigurationError as exc:- return _skip(f"Skipped: configure a public embedding provider ({exc}), or pass --no-dedup.")+ return _skip(f"Tier 2 skipped: embedding setup is required.\n\n{exc}\n\nTo skip Tier 2, pass --no-dedup.")return run_dedup_scan(target_path)@@ -559,7 +573,7 @@ def _evaluated_source_from_options(def _run_agent_eval_or_skip(target_path: Path,*,- agents: str,+ agents: str | None,env_mode: str,skip_baseline: bool,n_concurrent: int | None,@@ -575,6 +589,7 @@ def _run_agent_eval_or_skip(copy_repo: bool = False,timeout_multiplier: float | None = None,harbor_keep_jobs: bool = False,+ agent_runtime_preflight: bool | None = None,block_on_agent_eval: bool = False,validate_source: bool = True,evaluated_source: dict[str, str] | None = None,@@ -626,6 +641,7 @@ def _run_agent_eval_or_skip(copy_repo=copy_repo,timeout_multiplier=timeout_multiplier,harbor_keep_jobs=harbor_keep_jobs,+ agent_runtime_preflight=agent_runtime_preflight,evaluated_source=evaluated_source,)try:@@ -689,7 +705,7 @@ _TIER_BANNERS = {}-def _ensure_autopilot_dataset(skill_path: Path, *, quiet: bool = False) -> str | None:+def _ensure_autopilot_dataset(skill_path: Path, *, quiet: bool = False, progress: str = "auto") -> str | None:"""Ensure an evaluation source exists, generating one when missing.Mirrors the standalone ``evaluate --autopilot`` behavior: reuse an existing@@ -699,12 +715,15 @@ def _ensure_autopilot_dataset(skill_path: Path, *, quiet: bool = False) -> str |raises ``click.ClickException`` when generation cannot produce a source."""from skillevaluator.evaluation import EvaluationService+ from skillevaluator.evaluation.results import DatasetGenerationError+ from skillevaluator.inference.diagnostics import llm_failure_diagnostic, safe_llm_labelsfrom skillevaluator.provider_config import ProviderConfigurationError, resolve_llm_provider+ from skillevaluator.tier3.dataset_progress import dataset_generation_progressfrom skillevaluator.tier3.harbor.adapter import find_evals_file- def echo(message: str, *, err: bool = False) -> None:+ def echo(message: str) -> None:if not quiet:- click.echo(message, err=err)+ click.echo(message, err=True)def eval_source_exists() -> bool:return find_evals_file(skill_path) is not None or (skill_path / "evals" / "harbor").exists()@@ -721,21 +740,30 @@ def _ensure_autopilot_dataset(skill_path: Path, *, quiet: bool = False) -> str |echo("Autopilot: no public provider key is configured; generating one deterministic case.")else:no_llm = False- echo(f"Autopilot: generating one case with the configured {provider.provider} provider.")+ provider_name, model_name = safe_llm_labels(provider.provider, provider.model)+ echo(f"Autopilot: generating one case with {provider_name} / {model_name}.")- try:- service.create_autopilot_dataset(skill_path, use_llm=not no_llm)- except FileExistsError:- echo("Autopilot: an evaluation source appeared concurrently; reusing it unchanged.")- except Exception:- if no_llm:- raise- echo("Warning: Autopilot LLM generation failed; falling back to one deterministic case.", err=True)+ dataset_note = "auto-generated by autopilot — review evals/"+ with dataset_generation_progress(+ enabled=not quiet and progress != "off", stream=click.get_text_stream("stderr")+ ):+ try:+ service.create_autopilot_dataset(skill_path, use_llm=not no_llm)+ except FileExistsError:+ echo("Autopilot: an evaluation source appeared concurrently; reusing it unchanged.")+ except Exception as exc:+ if no_llm:+ raise+ cause = exc.__cause__ if isinstance(exc, DatasetGenerationError) else None+ diagnostic = llm_failure_diagnostic(cause if isinstance(cause, Exception) else exc)+ echo(f"Warning: Autopilot LLM generation failed.\n Reason: {diagnostic}")+ echo(" Falling back to one deterministic starter case; review evals/ before using it as a benchmark.")+ dataset_note = f"deterministic starter — LLM generation failed: {diagnostic} Review evals/."+ if not eval_source_exists():+ service.create_autopilot_dataset(skill_path, use_llm=False)if not eval_source_exists():- service.create_autopilot_dataset(skill_path, use_llm=False)- if not eval_source_exists():- raise click.ClickException("Autopilot dataset generation did not produce an evaluation source.")- return "auto-generated by autopilot — review evals/"+ raise click.ClickException("Autopilot dataset generation did not produce an evaluation source.")+ return dataset_noteexcept click.ClickException:raiseexcept Exception as exc:@@ -861,17 +889,21 @@ def _catalog_child_argv_from_ctx(ctx: click.Context, skill_dir: Path, output_dirargv.extend(["--policy", str(params["policy_path"])])if params.get("profile"):argv.extend(["--profile", str(params["profile"])])- if params.get("agent_eval"):+ if params.get("agent_eval") is True:argv.append("--tier3")+ elif params.get("agent_eval") is False:+ argv.append("--no-tier3")block_on_agent_eval = params.get("block_on_agent_eval")if block_on_agent_eval is True:argv.append("--block-on-agent-eval")elif block_on_agent_eval is False:argv.append("--no-block-on-agent-eval")- if params.get("autopilot"):+ if params.get("autopilot") is True:argv.append("--autopilot")- agents = params.get("agents", "codex")- if agents != "codex":+ elif params.get("autopilot") is False:+ argv.append("--no-autopilot")+ agents = params.get("agents")+ if agents:argv.extend(["--agents", str(agents)])env_mode = params.get("env_mode", "docker")if env_mode != "docker":@@ -907,6 +939,11 @@ def _catalog_child_argv_from_ctx(ctx: click.Context, skill_dir: Path, output_dirargv.extend(["--timeout-multiplier", str(params["timeout_multiplier"])])if params.get("harbor_keep_jobs"):argv.append("--harbor-keep-jobs")+ agent_runtime_preflight = params.get("agent_runtime_preflight")+ if agent_runtime_preflight is True:+ argv.append("--agent-runtime-preflight")+ elif agent_runtime_preflight is False:+ argv.append("--no-agent-runtime-preflight")# Every child renders its own BENCHMARK.md, so the identity has to reach# each one: dropping it here would publish a catalog of cards that all say# the evaluated source was never recorded.@@ -1268,7 +1305,8 @@ def _print_run_banner(target_path: Path, content_type: str, profile: str | None)is_flag=True,cls=GroupedOption,help_group=_RUN_GROUP,- help="One-shot validation: Tier 1+2+3 with --autopilot dataset generation.",+ help="Compatibility alias for all three tiers with autopilot (already the default for skills). "+ "Explicit tier selection and disable flags take precedence.",)@click.option("--verbose",@@ -1394,13 +1432,13 @@ def _print_run_banner(target_path: Path, content_type: str, profile: str | None)help="Make Tier 2 findings gate the exit code. Default: blocking.",)@click.option(- "--tier3",- "--agent-eval",+ "--tier3/--no-tier3",+ "--agent-eval/--no-agent-eval","agent_eval",- is_flag=True,+ default=None,cls=GroupedOption,help_group=_TIER3_GROUP,- help="Also run Tier 3 live agent evaluation (requires a valid eval dataset or native Harbor source).",+ help="Run Tier 3 live agent evaluation. On by default for skills; --no-tier3 also disables dataset generation.",)@click.option("--block-on-agent-eval/--no-block-on-agent-eval",@@ -1410,20 +1448,23 @@ def _print_run_banner(target_path: Path, content_type: str, profile: str | None)help="Make Tier 3 findings gate the exit code. Default: advisory.",)@click.option(- "--autopilot",- is_flag=True,+ "--autopilot/--no-autopilot",+ default=None,cls=GroupedOption,help_group=_TIER3_GROUP,- help="Generate an evaluation source automatically when missing, then run Tier 3 (implies --tier3).",+ help="Reuse the evaluation dataset or generate one when missing. On by default for skills; "+ "--no-autopilot requires an existing dataset. Explicit --no-tier3 or --tiers can exclude Tier 3.",)@click.option("-a","--agents",- default="codex",- show_default=True,+ default=None,cls=GroupedOption,help_group=_TIER3_GROUP,- help="Comma-separated Harbor agents to evaluate.",+ help=(+ "Comma-separated Harbor agents. Default follows the provider: "+ "NVIDIA Build=opencode, OpenAI=codex, Anthropic=claude-code."+ ),)@click.option("--env-mode",@@ -1540,6 +1581,13 @@ def _print_run_banner(target_path: Path, content_type: str, profile: str | None)help_group=_TIER3_GROUP,help="Retain Harbor job dirs/artifacts after the run for inspection.",)+ "--agent-runtime-preflight/--no-agent-runtime-preflight",+ default=None,+ cls=GroupedOption,+ help_group=_TIER3_GROUP,+ help="Run an extra agent-only execution of the first staged task before measured Tier 3 [default: disabled].",+)@click.option("--evaluated-source-repository",default=None,@@ -1580,10 +1628,10 @@ def validate(policy_path: Path | None,dedup: bool,block_on_dedup: bool | None,- agent_eval: bool,+ agent_eval: bool | None,block_on_agent_eval: bool | None,- autopilot: bool,- agents: str,+ autopilot: bool | None,+ agents: str | None,env_mode: str,skip_baseline: bool,n_concurrent: int | None,@@ -1599,6 +1647,7 @@ def validate(copy_repo: bool,timeout_multiplier: float | None,harbor_keep_jobs: bool,+ agent_runtime_preflight: bool | None,workers: int,evaluated_source_repository: str | None,evaluated_source_revision: str | None,@@ -1606,12 +1655,16 @@ def validate(report_formats: tuple[str, ...],output_dir: Path,) -> None:- """Validate a skill, rule, workflow, or plugin (Tier 1, with optional Tier 2/Tier 3).+ """Validate a skill through all three tiers, with automatic dataset preparation.Runs Tier 1 static, security, and quality checks (which gate the exit code),- plus blocking Tier 2 deduplication by default. Add --agent-eval for- advisory Tier 3 live evaluation, or --block-on-agent-eval to make it gate.- Reports are written per --report and --output-dir.+ blocking Tier 2 deduplication, and advisory Tier 3 live evaluation.+ For skills, reuse the existing dataset or generate one when missing.+ Use --tiers 1,2 to omit live evaluation, or --block-on-agent-eval to make+ Tier 3 gate the exit code. Reports follow --report and --output-dir.++ Rules, workflows, and plugins retain Tier 1/2 by default; their Tier 3+ evaluation requires an explicit --tier3, --autopilot, or --full request.A plugin (a bundle-reference ``agent_plugin.yaml``/``.yml`` manifest or acontained ``.claude-plugin/plugin.json`` manifest) is auto-detected and@@ -1656,12 +1709,13 @@ def validate(# still run Tier 3, but must bypass the skill-directory source preflight.preflight_tier3_source = resolved_type == CONTENT_TYPE_SKILL- # --full is the one-shot (everything incl. autopilot); --autopilot implies- # Tier 3; --tiers is the explicit selector. Explicit --no-tier2 still wins.- if full:- autopilot = True- if autopilot:- agent_eval = True+ # Skill validation is the complete workflow. Keep the old flags as aliases,+ # while explicit disable flags and the authoritative --tiers selector still+ # let callers narrow the work. Resolve per child for catalog validation.+ if agent_eval is None:+ agent_eval = preflight_tier3_source or full or autopilot is True+ if autopilot is None:+ autopilot = preflight_tier3_source or fullif tiers:selected = {part.strip() for part in tiers.split(",") if part.strip()}unknown = sorted(selected - {"1", "2", "3"})@@ -1673,8 +1727,8 @@ def validate(# --tiers is authoritative in both directions: an explicit selection# turns Tier 3 off even when --full/--autopilot/--tier3 turned it on.agent_eval = "3" in selected- if not agent_eval:- autopilot = False+ autopilot = autopilot and agent_eval+ tier3_path = target_path.parent if preflight_tier3_source and target_path.is_file() else target_pathfrom skillevaluator.constants import CONTENT_TYPE_UNKNOWN@@ -1709,7 +1763,7 @@ def validate(view = ValidateView(skill=f"{resolved_type}: {target_path.name}",tiers=planned_tiers,- command="validate --tier3" if agent_eval else "validate",+ command="validate",enabled=quiet,)if quiet:@@ -1803,7 +1857,7 @@ def validate(}.get(env_mode, "")model_display = ", ".join(agent_model) if agent_model else (model or "agent defaults")tier3_config_rows = [- detail_row("agent", agents),+ detail_row("agent", agents or "provider-native default"),detail_row("env", env_mode, env_note),detail_row("model", model_display),]@@ -1813,8 +1867,11 @@ def validate(# validate after Tier 1/2 already ran -- Tier 3 skips with the reason.autopilot_error: str | None = Noneif autopilot:+ view.tier_progress(+ tier3_index, [*tier3_config_rows, stage_hint_row("status", "preparing evaluation dataset…")]+ )try:- dataset_note = _ensure_autopilot_dataset(target_path, quiet=quiet)+ dataset_note = _ensure_autopilot_dataset(tier3_path, quiet=quiet)except (Exception, SystemExit) as exc:autopilot_error = f"autopilot dataset generation failed: {getattr(exc, 'message', exc)}"if not quiet:@@ -1833,7 +1890,7 @@ def validate(reporter = ViewProgressReporter(_on_engine_tail) if quiet else Nonetier3_result = _run_agent_eval_or_skip(- target_path,+ tier3_path,agents=agents,env_mode=env_mode,skip_baseline=skip_baseline,@@ -1850,6 +1907,7 @@ def validate(copy_repo=copy_repo,timeout_multiplier=timeout_multiplier,harbor_keep_jobs=harbor_keep_jobs,+ agent_runtime_preflight=agent_runtime_preflight,block_on_agent_eval=block_on_agent_eval_effective,validate_source=preflight_tier3_source,evaluated_source=evaluated_source,@@ -1879,7 +1937,7 @@ def validate(if preflight_tier3_source:from skillevaluator.tier3.evals_spec import validate_tier3_source- source_kind, _source_checks = validate_tier3_source(target_path)+ source_kind, _source_checks = validate_tier3_source(tier3_path)tier3_result.metadata.setdefault("tier3_applicability",{@@ -1928,9 +1986,7 @@ def validate(sarif_scan_root=target_path,sarif_repository_root=sarif_repository_root,)- _record_validate_json_report(- f"{report_basename_value}.json" if "json" in effective_formats else None- )+ _record_validate_json_report(f"{report_basename_value}.json" if "json" in effective_formats else None)# BENCHMARK.md is generated compulsorily for skills (matches SkillEvaluator), even on# failure, so the publication card always reflects the latest evaluation --@@ -2208,6 +2264,121 @@ def dedup_scan(raise click.ClickException("dedup scan failed")+def _workflow_report_options(func):+ func = _report_options(func)+ for param in func.__click_params__:+ if param.name == "report_formats":+ param.default = ("cli", "json", "html")+ param.help = "Report formats; repeat -r or separate values with commas."+ return func++[email protected](cls=cli.command_class, context_settings=CONTEXT_SETTINGS)[email protected]("skill_path", metavar="PATH", type=click.Path(exists=True, file_okay=False, path_type=Path))[email protected]("--checks", default=None, help="Select static checks; by default all checks include dependency auditing.")+ "--llm/--no-llm", default=None, help="Include rubric, LLM security, and verification [default: when configured]."+)[email protected]("--min-score", type=click.IntRange(0, 100), default=70, show_default=True)[email protected]("--profile", default=None, help="Validation policy profile [default: external].")[email protected]("--previous-version", default=None, help="Previous version for version checks.")+@_workflow_report_options+def _tier1_workflow(+ skill_path: Path,+ checks: str | None,+ llm: bool | None,+ min_score: int,+ profile: str | None,+ previous_version: str | None,+ report_formats: tuple[str, ...],+ output_dir: Path,+) -> None:+ """Run Tier 1 static checks and configured LLM checks for one skill."""+ from skillevaluator.tier_workflows import run_tier1_workflow+ from skillevaluator.validators.policy import resolve_policy++ try:+ policy = resolve_policy(profile=profile)+ except (FileNotFoundError, ValueError) as exc:+ raise click.ClickException(str(exc)) from exc+ results = run_tier1_workflow(+ skill_path,+ checks=checks,+ llm=llm,+ min_score=min_score,+ profile=policy,+ previous_version=previous_version,+ )+ if not emit_reports(+ results,+ report_formats=report_formats,+ output_dir=output_dir,+ basename=report_basename("tier1"),+ policy=policy,+ target_path=str(skill_path),+ ):+ raise click.ClickException("Tier 1 checks failed or were incomplete")++[email protected](cls=cli.command_class, context_settings=CONTEXT_SETTINGS)[email protected]("skill_path", metavar="PATH", type=click.Path(exists=True, file_okay=False, path_type=Path))+ "--catalog",+ type=click.Path(exists=True, dir_okay=False, path_type=Path),+ default=None,+ help="Saved JSON catalog for inter-skill comparison.",+)+ "--threshold",+ type=float,+ default=0.80,+ show_default=True,+ callback=_validate_similarity_threshold,+ help="Intra-skill similarity threshold.",+)+ "--similarity-threshold",+ type=float,+ default=0.75,+ show_default=True,+ callback=_validate_similarity_threshold,+ help="Inter-skill similarity threshold.",+)[email protected]("--full-body", is_flag=True, help="Compare full SKILL.md content against a full-body catalog.")+@_workflow_report_options+def _tier2_workflow(+ skill_path: Path,+ catalog: Path | None,+ threshold: float,+ similarity_threshold: float,+ full_body: bool,+ report_formats: tuple[str, ...],+ output_dir: Path,+) -> None:+ """Run intra-skill deduplication and optional inter-skill catalog comparison."""+ from skillevaluator.tier_workflows import run_tier2_workflow++ _reject_linked_tier2_root(skill_path)+ basename = report_basename("tier2")+ _reject_catalog_report_collisions(catalog, report_formats=report_formats, output_dir=output_dir, basename=basename)+ results = run_tier2_workflow(+ skill_path,+ catalog=catalog,+ threshold=threshold,+ similarity_threshold=similarity_threshold,+ full_body=full_body,+ )+ sanitize_tier2_results(results, skill_path, catalog)+ if not emit_reports(+ results,+ report_formats=report_formats,+ output_dir=output_dir,+ basename=basename,+ target_path=str(skill_path),+ ):+ raise click.ClickException("Tier 2 checks failed or were incomplete")++# Hidden top-level spelling of ``tier3 evaluate`` — kept working for scripts,# but the tier namespace is the advertised name to avoid a duplicate surface.@cli.command(hidden=True)@@ -2215,9 +2386,11 @@ def dedup_scan(@click.option("-a","--agents",- default="codex",- show_default=True,- help="Comma-separated Harbor agents (claude is an alias for claude-code).",+ default=None,+ help=(+ "Comma-separated Harbor agents (claude aliases claude-code). Default follows the provider: "+ "NVIDIA Build=opencode, OpenAI=codex, Anthropic=claude-code."+ ),)@click.option("--env-mode", default="docker", show_default=True, type=ENV_MODE_CHOICE)@click.option(@@ -2247,7 +2420,7 @@ def dedup_scan(@click.option("--agent-runtime-preflight/--no-agent-runtime-preflight",default=None,- help="Run one real agent smoke task before the full evaluation matrix [default: enabled].",+ help="Run an extra agent-only execution of the first staged task before the full matrix [default: disabled].",)@click.option("--timeout-multiplier", type=float, default=None)@click.option("--override-cpus", type=int, default=None)@@ -2279,7 +2452,7 @@ def dedup_scan()def evaluate(skill_path: Path,- agents: str,+ agents: str | None,env_mode: str,autopilot: bool,skip_baseline: bool,@@ -2320,7 +2493,7 @@ def evaluate(evaluator_container_revision,)if autopilot:- _ensure_autopilot_dataset(skill_path)+ _ensure_autopilot_dataset(skill_path, progress=progress)options = EvaluationOptions(skill_path=skill_path,@@ -2527,9 +2700,11 @@ def models_command(limit: int, as_json: bool) -> None:@click.option("-a","--agents",- default="codex",- show_default=True,- help="Comma-separated Harbor agents (claude is an alias for claude-code).",+ default=None,+ help=(+ "Comma-separated Harbor agents (claude aliases claude-code). Default follows the provider: "+ "NVIDIA Build=opencode, OpenAI=codex, Anthropic=claude-code."+ ),)@click.option("--env-mode", default="docker", show_default=True, type=ENV_MODE_CHOICE)@click.option("--agent-model", multiple=True, help="Per-agent model override, AGENT=MODEL.")@@ -2538,7 +2713,7 @@ def models_command(limit: int, as_json: bool) -> None:is_flag=True,help="Check resolved agent-model catalog reachability with a live credential-bearing request.",)-def doctor(agents: str, env_mode: str, agent_model: tuple[str, ...], verify_models: bool) -> None:+def doctor(agents: str | None, env_mode: str, agent_model: tuple[str, ...], verify_models: bool) -> None:"""Check live-evaluation runtime readiness."""from skillevaluator.tier3.commands import doctor as tier3_doctor@@ -2553,9 +2728,14 @@ def doctor(agents: str, env_mode: str, agent_model: tuple[str, ...], verify_mode@cli.command("health-check")[email protected]("-a", "--agents", default="codex", show_default=True)+ "-a",+ "--agents",+ default=None,+ help="Agent list; default follows the configured provider.",+)@click.option("--env-mode", default="docker", show_default=True, type=ENV_MODE_CHOICE)-def health_check(agents: str, env_mode: str) -> None:+def health_check(agents: str | None, env_mode: str) -> None:"""Quick readiness check for the CLI and selected live-eval backend."""from skillevaluator.tier3.commands import doctor as tier3_doctor@@ -2584,7 +2764,8 @@ def harbor_view(jobs_dir: Path) -> None:# Expert aliases that intentionally share the same command implementations.-tier1.add_command(validate, "validate")+tier1.workflow = _tier1_workflow+tier1.add_command(copy.copy(_tier1_workflow), "validate")tier1.add_command(quality_check, "quality-check")tier1.add_command(rubric_eval, "rubric-eval")tier1.add_command(security_scan, "security-scan")@@ -2594,6 +2775,7 @@ tier1.add_command(lint_scripts, "lint-scripts")tier2.add_command(similarity_check, "similarity-check")tier2.add_command(context_optimization_check, "context-optimization-check")tier2.add_command(dedup_scan, "dedup-scan")+tier2.workflow = _tier2_workflow# The namespace registration stays visible; only the top-level duplicate is# hidden (same underlying command, shared params and behavior).@@ -2609,6 +2791,10 @@ tier3.add_command(init_harbor_task, "init-harbor-task")tier3.add_command(compare, "compare")tier3.add_command(view, "view")tier3.add_command(doctor, "doctor")++from skillevaluator.tier3.workflow import build_tier3_workflow++tier3.workflow = build_tier3_workflow(evaluate)cli.add_command(harbor_view, "harbor-view")diff --git a/src/skillevaluator/cli_help.py b/src/skillevaluator/cli_help.pyindex c8db2818..f59cdaf6 100644--- a/src/skillevaluator/cli_help.py+++ b/src/skillevaluator/cli_help.py@@ -18,6 +18,7 @@ from __future__ import annotationsimport inspectimport osimport re+import shutilimport sysimport click@@ -27,6 +28,8 @@ from rich.table import Tablefrom rich.text import Textfrom rich.theme import Theme+from skillevaluator import __version__+# Color scheme for the help screen. Kept intentionally small and semantic so the# palette can be tweaked in one place._HELP_THEME = Theme(@@ -45,6 +48,41 @@ _HELP_THEME = Theme(_INDENT = (0, 0, 0, 2)+# ANSI Shadow lettering, stored as text so no font dependency is needed at runtime.+# Keep the full letter shapes; smaller terminals get a plain title, not squeezed art.+_WORDMARK = """███████╗██╗ ██╗██╗██╗ ██╗ ███████╗██╗ ██╗ █████╗ ██╗ ██╗ ██╗ █████╗ ████████╗ ██████╗ ██████╗+██╔════╝██║ ██╔╝██║██║ ██║ ██╔════╝██║ ██║██╔══██╗██║ ██║ ██║██╔══██╗╚══██╔══╝██╔═══██╗██╔══██╗+███████╗█████╔╝ ██║██║ ██║ █████╗ ██║ ██║███████║██║ ██║ ██║███████║ ██║ ██║ ██║██████╔╝+╚════██║██╔═██╗ ██║██║ ██║ ██╔══╝ ╚██╗ ██╔╝██╔══██║██║ ██║ ██║██╔══██║ ██║ ██║ ██║██╔══██╗+███████║██║ ██╗██║███████╗███████╗ ███████╗ ╚████╔╝ ██║ ██║███████╗╚██████╔╝██║ ██║ ██║ ╚██████╔╝██║ ██║+╚══════╝╚═╝ ╚═╝╚═╝╚══════╝╚══════╝ ╚══════╝ ╚═══╝ ╚═╝ ╚═╝╚══════╝ ╚═════╝ ╚═╝ ╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═╝"""+++def _welcome_banner(command: click.Command, ctx: click.Context, *, width: int) -> RenderableType | None:+ """Brand interactive root help without adding output to command execution."""+ if (+ not getattr(command, "show_banner", False)+ or ctx.parent is not None+ or os.environ.get("TERM") in {"dumb", "unknown"}+ or not sys.stdout.isatty()+ or not sys.stderr.isatty()+ ):+ return None++ try:+ _WORDMARK.encode(sys.stdout.encoding or "utf-8")+ supports_blocks = True+ except UnicodeEncodeError:+ supports_blocks = False+ tagline = "Static checks · Deduplication · Live evaluation"+ if supports_blocks and width >= max(map(len, _WORDMARK.splitlines())):+ heading = Text(_WORDMARK, style="bold #76b900")+ heading.highlight_regex(r"[╔╗╚╝═║]+", style="dim #76b900")+ lines = [Text(""), heading, Text(""), Text(f"v{__version__} · {tagline}", style="dim")]+ else:+ lines = [Text(f"SKILLEVALUATOR v{__version__}", style="bold #76b900"), Text(tagline, style="dim")]+ return Group(*lines)+class GroupedOption(click.Option):"""``click.Option`` that records the help section it belongs to.@@ -107,7 +145,9 @@ def _description(command: click.Command) -> RenderableType | None:def _definition_table(rows: list[tuple[str, str]], *, key_style: str) -> RenderableType:table = Table.grid(padding=(0, 2, 0, 0))- table.add_column(style=key_style, no_wrap=True)+ # Long choice lists must not consume the entire terminal and hide the+ # description column (notably Tier 3's environment choices).+ table.add_column(style=key_style, max_width=38, overflow="fold")table.add_column(style="help.text")for key, value in rows:table.add_row(Text(key), Text(value or ""))@@ -224,15 +264,19 @@ def _epilog(command: click.Command) -> RenderableType | None:def render_help(command: click.Command, ctx: click.Context, *, width: int | None = None) -> str:"""Render a command's help screen as a (optionally colorized) string."""color = _wants_color(ctx)- # Use an explicit color system (not "auto") so styles survive ``capture()``,- # which has no attached terminal to auto-detect against. "standard" (8/16- # colors) is universally supported and covers our palette.+ help_width = width or 80+ # The wordmark can use a wide terminal while help keeps Click's readable line+ # length. Conversely, Click's minimum width of 50 must not widen a tiny banner.+ terminal_width = shutil.get_terminal_size().columns+ banner = _welcome_banner(command, ctx, width=terminal_width)+ # Detect terminal capabilities before capture so the banner can use NVIDIA+ # green on truecolor terminals and degrade to the supported palette elsewhere.console = Console(theme=_HELP_THEME,- width=width or 80,+ width=max(help_width, terminal_width) if banner is not None else help_width,highlight=False,force_terminal=color,- color_system="standard" if color else None,+ color_system=("standard" if os.environ.get("TERM") in {"dumb", "unknown"} else "auto") if color else None,)sections = [@@ -252,7 +296,10 @@ def render_help(command: click.Command, ctx: click.Context, *, width: int | Nonebody.append(section)with console.capture() as capture:- console.print(Group(*body))+ if banner is not None:+ console.print(banner, width=terminal_width)+ console.print()+ console.print(Group(*body), width=help_width)# Strip the trailing column padding rich adds to aligned table cells so the# output has no trailing whitespace (parity with Click's own help).return "\n".join(line.rstrip() for line in capture.get().splitlines()) + "\n"@@ -275,10 +322,12 @@ class RichGroup(click.Group):self,*args: object,help_command_groups: tuple[tuple[str, tuple[str, ...]], ...] = (),+ show_banner: bool = False,**kwargs: object,) -> None:super().__init__(*args, **kwargs)self.help_command_groups = help_command_groups+ self.show_banner = show_bannerdef format_help(self, ctx: click.Context, formatter: click.HelpFormatter) -> None:formatter.write(render_help(self, ctx, width=formatter.width))diff --git a/src/skillevaluator/constants.py b/src/skillevaluator/constants.pyindex b9e78b18..921fa74f 100644--- a/src/skillevaluator/constants.py+++ b/src/skillevaluator/constants.py@@ -6,7 +6,7 @@Based on SkillEvaluator HOW_TO_CONTRIBUTE_SKILLS.md, HOW_TO_CONTRIBUTE_WORKFLOW_RULES.md specifications."""-from skillevaluator.provider_config import CHAT_DEFAULT_OPENAI+from skillevaluator.provider_config import CHAT_DEFAULT_OPENAI, EMBEDDING_DEFAULT_NVIDIA# =============================================================================# SKILLS CONSTANTS@@ -236,7 +236,7 @@ SIMILARITY_LOW_THRESHOLD = 0.50 # LOOSELY_RELATEDSIMILARITY_DEFAULT_THRESHOLD = 0.75# Embedding model configuration-SIMILARITY_DEFAULT_MODEL = "nvidia/nv-embed-v1"+SIMILARITY_DEFAULT_MODEL = EMBEDDING_DEFAULT_NVIDIASIMILARITY_CHUNK_SIZE = 512 # tokens per chunk for full-body modeSIMILARITY_CHUNK_OVERLAP = 64 # token overlap between chunksdiff --git a/src/skillevaluator/deduplication/intra_skill/intra_skill_validator.py b/src/skillevaluator/deduplication/intra_skill/intra_skill_validator.pyindex 3d68bb3b..62c21be5 100644--- a/src/skillevaluator/deduplication/intra_skill/intra_skill_validator.py+++ b/src/skillevaluator/deduplication/intra_skill/intra_skill_validator.py@@ -10,6 +10,7 @@ from __future__ import annotationsimport loggingimport re+from collections import Counterfrom concurrent.futures import ThreadPoolExecutor, as_completedfrom pathlib import Path@@ -26,6 +27,7 @@ from skillevaluator.deduplication.utils.chunker import ContentChunk, chunk_filefrom skillevaluator.deduplication.utils.skill_collector import SkillCollectionError, collect_filesfrom skillevaluator.embedding.client import EmbeddingClient, SimilarityConfigError, validate_embedding_vectorfrom skillevaluator.inference import LLMClient, LLMClientError+from skillevaluator.inference.diagnostics import llm_failure_diagnostic, safe_llm_labelsfrom skillevaluator.models.result import Finding, Severity, ValidationResultfrom skillevaluator.utils.tier2_paths import safe_path_labelfrom skillevaluator.validators.base import ValidatorBase@@ -230,15 +232,8 @@ class IntraSkillValidator(ValidatorBase):logger.info("Embedding complete")except SimilarityConfigError as e:- result.add_finding(- Finding(- category="CONTENT_DEDUP",- severity=Severity.CRITICAL,- check_name="embedding_error",- message=f"Embedding provider error: {e}",- file_path=report_path,- )- )+ result.mark_scan_incomplete("embedding-provider")+ result.add_error(f"Embedding provider error: {e}")return result# Step 4: Cluster by similarity@@ -269,7 +264,14 @@ class IntraSkillValidator(ValidatorBase):# Step 5: LLM analysis for each cluster (concurrent)logger.info("Running LLM analysis on %d cluster(s) concurrently...", len(clusters))- llm = LLMClient(model=self._llm_model)+ try:+ llm = LLMClient(model=self._llm_model)+ config = llm._resolved_config()+ provider, model = safe_llm_labels(config.provider, config.model)+ except LLMClientError:+ result.mark_scan_incomplete("deduplication-llm")+ result.add_error("LLM analysis could not start. Check the LLM provider configuration, then rerun Tier 2.")+ return resultdef analyze_one(cluster):logger.info(@@ -280,10 +282,11 @@ class IntraSkillValidator(ValidatorBase):try:verdict = analyze_cluster(llm, cluster)logger.info(" [thread] Verdict: %s (confidence: %.2f)", verdict.verdict, verdict.confidence)- return (cluster, verdict)- except LLMClientError as e:- logger.error(" [thread] LLM failed: %s", e)- return (cluster, None)+ return (cluster, verdict, None)+ except Exception as exc:+ # A provider exception or malformed model response is missing+ # evidence, not a duplicate-content finding. Never log raw bodies.+ return (cluster, None, llm_failure_diagnostic(exc))cluster_results = []max_workers = min(len(clusters), 5)@@ -293,18 +296,29 @@ class IntraSkillValidator(ValidatorBase):for future in as_completed(futures):cluster_results.append(future.result())+ failures = Counter(diagnostic for _, _, diagnostic in cluster_results if diagnostic is not None)+ failed_count = sum(failures.values())+ result.metadata["llm_analysis"] = {+ "provider": provider,+ "model": model,+ "clusters_total": len(clusters),+ "clusters_completed": len(clusters) - failed_count,+ "clusters_failed": failed_count,+ "failures": [{"count": count, "diagnostic": diagnostic} for diagnostic, count in sorted(failures.items())],+ }+ if failures:+ result.mark_scan_incomplete("deduplication-llm")+ summary = (+ f"LLM analysis did not complete for {failed_count} of {len(clusters)} content clusters "+ f"(provider: {provider}; model: {model})."+ )+ details = " ".join(f"{count} cluster(s): {diagnostic}" for diagnostic, count in sorted(failures.items()))+ result.add_error(f"{summary} {details}")+ logger.error("%s %s", summary, details)+# Process results- for cluster, verdict in cluster_results:+ for cluster, verdict, _ in cluster_results:if verdict is None:- result.add_finding(- Finding(- category="CONTENT_DEDUP",- severity=Severity.CRITICAL,- check_name="llm_error",- message="LLM analysis failed for a content cluster",- file_path=report_path,- )- )continueseverity = verdict_to_severity(verdict)diff --git a/src/skillevaluator/embedding/client.py b/src/skillevaluator/embedding/client.pyindex 776b230c..4aa96287 100644--- a/src/skillevaluator/embedding/client.py+++ b/src/skillevaluator/embedding/client.py@@ -22,13 +22,18 @@ from skillevaluator.constants import (SIMILARITY_DEFAULT_MODEL,)from skillevaluator.logging_config import get_logger-from skillevaluator.provider_config import ProviderConfig, ProviderConfigurationError, resolve_embedding_provider+from skillevaluator.provider_config import (+ EMBEDDING_DEFAULT_NVIDIA,+ ProviderConfig,+ ProviderConfigurationError,+ resolve_embedding_provider,+)logger = get_logger(__name__)class SimilarityConfigError(Exception):- """Raised when embedding configuration is missing or invalid."""+ """Raised when configuration or provider failures prevent embedding comparison."""MAX_EMBEDDING_VECTOR_DIMENSION = 65_536@@ -129,11 +134,45 @@ class EmbeddingClient:return []client = self._get_client()- response = client.embeddings.create(- model=self.model,- input=texts,- encoding_format="float",- )+ from openai import APIConnectionError, APIStatusError++ config = self._resolved_config()+ kwargs: dict[str, Any] = {}+ if (+ config.provider == "nv_build"+ or self.model == EMBEDDING_DEFAULT_NVIDIA+ or self.model.endswith("/" + EMBEDDING_DEFAULT_NVIDIA)+ ):+ # Deduplication compares documents symmetrically, not queries to documents.+ kwargs["extra_body"] = {"input_type": "passage"}+ try:+ response = client.embeddings.create(+ model=self.model,+ input=texts,+ encoding_format="float",+ **kwargs,+ )+ except APIStatusError as exc:+ # Provider responses can echo input text, credentials, or private URLs.+ # Preserve the status and recovery action without forwarding the body.+ status = exc.status_code+ if status in (404, 410):+ action = (+ "The embedding model or endpoint is unavailable. "+ "Check SKILL_EVAL_EMBEDDING_MODEL against your provider's active models "+ "and verify the configured endpoint."+ )+ elif status in (401, 403):+ action = "Check the embedding provider's API key and access to the configured model."+ elif status == 429:+ action = "The embedding provider is rate-limiting requests. Check your quota and retry later."+ else:+ action = "Check the embedding provider's availability and model configuration before retrying."+ raise SimilarityConfigError(f"Embedding request failed (HTTP {status}). {action}") from exc+ except APIConnectionError as exc:+ raise SimilarityConfigError(+ "Embedding connection failed. Check the configured endpoint and network, then retry."+ ) from excdata = list(response.data)if len(data) != len(texts):raise SimilarityConfigError(@@ -145,7 +184,7 @@ class EmbeddingClient:for item in data:index = getattr(item, "index", None)if type(index) is not int or not 0 <= index < len(texts):- raise SimilarityConfigError(f"Embedding response index is invalid: {index!r}.")+ raise SimilarityConfigError("Embedding response index must be an integer within the input range.")if ordered[index] is not None:raise SimilarityConfigError(f"Embedding response contains duplicate index {index}.")vector = getattr(item, "embedding", None)diff --git a/src/skillevaluator/evaluation/options.py b/src/skillevaluator/evaluation/options.pyindex 819535f1..c3fb4a5f 100644--- a/src/skillevaluator/evaluation/options.py+++ b/src/skillevaluator/evaluation/options.py@@ -24,7 +24,7 @@ class EvaluationOptions:"""skill_path: Path- agents: str = "codex"+ agents: str | None = Noneenv_mode: str = "docker"skip_baseline: bool = Falsen_attempts: int | None = Nonediff --git a/src/skillevaluator/inference/client.py b/src/skillevaluator/inference/client.pyindex 15865210..74faca9a 100644--- a/src/skillevaluator/inference/client.py+++ b/src/skillevaluator/inference/client.py@@ -279,6 +279,7 @@ class LLMClient:return str(content).strip()call_kwargs: dict[str, Any] = {"model": config.model,+ "stream": False,"messages": [{"role": "system", "content": system_prompt},{"role": "user", "content": user_prompt},diff --git a/src/skillevaluator/inference/diagnostics.py b/src/skillevaluator/inference/diagnostics.pynew file mode 100644index 00000000..68825f5b--- /dev/null+++ b/src/skillevaluator/inference/diagnostics.py@@ -0,0 +1,94 @@+# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.+# SPDX-License-Identifier: Apache-2.0++"""Bounded LLM failure diagnostics that never echo prompts or provider bodies."""++from __future__ import annotations++import re++from skillevaluator.inference.types import LLMClientError++# Provider error bodies are untrusted. Only these known protocol values are+# useful to callers; arbitrary messages, URLs, IDs, and headers stay private.+_ERROR_CODES = frozenset(+ {+ "model_not_found",+ "model_retired",+ "model_deprecated",+ "invalid_api_key",+ "authentication_error",+ "permission_denied",+ "insufficient_quota",+ "rate_limit_exceeded",+ "rate_limit_error",+ "context_length_exceeded",+ "unsupported_parameter",+ "unsupported_value",+ "invalid_parameter",+ "invalid_request_error",+ "server_error",+ "overloaded_error",+ }+)+_ERROR_PARAMETERS = frozenset(+ {"model", "temperature", "max_tokens", "max_completion_tokens", "response_format", "messages", "stream", "top_p"}+)+_PROVIDERS = frozenset({"openai", "anthropic", "nv_build", "bedrock", "openai-compatible"})+++def safe_llm_labels(provider: object, model: object) -> tuple[str, str]:+ """Keep configured identifiers readable without emitting URLs or control text."""+ safe_provider = provider if isinstance(provider, str) and provider in _PROVIDERS else "unresolved"+ safe_model = "unresolved"+ if (+ isinstance(model, str)+ and re.fullmatch(r"[A-Za-z0-9][A-Za-z0-9._:/-]{0,159}", model)+ and "://" not in model+ and not model.startswith(("sk-", "nvapi-"))+ ):+ safe_model = model+ return safe_provider, safe_model+++def llm_failure_diagnostic(exc: Exception) -> str:+ """Explain SDK failures without importing optional SDKs or formatting exceptions."""+ status = getattr(exc, "status_code", None)+ if type(status) is int and 100 <= status <= 599:+ body = getattr(exc, "body", None)+ error = body.get("error", body) if isinstance(body, dict) else None+ fields = []+ if isinstance(error, dict):+ for key, allowed in (("code", _ERROR_CODES), ("type", _ERROR_CODES), ("param", _ERROR_PARAMETERS)):+ value = error.get(key)+ if isinstance(value, str) and value in allowed:+ fields.append(f"{key}={value}")+ context = f" ({', '.join(fields)})" if fields else ""+ if status in (401, 403):+ remedy = "Check the selected LLM provider credentials and model access."+ elif status in (404, 410):+ remedy = (+ "Model or endpoint unavailable. Check SKILL_EVAL_LLM_MODEL against the provider's available models."+ )+ elif status == 429:+ remedy = "The LLM provider rejected the request due to rate or quota limits. Check quota and retry later."+ elif status in (400, 422):+ remedy = "The LLM provider rejected the request. Check the selected model and supported request parameters."+ elif status >= 500:+ remedy = "The LLM provider could not complete the request. Retry later."+ else:+ remedy = "The LLM request failed. Check the selected provider and model configuration."+ return f"HTTP {status}{context}: {remedy}"++ # These names are shared by the supported SDKs; inspecting the hierarchy+ # also recognizes SDK subclasses without loading optional dependencies.+ kinds = {kind.__name__ for kind in type(exc).__mro__}+ if kinds & {"APITimeoutError", "TimeoutException", "TimeoutError"}:+ return "LLM request timed out. Check provider availability and retry."+ if kinds & {"APIConnectionError", "ConnectError", "ConnectionError"}:+ return "LLM connection failed. Check provider connectivity and endpoint configuration."+ if isinstance(exc, LLMClientError) or kinds & {"JSONDecodeError", "ValueError", "TypeError", "AttributeError"}:+ return (+ "LLM configuration or response was invalid. Check configuration and the model's structured-output support."+ )+ return "Unexpected LLM request error. Check the selected provider and model configuration, then retry."diff --git a/src/skillevaluator/provider_config.py b/src/skillevaluator/provider_config.pyindex c3e1f9ea..bc7412b2 100644--- a/src/skillevaluator/provider_config.py+++ b/src/skillevaluator/provider_config.py@@ -17,6 +17,7 @@ import idnaPUBLIC_NVIDIA_BUILD_BASE_URL = "https://integrate.api.nvidia.com/v1"OPENAI_BASE_URL = "https://api.openai.com/v1"+_PROVIDER_SETUP_URL = "https://docs.nvidia.com/skills/skillevaluator/configuration"# Pinned frontier chat defaults (not floating aliases like ``gpt-5`` / ``claude-opus-latest``).# Harbor ``templates/eval.py`` cannot import this module — keep its local@@ -25,18 +26,32 @@ OPENAI_BASE_URL = "https://api.openai.com/v1"CHAT_DEFAULT_OPENAI = "gpt-5.6-sol"CHAT_DEFAULT_ANTHROPIC = "claude-opus-5"CHAT_DEFAULT_BEDROCK = "us.anthropic.claude-opus-5"+CHAT_DEFAULT_NVIDIA = "nvidia/nemotron-3-super-120b-a12b"+# Gateway catalog IDs are independent of native-provider model names. Operators+# can override these defaults without changing the configured endpoint or key.+CHAT_DEFAULT_GATEWAY = "nvidia/nvidia/nemotron-3-super-120b-long-ctx"# Lower-cost OpenAI alternative for ``SKILL_EVAL_LLM_MODEL`` overrides.CHAT_CHEAP_OPENAI = "gpt-5.4-mini"CHAT_DEFAULT_MODELS = {"openai": CHAT_DEFAULT_OPENAI,"anthropic": CHAT_DEFAULT_ANTHROPIC,- "nv_build": "nvidia/nemotron-3-nano-30b-a3b",+ "nv_build": CHAT_DEFAULT_NVIDIA,"bedrock": CHAT_DEFAULT_BEDROCK,+ "openai-compatible": CHAT_DEFAULT_GATEWAY,}+# Agent harnesses have separate model defaults with their required capabilities.+GATEWAY_AGENT_DEFAULT_MODELS = {+ "codex": "openai/openai/gpt-5.6-sol",+ "claude-code": "aws/anthropic/bedrock-claude-opus-5",+ "opencode": CHAT_DEFAULT_GATEWAY,+}+EMBEDDING_DEFAULT_NVIDIA = "nvidia/nemotron-3-embed-1b"+EMBEDDING_DEFAULT_GATEWAY = "nvidia/nvidia/nemotron-3-embed-1b"_EMBEDDING_DEFAULT_MODELS = {"openai": "text-embedding-3-small",- "nv_build": "nvidia/nv-embed-v1",+ "nv_build": EMBEDDING_DEFAULT_NVIDIA,+ "openai-compatible": EMBEDDING_DEFAULT_GATEWAY,}_SUPPORTED_PROVIDERS = frozenset({"openai", "anthropic", "nv_build", "bedrock", "openai-compatible"})_ANTHROPIC_DNS_LABEL_RE = re.compile(r"^[A-Za-z0-9](?:[A-Za-z0-9-]{0,61}[A-Za-z0-9])?$")@@ -119,7 +134,7 @@ def resolve_llm_provider(environ: Mapping[str, str] | None = None) -> ProviderCo_validate_provider(provider, variable="SKILL_EVAL_LLM_PROVIDER")configured_model = env.get("SKILL_EVAL_LLM_MODEL")if configured_model is None:- model = _default_chat_model(provider)+ model = CHAT_DEFAULT_MODELS[provider]else:model = configured_model.strip()if not model:@@ -213,9 +228,9 @@ def resolve_embedding_provider(environ: Mapping[str, str] | None = None) -> Provcredential_env="NVIDIA_API_KEY",)- model = env.get("SKILL_EVAL_EMBEDDING_MODEL")+ model = env.get("SKILL_EVAL_EMBEDDING_MODEL", _EMBEDDING_DEFAULT_MODELS[provider]).strip()if not model:- raise ProviderConfigurationError("SKILL_EVAL_EMBEDDING_MODEL is required for openai-compatible embeddings.")+ raise ProviderConfigurationError("SKILL_EVAL_EMBEDDING_MODEL must be a non-empty string when set.")return ProviderConfig(provider=provider,model=model,@@ -238,7 +253,14 @@ def _environment(environ: Mapping[str, str] | None) -> Mapping[str, str]:def _required(environ: Mapping[str, str], variable: str) -> str:value = environ.get(variable, "").strip()if not value:- raise ProviderConfigurationError(f"{variable} is required for the selected provider.")+ message = f"{variable} is required for the selected provider."+ if variable in {"NVIDIA_API_KEY", "OPENAI_API_KEY", "ANTHROPIC_API_KEY", "SKILL_EVAL_LLM_API_KEY"}:+ message += (+ "\n\nSet it in your shell:\n"+ f" export {variable}='your-api-key'\n\n"+ f"Provider setup:\n {_PROVIDER_SETUP_URL}"+ )+ raise ProviderConfigurationError(message)return value@@ -408,27 +430,31 @@ def _selected_provider(environ: Mapping[str, str], variable: str) -> str:if environ.get(credential, "").strip()]if len(available) > 1:+ choices = _SUPPORTED_PROVIDERS+ if "EMBEDDING" in variable:+ choices = choices - {"anthropic", "bedrock"}+ example = next(provider for provider in available if provider in choices)raise ProviderConfigurationError(- f"{variable} is required when multiple public provider credentials are configured."+ f"{variable} is required.\n"+ "Multiple public provider credentials are configured.\n\n"+ f"Accepted values:\n {', '.join(sorted(choices))}\n\n"+ f"Choose one, for example:\n export {variable}={example}")if available:return available[0]- prefix = variable.removesuffix("_PROVIDER")- if "EMBEDDING" in variable:- # Anthropic/Bedrock have no embedding models: recommending them (or the- # ANTHROPIC_API_KEY auto-detection) here would send the user straight- # into the "does not provide embeddings" rejection below.- raise ProviderConfigurationError(- f"No provider is configured ({variable} unset and no credential found). Set one of: "- "NVIDIA_API_KEY for NVIDIA Build (build.nvidia.com) or OPENAI_API_KEY (auto-detected) — "- f"or set {variable}=openai|nv_build|openai-compatible explicitly "- f"(openai-compatible also needs {prefix}_BASE_URL, {prefix}_API_KEY, and {prefix}_MODEL)."- )+ alternatives = " openai -> OPENAI_API_KEY\n"+ # Anthropic/Bedrock have no embedding models; do not suggest them here.+ if "EMBEDDING" not in variable:+ alternatives += " anthropic -> ANTHROPIC_API_KEY\n"raise ProviderConfigurationError(- f"No provider is configured ({variable} unset and no credential found). Set one of: "- "NVIDIA_API_KEY for NVIDIA Build (build.nvidia.com), OPENAI_API_KEY, or ANTHROPIC_API_KEY "- f"(auto-detected) — or set {variable}=openai|anthropic|nv_build|bedrock|openai-compatible "- f"explicitly (openai-compatible also needs {prefix}_BASE_URL, {prefix}_API_KEY, and {prefix}_MODEL)."+ "No provider is configured.\n\n"+ "For NVIDIA Build, set:\n"+ f" export {variable}=nv_build\n"+ " export NVIDIA_API_KEY='your-api-key'\n"+ " Get a key: https://build.nvidia.com\n\n"+ f"Other {variable} values and their keys:\n"+ f"{alternatives}\n"+ f"More providers and setup options:\n {_PROVIDER_SETUP_URL}")@@ -436,10 +462,3 @@ def _validate_provider(provider: str, *, variable: str) -> None:if provider not in _SUPPORTED_PROVIDERS:choices = ", ".join(sorted(_SUPPORTED_PROVIDERS))raise ProviderConfigurationError(f"{variable} must be one of: {choices}.")---def _default_chat_model(provider: str) -> str:- try:- return CHAT_DEFAULT_MODELS[provider]- except KeyError as exc:- raise ProviderConfigurationError("SKILL_EVAL_LLM_MODEL is required for openai-compatible providers.") from excdiff --git a/src/skillevaluator/reporting/base.py b/src/skillevaluator/reporting/base.pyindex 1789e6c9..dce19a63 100644--- a/src/skillevaluator/reporting/base.py+++ b/src/skillevaluator/reporting/base.py@@ -363,6 +363,25 @@ def passes_required_gate(result: ValidationResult) -> bool:return bool(result.passed or is_advisory_agent_eval_skip(result))+def additional_errors(result: ValidationResult) -> list[str]:+ """Return errors not already displayed through a structured finding.++ Findings also populate the legacy error list. Keep independent errors,+ including execution diagnostics, without repeating those mirrored entries.+ """+ represented = {finding.to_legacy_string() for finding in result.findings}+ for finding in result.findings:+ # merge_with_prefix puts skill labels before legacy messages but inside+ # structured finding paths. Recognize both forms, including nested merges.+ location = finding.location+ prefix = ""+ while location.startswith("[") and "] " in location:+ label, _, location = location.partition("] ")+ prefix += label + "] "+ represented.add(f"{prefix}{finding.tag} {finding.message} in {location}")+ return [error for error in result.errors if error not in represented]++class ReporterBase(ABC):"""Abstract base class for validation result reporters.diff --git a/src/skillevaluator/reporting/cli.py b/src/skillevaluator/reporting/cli.pyindex 988e78e9..29f61433 100644--- a/src/skillevaluator/reporting/cli.py+++ b/src/skillevaluator/reporting/cli.py@@ -27,7 +27,7 @@ from skillevaluator.constants import (DIMENSION_VERDICT_NEUTRAL_THRESHOLD,DIMENSION_VERDICT_PASS_THRESHOLD,)-from skillevaluator.reporting.base import ReporterBase, passes_required_gate+from skillevaluator.reporting.base import ReporterBase, additional_errors, passes_required_gatefrom skillevaluator.reporting.harbor_viewer import (harbor_evidence_link_text,normalize_harbor_viewer_for_display,@@ -459,18 +459,22 @@ class CLIReporter(ReporterBase):def _print_findings(self, result: ValidationResult, console: Console) -> None:"""Print findings with tree structure."""+ errors = additional_errors(result)+ if errors:+ label = "Execution errors" if result.is_incomplete else "Errors"+ console.print(f"[dim]{label}:[/dim]")+ for error in errors:+ console.print(f" [red]•[/red] {rich_escape(str(error))}")if not result.findings:- # Fall back to legacy errors/warnings- if result.errors:- console.print("[dim]Errors:[/dim]")- for error in result.errors:- console.print(f" [red]•[/red] {rich_escape(str(error))}")+ # Preserve legacy warnings when there are no structured findings.if result.warnings:console.print("[dim]Warnings:[/dim]")for warning in result.warnings:console.print(f" [yellow][WARN][/yellow] {rich_escape(str(warning))}")return+ if errors:+ console.print()console.print("[dim]Issues:[/dim]")for i, finding in enumerate(result.findings, 1):self._print_finding(i, finding, console)diff --git a/src/skillevaluator/reporting/html.py b/src/skillevaluator/reporting/html.pyindex 8bd15a5c..c4af80e3 100644--- a/src/skillevaluator/reporting/html.py+++ b/src/skillevaluator/reporting/html.py@@ -35,7 +35,12 @@ from jinja2 import BaseLoader, Environmentfrom skillevaluator import __version__from skillevaluator.constants import TIER3_LIFT_FAIL_THRESHOLD, TIER3_LIFT_PASS_THRESHOLD-from skillevaluator.reporting.base import ReporterBase, is_advisory_agent_eval_skip, passes_required_gate+from skillevaluator.reporting.base import (+ ReporterBase,+ additional_errors,+ is_advisory_agent_eval_skip,+ passes_required_gate,+)from skillevaluator.reporting.harbor_viewer import normalize_agent_eval_harbor_linksif TYPE_CHECKING:@@ -294,6 +299,7 @@ class HTMLReporter(ReporterBase):loader = PackageLoader("skillevaluator.reporting", "templates")environment = Environment(loader=loader, autoescape=True)environment.filters["related_paths"] = _related_paths+ environment.filters["additional_errors"] = additional_errorsenvironment.filters["adaptive_percent"] = _adaptive_percentenvironment.filters["adaptive_interval_percent"] = _adaptive_interval_percentreturn environmentdiff --git a/src/skillevaluator/reporting/json_reporter.py b/src/skillevaluator/reporting/json_reporter.pyindex ef6bfb83..e8e5eb30 100644--- a/src/skillevaluator/reporting/json_reporter.py+++ b/src/skillevaluator/reporting/json_reporter.py@@ -106,11 +106,7 @@ class JSONReporter(ReporterBase):}policy = next(- (- result.metadata.get("policy")- for result in results- if isinstance(result.metadata.get("policy"), dict)- ),+ (result.metadata.get("policy") for result in results if isinstance(result.metadata.get("policy"), dict)),None,)if policy is not None:@@ -138,6 +134,10 @@ class JSONReporter(ReporterBase):if gating_by_tier:data["gating"] = {"tiers": gating_by_tier}+ workflow = next((r.metadata["workflow"] for r in results if r.metadata.get("workflow")), None)+ if workflow is not None:+ data["workflow"] = workflow+# Quality summary from any QUALITY validator resultsquality_results = [r.metadata["quality_scores"] for r in results if r.metadata.get("quality_scores")]if quality_results:@@ -236,6 +236,16 @@ class JSONReporter(ReporterBase):if isinstance(gating, dict):data["gating"] = gating+ workflow = result.metadata.get("workflow")+ if isinstance(workflow, dict):+ data["workflow"] = workflow++ # Tier 2 records bounded provider diagnostics and completed/failed+ # cluster counts independently of duplicate-content findings.+ llm_analysis = result.metadata.get("llm_analysis")+ if isinstance(llm_analysis, dict):+ data["llm_analysis"] = llm_analysis+return datadef get_file_extension(self) -> str:diff --git a/src/skillevaluator/reporting/markdown.py b/src/skillevaluator/reporting/markdown.pyindex 446ac0fd..483f63e3 100644--- a/src/skillevaluator/reporting/markdown.py+++ b/src/skillevaluator/reporting/markdown.py@@ -19,7 +19,12 @@ from datetime import UTC, datetimefrom typing import TYPE_CHECKINGfrom skillevaluator.evidence import evidence_ref_identity-from skillevaluator.reporting.base import ReporterBase, is_advisory_agent_eval_skip, passes_required_gate+from skillevaluator.reporting.base import (+ ReporterBase,+ additional_errors,+ is_advisory_agent_eval_skip,+ passes_required_gate,+)from skillevaluator.reporting.harbor_viewer import (harbor_evidence_link_text,normalize_harbor_viewer_for_display,@@ -350,16 +355,19 @@ class MarkdownReporter(ReporterBase):lines.append(f"**{s.errors} errors, {s.warnings} warnings**")lines.append("")- if result.findings:- self._render_findings(result.findings, lines)-- elif result.errors:- # Fall back to legacy errors- for error in result.errors[: self.max_findings_shown]:- lines.append(f"- ❌ {error}")- remaining = len(result.errors) - self.max_findings_shown+ errors = additional_errors(result)+ if errors:+ label = "Execution errors" if result.is_incomplete else "Errors"+ lines.extend([f"**{label}:**", ""])+ for error in errors[: self.max_findings_shown]:+ lines.append(f"- ❌ {html.escape(error, quote=False)}")+ remaining = len(errors) - self.max_findings_shownif remaining > 0:lines.append(f"- *... and {remaining} more errors*")+ lines.append("")++ if result.findings:+ self._render_findings(result.findings, lines)def _render_findings(self, findings: list[Finding], lines: list[str]) -> None:"""Render a shared findings table for blocking and non-blocking results."""diff --git a/src/skillevaluator/reporting/templates/report.html.j2 b/src/skillevaluator/reporting/templates/report.html.j2index 6b344c14..95cb6e4a 100644--- a/src/skillevaluator/reporting/templates/report.html.j2+++ b/src/skillevaluator/reporting/templates/report.html.j2@@ -1927,6 +1927,15 @@Checks for redundant content within one skill and semantic overlap across skills or local catalog entries.</p>{% for result in tier2_results %}+ {% set execution_errors = result | additional_errors %}+ {% if execution_errors %}+ <div style="background:var(--bg-secondary);border:1px solid var(--border-color);border-radius:8px;padding:1rem;margin:0.75rem 0;">+ <strong>{{ 'Execution errors' if result.is_incomplete else 'Errors' }}</strong>+ <ul style="margin:0.5rem 0 0;padding-left:1.25rem;">+ {% for error in execution_errors %}<li style="white-space:pre-line;">{{ error }}</li>{% endfor %}+ </ul>+ </div>+ {% endif %}{% if result.passed and not result.findings %}<div style="background:var(--bg-secondary);border:1px solid var(--border-color);border-radius:8px;padding:1rem;margin:0.75rem 0;">{{ icons.checkmark | safe }} <strong style="color:var(--success-color);">No semantic overlaps detected.</strong>@@ -1962,11 +1971,6 @@</div></details>{% endfor %}- {% if result.errors and not result.findings %}- {% for error in result.errors %}- <div class="finding high"><div class="finding-header"><span class="finding-message">{{ error }}</span></div></div>- {% endfor %}- {% endif %}{% endfor %}{% else %}<p style="color: var(--text-secondary); padding: 1rem;">No Tier 2 checks were run. Configure a public embedding provider, then run <code>similarity-check</code> or <code>dedup-scan</code>.</p>diff --git a/src/skillevaluator/tier2/commands.py b/src/skillevaluator/tier2/commands.pyindex f3c3ddc7..a72ccae9 100644--- a/src/skillevaluator/tier2/commands.py+++ b/src/skillevaluator/tier2/commands.py@@ -18,7 +18,14 @@ def _guarded_result(title: str, target_path: Path, callback) -> list[ValidationRresult = callback()except Exception as exc: # validators convert expected failures; this protects CLI UXresult = ValidationResult(validator_name=title, validator_description="Tier 2 check")- result.add_error(f"{title} failed: {exc}")+ result.mark_scan_incomplete(title)+ # SDK exceptions may contain response bodies, request data, or credentials.+ # Expected provider failures are explained by the validators themselves.+ result.add_error(+ f"{title} could not complete because of an unexpected error ({type(exc).__name__}). "+ "Check the provider configuration and connectivity, then rerun Tier 2. "+ "If the problem persists, report this error type to the maintainers."+ )if not result.validator_name:result.validator_name = titleif not result.validator_description:@@ -61,16 +68,15 @@ def run_context_optimization_check(model: str | None = None,llm_model: str | None = None,) -> list[ValidationResult]:- validator = IntraSkillValidator(- threshold=threshold,- embedding_model=model,- llm_model=llm_model,- )- return _guarded_result(- "Context Deduplication",- skill_path,- lambda: validator.validate(skill_path),- )+ def _run() -> ValidationResult:+ validator = IntraSkillValidator(+ threshold=threshold,+ embedding_model=model,+ llm_model=llm_model,+ )+ return validator.validate(skill_path)++ return _guarded_result("Context Deduplication", skill_path, _run)def run_dedup_scan(diff --git a/src/skillevaluator/tier3/__init__.py b/src/skillevaluator/tier3/__init__.pyindex 9e254ce5..92f621ed 100644--- a/src/skillevaluator/tier3/__init__.py+++ b/src/skillevaluator/tier3/__init__.py@@ -3,14 +3,8 @@"""Tier 3 synthetic dataset creation and live agent evaluation."""-from skillevaluator.tier3.commands import (- compare_results,- create_dataset,- doctor,- evaluate,- validate_evals,- view_results,-)+from importlib import import_module+from typing import Any__all__ = ["compare_results",@@ -20,3 +14,12 @@ __all__ = ["validate_evals","view_results",]+++def __getattr__(name: str) -> Any:+ # CLI registration and help must work without the optional Harbor runtime.+ if name not in __all__:+ raise AttributeError(f"module {__name__!r} has no attribute {name!r}")+ value = getattr(import_module("skillevaluator.tier3.commands"), name)+ globals()[name] = value+ return valuediff --git a/src/skillevaluator/tier3/commands.py b/src/skillevaluator/tier3/commands.pyindex 51b8157b..b134919f 100644--- a/src/skillevaluator/tier3/commands.py+++ b/src/skillevaluator/tier3/commands.py@@ -66,6 +66,13 @@ from skillevaluator.tier3.toml_utils import toml_quoteconsole = Console()_HARBOR_RESERVED_CASE_NAMES = frozenset({"dataset.toml", "readme.md", "metric.py", "results"})+_DEFAULT_AGENT_BY_PROVIDER = {+ "nv_build": "opencode",+ "openai": "codex",+ "anthropic": "claude-code",+ "bedrock": "claude-code",+ "openai-compatible": "codex",+}def _engine_env_mode(value: str) -> str:@@ -331,7 +338,7 @@ def _write_harbor_dataset(harbor_dir: Path, case_id: str) -> None:def parse_agents(raw_agents: str | None) -> list[str]:"""Parse a comma-separated Harbor agent list."""if not raw_agents:- return ["codex"]+ return []agents = [canonical_agent_name(item.strip()) for item in raw_agents.split(",") if item.strip()]seen: set[str] = set()deduped: list[str] = []@@ -342,6 +349,18 @@ def parse_agents(raw_agents: str | None) -> list[str]:return deduped+def resolve_agents(raw_agents: str | None, *, provider: str) -> list[str]:+ """Resolve an explicit agent list or choose the provider's native default."""+ if raw_agents is not None:+ return parse_agents(raw_agents)+ try:+ return [_DEFAULT_AGENT_BY_PROVIDER[provider]]+ except KeyError as exc:+ raise ValueError(+ f"No automatic Harbor agent is configured for provider '{provider}'; select one with --agents."+ ) from exc++def parse_agent_model_overrides(raw_overrides: tuple[str, ...]) -> dict[str, list[str]]:"""Parse ``--agent-model agent=model`` values."""overrides: dict[str, list[str]] = {}@@ -630,7 +649,16 @@ def evaluate("""Run Harbor live-agent evaluation for a skill."""env_mode = _engine_env_mode(env_mode)- agent_list = parse_agents(agents)+ if agents is None:+ try:+ provider = resolve_llm_provider()+ except ProviderConfigurationError as exc:+ raise ValueError(f"A public LLM provider is required for live evaluation: {exc}") from exc+ agent_list = resolve_agents(None, provider=provider.provider)+ else:+ agent_list = parse_agents(agents)+ if not agent_list:+ raise ValueError("Select at least one agent with --agents.")reporter = safe_progress_reporter(progress_reporter or NullProgressReporter())engine_started = Falsetry:@@ -653,10 +681,11 @@ def evaluate(supported = ", ".join(sorted(HARBOR_AGENTS_SUPPORTED))raise ValueError(f"Unknown agent(s): {', '.join(unknown)}. Supported agents: {supported}")- try:- resolve_llm_provider()- except ProviderConfigurationError as exc:- raise ValueError(f"A public LLM provider is required for live evaluation: {exc}") from exc+ if agents is not None:+ try:+ resolve_llm_provider()+ except ProviderConfigurationError as exc:+ raise ValueError(f"A public LLM provider is required for live evaluation: {exc}") from excagent_models = parse_agent_model_overrides(agent_model)unknown_model_agents = sorted(set(agent_models) - set(agent_list))@@ -712,7 +741,7 @@ def doctor() -> int:"""Check whether live evaluation dependencies are available."""env_mode = _engine_env_mode(env_mode)- agent_list = parse_agents(agents)+ agent_list = parse_agents(agents) if agents is not None else []rows: list[tuple[str, str, str]] = []rows.append(("CLI package", "pass", f"skillevaluator {__version__}"))@@ -724,6 +753,7 @@ def doctor(except ProviderConfigurationError as exc:rows.append(("Public LLM provider", "fail", str(exc)))else:+ agent_list = resolve_agents(agents, provider=provider.provider)rows.append(("Public LLM provider", "pass", f"{provider.provider} / {provider.model}"))try:overrides = parse_agent_model_overrides(agent_model)@@ -779,6 +809,10 @@ def doctor(unknown = validate_agents(agent_list)if unknown:rows.append(("Harbor agents", "fail", f"Unknown: {', '.join(unknown)}"))+ elif agents is not None and not agent_list:+ rows.append(("Harbor agents", "fail", "Select at least one agent with --agents."))+ elif not agent_list:+ rows.append(("Harbor agents", "warn", "automatic selection requires a configured provider"))else:rows.append(("Harbor agents", "pass", ", ".join(agent_list)))diff --git a/src/skillevaluator/tier3/dataset_progress.py b/src/skillevaluator/tier3/dataset_progress.pynew file mode 100644index 00000000..4e3ce7fa--- /dev/null+++ b/src/skillevaluator/tier3/dataset_progress.py@@ -0,0 +1,52 @@+# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.+# SPDX-License-Identifier: Apache-2.0++"""CLI feedback while dataset preparation runs before the evaluation reporter."""++from __future__ import annotations++import sys+import threading+import time+from collections.abc import Iterator+from contextlib import contextmanager+from typing import TextIO++HEARTBEAT_INTERVAL_SECONDS = 10.0+++@contextmanager+def dataset_generation_progress(*, enabled: bool, stream: TextIO | None = None) -> Iterator[None]:+ """Report elapsed waiting time; never imply provider-side progress or a deadline."""+ if not enabled:+ yield+ return++ output = stream if stream is not None else sys.stderr+ started = time.monotonic()+ stopped = threading.Event()++ def announce(message: str) -> None:+ try:+ output.write(message + "\n")+ output.flush()+ except (OSError, ValueError):+ # A closed progress stream must not fail dataset generation.+ stopped.set()++ def heartbeat() -> None:+ while not stopped.wait(HEARTBEAT_INTERVAL_SECONDS):+ elapsed = int(time.monotonic() - started)+ announce(+ f"Autopilot: waiting for dataset generation ({elapsed}s elapsed); live evaluation has not started."+ )++ worker = threading.Thread(target=heartbeat, name="dataset-generation-progress", daemon=True)+ worker.start()+ try:+ yield+ finally:+ stopped.set()+ worker.join(timeout=1.0)++ announce(f"Autopilot: evaluation source ready ({time.monotonic() - started:.1f}s); continuing to evaluation.")diff --git a/src/skillevaluator/tier3/eval_core/llm_judge.py b/src/skillevaluator/tier3/eval_core/llm_judge.pyindex 91d75541..67b4d4b9 100644--- a/src/skillevaluator/tier3/eval_core/llm_judge.py+++ b/src/skillevaluator/tier3/eval_core/llm_judge.py@@ -214,6 +214,7 @@ def _chat_completion_payload("model": model,token_key: max_tokens,"messages": [{"role": "user", "content": prompt}],+ "stream": False,}if temperature is not None and _supports_custom_temperature(model):payload["temperature"] = temperaturediff --git a/src/skillevaluator/tier3/generate_dataset.py b/src/skillevaluator/tier3/generate_dataset.pyindex c504dd96..f3218a06 100644--- a/src/skillevaluator/tier3/generate_dataset.py+++ b/src/skillevaluator/tier3/generate_dataset.py@@ -320,6 +320,7 @@ async def _generate_with_llm(full: bool = False,*,fallback_to_template: bool = True,+ announce_provider: bool = True,) -> list[dict[str, Any]]:"""Generate test cases using LLM for more natural questions."""try:@@ -412,7 +413,8 @@ No other fields."""try:from skillevaluator.inference.client import LLMClient- print(f" Using public provider: {provider.provider} / {provider.model}")+ if announce_provider:+ print(f" Using public provider: {provider.provider} / {provider.model}")text = await asyncio.to_thread(LLMClient(max_tokens=2000, temperature=0.3).completions,"You generate high-quality JSON evaluation datasets for AI agent skills.",@@ -470,9 +472,12 @@ No other fields."""return casesexcept Exception as exc:+ from skillevaluator.inference.diagnostics import llm_failure_diagnostic++ diagnostic = llm_failure_diagnostic(exc)if not fallback_to_template:- raise RuntimeError("LLM dataset generation failed") from exc- print("Warning: LLM generation failed; using deterministic template mode.")+ raise DatasetGenerationError(f"LLM dataset generation failed: {diagnostic}") from exc+ print(f"Warning: LLM generation failed: {diagnostic} Using deterministic template mode.")return _generate_full(skill) if full else _generate_simple(skill)@@ -486,7 +491,11 @@ def generate_one_case(skill_path: Path, *, use_llm: bool) -> Path:if output_path.exists():raise FileExistsError(f"Dataset already exists: {output_path}")skill = _parse_skill(skill_path)- cases = asyncio.run(_generate_with_llm(skill, fallback_to_template=False)) if use_llm else _generate_simple(skill)+ cases = (+ asyncio.run(_generate_with_llm(skill, fallback_to_template=False, announce_provider=False))+ if use_llm+ else _generate_simple(skill)+ )if len(cases) != 1:raise RuntimeError("one-case generation did not return exactly one case")evals_dir.mkdir(parents=True, exist_ok=True)diff --git a/src/skillevaluator/tier3/harbor/local_agents.py b/src/skillevaluator/tier3/harbor/local_agents.pyindex 605ecc34..3e5c0901 100644--- a/src/skillevaluator/tier3/harbor/local_agents.py+++ b/src/skillevaluator/tier3/harbor/local_agents.py@@ -141,19 +141,8 @@ class SkillEvaluatorLocalClaudeCode(ClaudeCode):)-class SkillEvaluatorLocalCodex(Codex):- """Codex wrapper that uses the managed local CLI and writes CODEX_HOME config."""-- # Harbor's upstream Codex integration uses /tmp/codex-home. In local mode- # concurrent trials share the host /tmp, so use per-trial log paths instead.- _REMOTE_CODEX_HOME = PurePosixPath(EnvironmentPaths.agent_dir / "codex-home")- _REMOTE_CODEX_SECRETS_DIR = PurePosixPath(EnvironmentPaths.agent_dir / "codex-secrets")-- async def install(self, environment: BaseEnvironment) -> None:- await self.exec_as_agent(environment, command="codex --version")-- def get_version_command(self) -> str | None:- return "codex --version"+class SkillEvaluatorGatewayCodex(Codex):+ """Use an explicit Responses gateway without truncating its catalog model ID."""def _preserve_gateway_model_name(self, command: str, env: dict[str, str] | None) -> str:"""Undo Harbor's default Codex model truncation when routing through an OpenAI-compatible gateway."""@@ -166,7 +155,7 @@ class SkillEvaluatorLocalCodex(Codex):def replace(match: re.Match[str]) -> str:if match.group("model") != short_model:return match.group(0)- return f"{match.group('prefix')}{model_name}{match.group('suffix')}"+ return f"{match.group('prefix')}{shlex.quote(model_name)}{match.group('suffix')}"return _rewrite_launcher_segment(command, lambda text: _CODEX_MODEL_ARG_RE.sub(replace, text))@@ -178,13 +167,6 @@ class SkillEvaluatorLocalCodex(Codex):cwd: str | None = None,timeout_sec: int | None = None,):- command = _rewrite_launcher_segment(- command,- lambda text: text.replace(- "/tmp/codex-secrets",- self._REMOTE_CODEX_SECRETS_DIR.as_posix(),- ),- )command = self._preserve_gateway_model_name(command, env)return await super().exec_as_agent(environment,@@ -212,6 +194,61 @@ class SkillEvaluatorLocalCodex(Codex):await super().run(instruction=instruction, environment=environment, context=context)+class SkillEvaluatorLocalCodex(SkillEvaluatorGatewayCodex):+ """Use the installed local CLI with per-trial state and gateway routing."""++ _REMOTE_CODEX_HOME = PurePosixPath(EnvironmentPaths.agent_dir / "codex-home")+ _REMOTE_CODEX_SECRETS_DIR = PurePosixPath(EnvironmentPaths.agent_dir / "codex-secrets")++ async def install(self, environment: BaseEnvironment) -> None:+ await self.exec_as_agent(environment, command="codex --version")++ def get_version_command(self) -> str | None:+ return "codex --version"++ async def exec_as_agent(+ self,+ environment: BaseEnvironment,+ command: str,+ env: dict[str, str] | None = None,+ cwd: str | None = None,+ timeout_sec: int | None = None,+ ):+ command = _rewrite_launcher_segment(+ command,+ lambda text: text.replace("/tmp/codex-secrets", self._REMOTE_CODEX_SECRETS_DIR.as_posix()),+ )+ return await super().exec_as_agent(environment, command=command, env=env, cwd=cwd, timeout_sec=timeout_sec)+++class SkillEvaluatorGatewayOpenCode(OpenCode):+ """Use Chat Completions for an explicitly OpenAI-compatible gateway."""++ def __init__(self, *args: Any, **kwargs: Any) -> None:+ super().__init__(*args, **kwargs)+ namespace, separator, model_id = str(self.model_name or "").partition("/")+ if namespace != "openai" or not separator or not model_id:+ raise ValueError("Gateway OpenCode requires an openai/MODEL identifier")+ # OpenCode's built-in openai loader always selects Responses, even when+ # its npm SDK is overridden. A distinct transport namespace is needed;+ # the gateway's catalog model ID remains unchanged after the first slash.+ self.model_name = f"skillevaluator-gateway/{model_id}"+ self._opencode_config = self._deep_merge(+ copy.deepcopy(self._opencode_config),+ {+ "provider": {+ "skillevaluator-gateway": {+ "npm": "@ai-sdk/openai-compatible",+ "options": {+ "baseURL": os.environ.get("OPENAI_BASE_URL", ""),+ "apiKey": "{env:OPENAI_API_KEY}",+ },+ }+ }+ },+ )++class SkillEvaluatorLocalOpenCode(OpenCode):"""OpenCode wrapper that skips nvm/npm bootstrap in local mode."""diff --git a/src/skillevaluator/tier3/harbor/local_environment.py b/src/skillevaluator/tier3/harbor/local_environment.pyindex d4da8334..02f48c64 100644--- a/src/skillevaluator/tier3/harbor/local_environment.py+++ b/src/skillevaluator/tier3/harbor/local_environment.py@@ -991,7 +991,9 @@ class SkillEvaluatorLocalEnvironment(BaseEnvironment):def _path_with_evaluator_python(self, path: str) -> str:"""Ensure local verifier scripts use the evaluator's Python runtime."""parts = [piece for piece in path.split(os.pathsep) if piece]- python_bin = str(Path(sys.executable).resolve().parent)+ # Resolving a venv's interpreter symlink selects the base Python and+ # loses the evaluator's installed dependencies (for example idna).+ python_bin = str(Path(sys.executable).absolute().parent)if python_bin in parts:return os.pathsep.join(parts)diff --git a/src/skillevaluator/tier3/harbor/runner.py b/src/skillevaluator/tier3/harbor/runner.pyindex 3c586775..62ff9e33 100644--- a/src/skillevaluator/tier3/harbor/runner.py+++ b/src/skillevaluator/tier3/harbor/runner.py@@ -31,6 +31,9 @@ from uuid import uuid4from skillevaluator import __version__from skillevaluator.evaluation.tier3_report import render_agent_eval_html_reportfrom skillevaluator.provider_config import (+ CHAT_DEFAULT_ANTHROPIC,+ CHAT_DEFAULT_NVIDIA,+ GATEWAY_AGENT_DEFAULT_MODELS,ProviderConfig,ProviderConfigurationError,_normalize_anthropic_base_url,@@ -114,7 +117,7 @@ def _persist_dataset_truth(run_dir: Path, *, fallback_task_ids: list[str]) -> di_NVIDIA_BUILD_FILE_SENTINEL = "skillevaluator-file-backed-nvidia-key"_NVIDIA_BUILD_KEY_FILE_ENV = "SKILLEVALUATOR_NVIDIA_API_KEY_FILE"-_NVIDIA_BUILD_BRIDGED_AGENT_DEFAULT_MODEL = "nvidia/nemotron-3-super-120b-a12b"+_NVIDIA_BUILD_AGENT_DEFAULT_MODEL = CHAT_DEFAULT_NVIDIAdef _reserve_run_dir(results_root: Path, timestamp: str) -> Path:@@ -386,8 +389,6 @@ def build_harbor_run_command("""Build a Harbor invocation for a built-in environment type or local mode."""if env_mode not in HARBOR_ENV_MODES:raise ValueError(f"env_mode must be one of: {', '.join(sorted(HARBOR_ENV_MODES))}")- if agent_import_path and env_mode not in {"docker", ENV_MODE_LOCAL}:- raise ValueError("agent_import_path is supported only with --env docker or local")command = [_harbor_bin(),@@ -444,7 +445,11 @@ def build_harbor_run_command(command.extend(["-a", agent])command.extend(["--environment-import-path", SECURE_DOCKER_ENV_IMPORT_PATH])else:- command.extend(["-a", agent, "--env", env_mode])+ if agent_import_path:+ command.extend(["--agent-import-path", agent_import_path])+ else:+ command.extend(["-a", agent])+ command.extend(["--env", env_mode])if jobs_dir is not None:command.extend(["--jobs-dir", str(jobs_dir)])if disable_verification:@@ -569,7 +574,7 @@ def _validate_agent_provider_credentials("AWS_BEARER_TOKEN_BEDROCK for the agent environment."]- if provider.provider in {"openai", "openai-compatible"} and "claude-code" in agents:+ if provider.provider == "openai" and "claude-code" in agents:if not agent_runtime_env.get("ANTHROPIC_API_KEY", "").strip():return ["claude-code with the OpenAI evaluator provider requires an independent ANTHROPIC_API_KEY "@@ -862,6 +867,24 @@ def _independent_anthropic_agent_credentials() -> dict[str, str]:return credentials+def _gateway_anthropic_agent_credentials(provider: ProviderConfig) -> dict[str, str]:+ """Use a shared gateway unless the operator selected a separate Claude route.++ A standalone Anthropic key keeps its native endpoint, so a native key is+ never silently sent to the shared gateway. An explicit base URL without a+ separate key selects another API root on the operator's gateway.+ """+ credentials = _independent_anthropic_agent_credentials()+ if credentials.get("ANTHROPIC_API_KEY", "").strip():+ return credentials+ base_url = credentials.get("ANTHROPIC_BASE_URL")+ if not base_url:+ base_url = _normalize_anthropic_base_url(provider.base_url or "", variable="SKILL_EVAL_LLM_BASE_URL")+ if not base_url:+ raise ProviderConfigurationError("SKILL_EVAL_LLM_BASE_URL is required for the Claude gateway route.")+ return {"ANTHROPIC_API_KEY": provider.api_key or "", "ANTHROPIC_BASE_URL": base_url}++def _judge_model_config(provider: ProviderConfig,provider_env: Mapping[str, str],@@ -946,7 +969,9 @@ def _agent_credentials(}return {}- if provider.provider in {"openai", "openai-compatible"} and agent == "claude-code":+ if provider.provider == "openai-compatible" and agent == "claude-code":+ return _gateway_anthropic_agent_credentials(provider)+ if provider.provider == "openai" and agent == "claude-code":return _independent_anthropic_agent_credentials()if provider.provider == "anthropic" and agent == "codex":return {@@ -1192,14 +1217,23 @@ def _model_for_agent(configured = config_agents.get(agent, {}) if isinstance(config_agents, dict) else {}if isinstance(configured, dict) and configured.get("model"):selected, source = str(configured["model"]), "evals/config.yml"+ elif provider.provider == "openai-compatible" and agent in GATEWAY_AGENT_DEFAULT_MODELS:+ selected, source = GATEWAY_AGENT_DEFAULT_MODELS[agent], "openai-compatible agent default"+ if agent == "claude-code":+ credentials = _independent_anthropic_agent_credentials()+ if credentials.get("ANTHROPIC_API_KEY", "").strip() and not credentials.get("ANTHROPIC_BASE_URL"):+ selected, source = CHAT_DEFAULT_ANTHROPIC, "native Anthropic agent default"else:selected, source = provider.model, "public provider default"- if agent in {"codex", "claude-code"} and provider.provider == "nv_build" and source == "public provider default":- # Nano is the cost-conscious default for Build itself, but in real- # bridged tool loops it failed to execute the target skill. Super is- # the smallest verified default for these compatibility bridges;- # explicit overrides remain exact.- selected = _NVIDIA_BUILD_BRIDGED_AGENT_DEFAULT_MODEL+ if (+ provider.provider == "nv_build"+ and source == "public provider default"+ and (agent in {"codex", "claude-code"} or provider.model == CHAT_DEFAULT_NVIDIA)+ ):+ # Share the NVIDIA chat default across agent execution and judging.+ # Provider-model, --model, --agent-model, and evals/config.yml overrides+ # stay exact for native OpenCode; bridge defaults remain compatibility-pinned.+ selected = _NVIDIA_BUILD_AGENT_DEFAULT_MODELif agent == "opencode":namespace = {"anthropic": "anthropic",@@ -1207,11 +1241,20 @@ def _model_for_agent("openai": "openai","openai-compatible": "openai",}.get(provider.provider)- if namespace and source == "public provider default":+ if namespace and source in {"public provider default", "openai-compatible agent default"}:selected = f"{namespace}/{selected}"return selected, source+def _agent_import_path(provider: ProviderConfig, agent: str, env_mode: str) -> str | None:+ """Select only the provider-specific wrappers required for this environment."""+ if provider.provider == "openai-compatible" and agent == "codex" and env_mode != ENV_MODE_LOCAL:+ return "skillevaluator.tier3.harbor.local_agents:SkillEvaluatorGatewayCodex"+ if provider.provider == "openai-compatible" and agent == "opencode" and env_mode == "docker":+ return "skillevaluator.tier3.harbor.local_agents:SkillEvaluatorGatewayOpenCode"+ return _nvidia_build_agent_import_path(provider, agent, env_mode)++def _nvidia_build_agent_import_path(provider: ProviderConfig, agent: str, env_mode: str) -> str | None:"""Return the environment-specific NVIDIA Build compatibility wrapper."""if provider.provider != "nv_build":@@ -1863,7 +1906,7 @@ def _run_harbor_eval_impl(agent_runtime_preflight = (agent_runtime_preflightif agent_runtime_preflight is not None- else harbor_config.get("agent_runtime_preflight", True)+ else harbor_config.get("agent_runtime_preflight", False))grading_mode = grading_mode or grading_config.get("mode", "default")workspace_mode = skill_workspace_mode or workspace_config.get("mode", "isolated")@@ -1972,10 +2015,10 @@ def _run_harbor_eval_impl(except ValueError as exc:reporter.emit(ProgressEvent(stage="credential-validation", state="failed", detail=str(exc)))return {"error": [str(exc)]}- nvidia_build_agent_import_paths = {+ agent_import_paths = {agent: import_pathfor agent in agents- if (import_path := _nvidia_build_agent_import_path(provider, agent, env_mode)) is not None+ if (import_path := _agent_import_path(provider, agent, env_mode)) is not None}runtime_secret_values = set().union(*(secret_values_from_environment(plan.subprocess_env) for plan in runtime_plans.values())@@ -2425,7 +2468,7 @@ def _run_harbor_eval_impl(override_cpus=override_cpus,override_memory_mb=override_memory_mb,override_storage_mb=override_storage_mb,- agent_import_path=nvidia_build_agent_import_paths.get(agent),+ agent_import_path=agent_import_paths.get(agent),)if not preflight.ok:preflight_errors.append(f"{agent} runtime preflight failed: {preflight.detail}")@@ -2443,7 +2486,13 @@ def _run_harbor_eval_impl())else:- reporter.emit(ProgressEvent(stage="agent-runtime-preflight", state="skipped", detail="disabled by operator"))+ reporter.emit(+ ProgressEvent(+ stage="agent-runtime-preflight",+ state="skipped",+ detail=("disabled by default; enable with --agent-runtime-preflight or harbor.agent_runtime_preflight"),+ )+ )errors: list[str] = []started_agents: SimpleQueue[str] = SimpleQueue()@@ -2464,7 +2513,7 @@ def _run_harbor_eval_impl(override_cpus=override_cpus,override_memory_mb=override_memory_mb,override_storage_mb=override_storage_mb,- agent_import_path=nvidia_build_agent_import_paths.get(agent),+ agent_import_path=agent_import_paths.get(agent),expected_trials=expected_trials,stop_on_pass=bool(stop_on_pass),pass_threshold=float(pass_threshold),diff --git a/src/skillevaluator/tier3/harbor/templates/eval.py b/src/skillevaluator/tier3/harbor/templates/eval.pyindex 297d0588..d3928857 100644--- a/src/skillevaluator/tier3/harbor/templates/eval.py+++ b/src/skillevaluator/tier3/harbor/templates/eval.py@@ -1303,6 +1303,7 @@ def _chat_completion_payload(model, prompt, max_tokens, temperature, provider=No"model": model,token_key: max_tokens,"messages": [{"role": "user", "content": prompt}],+ "stream": False,}if temperature is not None and _supports_custom_temperature(model):payload["temperature"] = temperature@@ -1500,6 +1501,7 @@ def _call_anthropic(prompt, model, max_tokens, temperature):"model": model,"max_tokens": max_tokens,"messages": [{"role": "user", "content": prompt}],+ "stream": False,}if temperature is not None and _supports_custom_temperature(model):payload["temperature"] = temperaturediff --git a/src/skillevaluator/tier3/result_display.py b/src/skillevaluator/tier3/result_display.pyindex 1c2a1920..46f75dc6 100644--- a/src/skillevaluator/tier3/result_display.py+++ b/src/skillevaluator/tier3/result_display.py@@ -9,12 +9,13 @@ import ioimport loggingimport mathimport os+import refrom collections.abc import Mappingfrom pathlib import Path, PurePosixPath, PureWindowsPathfrom typing import Anyfrom rich.box import SIMPLE-from rich.console import Console+from rich.console import Console, Groupfrom rich.panel import Panelfrom rich.table import Tablefrom rich.text import Text@@ -188,6 +189,147 @@ def _trial_failures(agent: str, data: Mapping[str, Any]) -> list[str]:return rendered+def _error_messages(value: object) -> list[str]:+ if isinstance(value, str):+ return [value] if value.strip() else []+ return [str(item) for item in value if str(item).strip()] if isinstance(value, list) else []+++def _attempt_coverage(data: Mapping[str, Any]) -> str:+ scored, expected = data.get("scored_attempts"), data.get("expected_attempts")+ if all(isinstance(value, int) and not isinstance(value, bool) and value >= 0 for value in (scored, expected)):+ return f"{scored}/{expected}"+ return ""+++def _concise_trial_reason(reason: str) -> str:+ """Collapse identical judge errors while retaining the affected metrics."""+ prefix = "Required judge evaluation failed: "+ if reason.startswith(prefix):+ parts = [part.partition(": LLM judge error: ") for part in reason.removeprefix(prefix).split("; ")]+ if parts and all(separator and detail == parts[0][2] for _, separator, detail in parts):+ metrics = ", ".join(metric for metric, _, _ in parts)+ return f"Judge evaluation failed ({metrics}): {parts[0][2]}"+ return reason+++def _render_incomplete_execution(*, result: Mapping[str, Any], console: Console, safe: Any) -> set[str]:+ """Show execution evidence once, without implying an unscored skill failed."""+ body = Text("Evaluation did not complete; skill lift was not measured.\n")+ coverage = _attempt_coverage(result)+ if coverage:+ body.append(f"Scored attempts: {coverage}\n", style="bold")+ covered: set[str] = set()+ rendered: set[tuple[str, str]] = set()+ reasons: list[str] = []++ def add(scope: str, message: str) -> None:+ covered.add(message)+ key = (scope, message)+ if key not in rendered:+ rendered.add(key)+ body.append(f"\n{safe(scope)}: " if scope else "\n", style="bold")+ body.append(safe(message) + "\n")++ agents = result.get("agents")+ for agent, raw in agents.items() if isinstance(agents, Mapping) else []:+ if not isinstance(raw, Mapping):+ continue+ conditions = raw.get("conditions")+ conditions = conditions if isinstance(conditions, Mapping) else {}+ trial_failures = raw.get("trial_failures")+ trial_failures = trial_failures if isinstance(trial_failures, Mapping) else {}+ agent_covered: set[str] = set()+ for variant in dict.fromkeys([*conditions, *trial_failures]):+ arm_rendered_count = len(rendered)+ condition = conditions.get(variant)+ condition = condition if isinstance(condition, Mapping) else {}+ failures = trial_failures.get(variant)+ failures = failures if isinstance(failures, list) else []+ label = str(variant).replace("_", "-")+ scope = f"{agent} {label}"+ arm_coverage = _attempt_coverage(condition)+ if arm_coverage:+ scope += f" ({arm_coverage} scored)"+ redundant: set[str] = set()+ trial_names: list[str] = []+ for failure in failures:+ if not isinstance(failure, Mapping):+ continue+ trial = str(failure.get("trial") or "unknown trial")+ reason = str(failure.get("reason") or "trial did not complete")+ reasons.append(reason)+ trial_names.append(trial)+ add(f"{scope} / {trial}", _concise_trial_reason(reason))+ redundant.update(+ [reason, f"Agent runtime failed in {trial}: {reason}", f"Unscoreable reward in {trial}: {reason}"]+ )+ covered.add(f"{label.replace('-', ' ').capitalize()} trial {trial}: {reason}")+ errors = _error_messages(condition.get("execution_errors") or condition.get("detail"))+ for error in errors:+ coverage_error = bool(arm_coverage and error == f"Scored attempt coverage is {arm_coverage}")+ missing_prefix = "Missing scored attempts for cases: "+ missing_cases = error.removeprefix(missing_prefix).split(", ")+ missing_explained = error.startswith(missing_prefix) and all(+ any(trial.startswith(case + "__") for trial in trial_names) for case in missing_cases+ )+ aggregate = re.fullmatch(r"Harbor job did not complete successfully: (\d+) errored", error)+ aggregate_error = bool(aggregate and int(aggregate[1]) == len(set(trial_names)))+ if error not in redundant and not (coverage_error or missing_explained or aggregate_error):+ add(scope, error)+ redundant.add(error)+ if aggregate_error:+ redundant.add(f"{agent} {label} Harbor run failed: {error}")+ redundant.add(f"{label.replace('-', ' ').capitalize()} aggregate job: {error}")+ if len(rendered) == arm_rendered_count and _condition_status(raw, str(variant)) not in {+ "succeeded",+ "complete",+ "skipped",+ }:+ add(scope, "condition did not complete")+ agent_covered.update(redundant)+ for error in _error_messages(raw.get("execution_errors")):+ if error not in agent_covered:+ add(str(agent), error)+ agent_covered.add(error)+ if not conditions and not trial_failures and not agent_covered:+ add(str(agent), "evaluation failed without diagnostic details")+ covered.update(agent_covered)+ for error in _error_messages(result.get("execution_errors") or result.get("error")):+ if error not in covered:+ add("", error)+ for warning in _error_messages(result.get("warnings")):+ add("Warning", warning)++ body.append("\nNext steps\n", style="bold")+ if any("AgentTimeoutError" in reason for reason in reasons):+ body.append(+ " • Inspect the timed-out agent's trial.log and transcript; reduce the task or adjust --timeout-multiplier.\n"+ )+ if any("judge" in reason.casefold() and "timed out" in reason.casefold() for reason in reasons):+ body.append(" • Check the judge provider's availability and retry after resolving the request timeout.\n")+ if result.get("result_path") or result.get("run_dir") or result.get("output_dir"):+ body.append(" • Inspect result.json and the trial artifacts for the full execution diagnostics.\n")+ else:+ body.append(" • Resolve the execution error before retrying evaluation.\n")+ console.print(Panel(body, title=Text("Tier 3 Evaluation: INCOMPLETE", style="bold yellow"), border_style="yellow"))++ # Feedback sometimes re-emits a semicolon-joined copy of these same errors.+ # Suppress only messages composed entirely of evidence already displayed;+ # preserve any additional recommendation or unknown diagnostic.+ known_parts = {part for message in covered for part in message.split("; ")}+ feedback = result.get("tier3_feedback") or result.get("agent_eval")+ if isinstance(feedback, Mapping):+ for key in ("conclusions", "recommendations", "suggestions", "suggestions_v2"):+ for item in feedback.get(key, []) if isinstance(feedback.get(key), list) else []:+ message = (+ str(item.get("message") or item.get("suggestion") or "") if isinstance(item, Mapping) else str(item)+ )+ if message and all(part in known_parts for part in message.split("; ")):+ covered.add(message)+ return covered++def _display_metrics(result: Mapping[str, Any], agents: Mapping[str, Any]) -> list[str]:configured = result.get("metrics")metrics: list[str] = []@@ -362,9 +504,23 @@ def _render_agent_scores(if subtitle.plain:subtitle.append("\n")subtitle.append(safe(agent_output), style="dim")+ # Repeat the stored evaluator lift prominently without changing either+ # table or deriving a headline from dimensions or incomplete comparisons.+ content: Table | Group = table+ if (+ with_usable+ and baseline_usable+ and all(_finite_number(value) is not None for value in (with_overall, baseline_overall, overall.get("delta")))+ ):+ headline = Text("OVERALL SKILL LIFT ", style="bold")+ headline.append_text(_delta_cell(overall["delta"]))+ agents = result.get("agents")+ if isinstance(agents, Mapping) and len(agents) > 1:+ headline.append(f" · {safe(agent)}", style="dim")+ content = Group(headline, Text(""), table)console.print(Panel(- table,+ content,title=title,subtitle=subtitle if subtitle.plain else None,border_style="cyan",@@ -567,7 +723,15 @@ def render_evaluation_result(result: Mapping[str, Any], *, console: Console) ->console.print(f"Time: {float(duration):.1f}s")agents = result.get("agents")- if isinstance(agents, Mapping) and agents:+ incomplete = status in {"failed", "incomplete"} and not any(+ _condition_usable(raw, variant)+ for raw in (agents.values() if isinstance(agents, Mapping) else [])+ if isinstance(raw, Mapping)+ for variant in ("with_skill", "without_skill")+ )+ if incomplete:+ rendered_feedback_messages = _render_incomplete_execution(result=result, console=console, safe=safe)+ if isinstance(agents, Mapping) and agents and not incomplete:metrics = _display_metrics(result, agents)for agent, raw in agents.items():data = raw if isinstance(raw, Mapping) else {}@@ -579,6 +743,7 @@ def render_evaluation_result(result: Mapping[str, Any], *, console: Console) ->metrics=metrics,safe=safe,)+_render_dimensions(console=console, agents=agents, safe=safe)# The per-evaluator findings report — evaluator reasonings, evidence@@ -611,7 +776,7 @@ def render_evaluation_result(result: Mapping[str, Any], *, console: Console) ->rendered_errors.extend(agent_errors)if raw.get("execution_status") not in {None, "succeeded", "complete", "skipped"} and not agent_errors:rendered_errors.append(f"{agent} evaluation failed without diagnostic details")- if rendered_errors or warnings:+ if not incomplete and (rendered_errors or warnings):status_style = "bold red" if rendered_errors else "bold yellow"console.print(Text(f"Tier 3 Evaluation: {display_status.upper()}", style=status_style))findings = Text()diff --git a/src/skillevaluator/tier3/workflow.py b/src/skillevaluator/tier3/workflow.pynew file mode 100644index 00000000..bc3dbf51--- /dev/null+++ b/src/skillevaluator/tier3/workflow.py@@ -0,0 +1,265 @@+# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.+# SPDX-License-Identifier: Apache-2.0++"""Preparation for the direct Tier 3 workflow, sharing the expert evaluator."""++from __future__ import annotations++import stat+from collections.abc import Iterator+from contextlib import contextmanager+from copy import copy, deepcopy+from pathlib import Path+from typing import Any++import click+++def _require_regular_file(path: Path, *, optional: bool = False) -> None:+ """Reject linked or special authored files before a parser can open them."""+ from skillevaluator.utils.secure_fs import stat_is_link_or_reparse++ try:+ metadata = path.lstat()+ except FileNotFoundError:+ if optional:+ return+ raise ValueError(f"Required skill file is missing: {path}") from None+ if stat_is_link_or_reparse(metadata) or not stat.S_ISREG(metadata.st_mode) or metadata.st_nlink != 1:+ raise ValueError(f"Skill input must be a regular non-linked file: {path}")+++def _validate_skill_root(skill_path: Path) -> None:+ from skillevaluator.utils.secure_fs import stat_is_link_or_reparse++ metadata = skill_path.lstat()+ if stat_is_link_or_reparse(metadata) or not stat.S_ISDIR(metadata.st_mode):+ raise ValueError(f"Skill root must be a real directory: {skill_path}")+ _require_regular_file(skill_path / "SKILL.md")+++def _reject_legacy_datasets(skill_path: Path) -> None:+ """Refuse legacy discovery before it can escape the evaluator snapshot."""+ from skillevaluator.tier3.dataset_utils import DATASET_EXTENSIONS+ from skillevaluator.utils.secure_fs import stat_is_link_or_reparse++ legacy = skill_path / "eval"+ try:+ metadata = legacy.lstat()+ except FileNotFoundError:+ return+ migrate = (+ "Direct Tier 3 requires evals/evals.*; migrate legacy eval/dataset.* "+ "to evals/evals.* before running this workflow."+ )+ if stat_is_link_or_reparse(metadata) or not stat.S_ISDIR(metadata.st_mode):+ raise ValueError(migrate)+ for extension in DATASET_EXTENSIONS:+ try:+ (legacy / f"dataset{extension}").lstat()+ except FileNotFoundError:+ continue+ raise ValueError(migrate)+++@contextmanager+def _source_snapshot(skill_path: Path) -> Iterator[Path]:+ """Read authored evaluator inputs only through the engine's secure snapshot."""+ from skillevaluator.tier3.dataset_utils import DATASET_EXTENSIONS+ from skillevaluator.tier3.evals_config import CONFIG_FILENAMES+ from skillevaluator.tier3.harbor.adapter import private_evaluator_skill_snapshot++ _reject_legacy_datasets(skill_path)+ evals_dir = skill_path / "evals"+ if evals_dir.is_symlink() or (evals_dir.exists() and not evals_dir.is_dir()):+ raise ValueError(f"evals directory must be a real directory inside the skill: {evals_dir}")+ if not evals_dir.exists():+ yield skill_path+ return+ # The engine snapshot selects one dataset/config; refuse ambiguous authored+ # inputs before that selection. Inspect names only, never their contents.+ for label, names in (+ ("datasets", tuple(f"evals{extension}" for extension in DATASET_EXTENSIONS)),+ ("config files", CONFIG_FILENAMES),+ ):+ present = [path for name in names if (path := evals_dir / name).exists() or path.is_symlink()]+ if len(present) > 1:+ raise ValueError(f"multiple eval {label} found: " + ", ".join(str(path) for path in present))+ with private_evaluator_skill_snapshot(skill_path) as snapshot:+ yield snapshot+++def _preflight_options(skill_path: Path, params: dict[str, Any]) -> None:+ """Reject known configuration errors before generating a paid dataset."""+ from skillevaluator.cli import _evaluated_source_from_options+ from skillevaluator.provider_config import resolve_llm_provider+ from skillevaluator.tier3.commands import parse_agent_model_overrides, resolve_agents, validate_agents+ from skillevaluator.tier3.evals_config import _validate_config, load_evals_config+ from skillevaluator.tier3.harbor.runner import (+ _model_for_agent,+ _resolve_agent_runtime_plan,+ _resolve_runtime_env,+ _workspace_skills,+ )++ provider = resolve_llm_provider()+ config, config_path = load_evals_config(skill_path)+ effective = deepcopy(config)+ effective.setdefault("schema_version", 1)+ harbor = effective.setdefault("harbor", {})+ for name in (+ "n_attempts",+ "pass_threshold",+ "stop_on_pass",+ "n_concurrent",+ "max_agents",+ "timeout_multiplier",+ "agent_runtime_preflight",+ "custom_dockerfile_mode",+ ):+ if params.get(name) is not None:+ harbor[name] = params[name]+ for resource in ("cpus", "memory_mb", "storage_mb"):+ if params.get(f"override_{resource}") is not None:+ harbor.setdefault("resources", {})[resource] = params[f"override_{resource}"]+ for cli_name, group in (("grading_mode", "grading"), ("skill_workspace_mode", "skill_workspace")):+ if params.get(cli_name) is not None:+ effective.setdefault(group, {})["mode"] = params[cli_name]+ _validate_config(effective, config_path or skill_path / "evals" / "config.yml")+ if harbor.get("stop_on_pass", False) and harbor.get("n_attempts", 1) == 1:+ raise ValueError("stop_on_pass requires n_attempts > 1")++ workspace = effective.get("skill_workspace", {})+ # Match the expert callback: CLI paths are relative to the caller, while+ # authored config paths remain relative to the target skill's parent.+ cli_includes = [path.resolve() for path in params["include_skills"]]+ include_values = [*workspace.get("include", []), *cli_includes]+ if include_values and workspace.get("mode", "isolated") != "group":+ raise ValueError("include_skills requires skill_workspace.mode=group")+ _workspace_skills(params["skill_path"].resolve(), include_values)++ agents = resolve_agents(params["agents"], provider=provider.provider)+ if not agents:+ raise ValueError("Select at least one agent with --agents.")+ # The cloned expert callback receives an explicit, canonical selection so+ # preparation, prerequisite checks, progress, and execution cannot diverge.+ params["agents"] = ",".join(agents)+ unknown = validate_agents(agents)+ if unknown:+ raise ValueError("Unknown agent(s): " + ", ".join(unknown))+ overrides = parse_agent_model_overrides(params["agent_model"])+ unselected = sorted(set(overrides) - set(agents))+ if unselected:+ raise ValueError("--agent-model provided for agent(s) not selected by --agents: " + ", ".join(unselected))+ resolution = {+ agent: _model_for_agent(+ agent,+ cli_model=(overrides.get(agent) or [params["model"]])[0],+ config_agents=harbor.get("agents", {}),+ provider=provider,+ )+ for agent in agents+ }+ runtime_env, errors = _resolve_runtime_env(harbor.get("runtime_env"))+ if errors:+ raise ValueError("; ".join(errors))+ _resolve_agent_runtime_plan(+ provider=provider,+ agents=agents,+ models={agent: value[0] for agent, value in resolution.items()},+ configured_runtime_env=runtime_env,+ env_mode=params["env_mode"],+ model_sources={agent: value[1] for agent, value in resolution.items()},+ )+ _evaluated_source_from_options(+ params["evaluated_source_repository"],+ params["evaluated_source_revision"],+ params["evaluator_container_revision"],+ )+++def _preflight_environment(params: dict[str, Any]) -> None:+ """Check installed runtimes and backend configuration without an agent run."""+ from skillevaluator.tier3.commands import parse_agents+ from skillevaluator.tier3.harbor.runner import _check_prerequisites++ # These Harbor preflights perform remote authentication RPCs. Leave those+ # probes in the execution engine instead of running them before generation.+ if params["env_mode"] in {"cwsandbox", "wandb", "langsmith"}:+ return+ errors = _check_prerequisites(env_mode=params["env_mode"], agents=parse_agents(params["agents"]))+ if errors:+ raise ValueError("; ".join(errors))+++def _prepare_dataset(skill_path: Path, *, source_path: Path, progress: str = "auto") -> None:+ """Reuse valid authored sources; create one starter case only when absent."""+ from skillevaluator.cli import _ensure_autopilot_dataset+ from skillevaluator.tier3.commands import _validate_existing_scaffold_state+ from skillevaluator.tier3.dataset_utils import find_eval_file+ from skillevaluator.tier3.evals_spec import validate_tier3_source++ evals_dir = source_path / "evals"+ _validate_existing_scaffold_state(source_path, evals_dir)+ source, checks = validate_tier3_source(source_path)+ native_source = evals_dir / "harbor"+ missing = source == "missing" or (source == "evals_json" and find_eval_file(source_path) is None)+ generated = missing and not native_source.exists()+ if generated:+ _require_regular_file(skill_path / "SKILL.md")+ _require_regular_file(skill_path / "evals" / "EVAL.md", optional=True)+ _ensure_autopilot_dataset(skill_path, progress=progress)+ with _source_snapshot(skill_path) as generated_source:+ _validate_existing_scaffold_state(generated_source, generated_source / "evals")+ source, checks = validate_tier3_source(generated_source)+ errors = [f"{check.path}: {check.message}" for check in checks if check.status in {"error", "missing"}]+ if errors:+ raise ValueError("Invalid Tier 3 evaluation source: " + "; ".join(errors))+ if not generated:+ click.echo("Tier 3: reusing the existing evaluation source unchanged.", err=True)+++def build_tier3_workflow(evaluate_command: click.Command) -> click.Command:+ """Clone the expert command with automatic dataset preparation enabled.++ Keeping its parameters and callback preserves evaluation options, result+ rendering, and failure exit semantics without another evaluation engine.+ """+ command = copy(evaluate_command)+ command.params = [copy(param) for param in evaluate_command.params]+ command.hidden = False+ command.help = (+ "Run Tier 3 live agent evaluation. Reuse an existing valid dataset or "+ "create one starter case when the dataset is missing, then compare "+ "execution with and without the skill. Review generated cases before "+ "using them as a benchmark."+ )+ for param in command.params:+ if param.name == "autopilot":+ param.hidden = True+ elif param.name == "skill_path" and isinstance(param.type, click.Path):+ param.type = copy(param.type)+ param.type.resolve_path = False+ original_callback = evaluate_command.callback+ if original_callback is None:+ raise ValueError("The Tier 3 evaluation command must have a callback.")++ def workflow(**params: Any) -> Any:+ try:+ _validate_skill_root(params["skill_path"])+ params["skill_path"] = params["skill_path"].resolve()+ with _source_snapshot(params["skill_path"]) as source_path:+ _preflight_options(source_path, params)+ _preflight_environment(params)+ _prepare_dataset(params["skill_path"], source_path=source_path, progress=params["progress"])+ except ImportError as exc:+ raise click.ClickException(+ "Tier 3 dependencies are not installed. Install skillevaluator[tier3] and try again."+ ) from exc+ except (OSError, ValueError) as exc:+ raise click.ClickException(str(exc)) from exc+ params["autopilot"] = False+ return original_callback(**params)++ command.callback = workflow+ return commanddiff --git a/src/skillevaluator/tier_group.py b/src/skillevaluator/tier_group.pynew file mode 100644index 00000000..e2fd16ee--- /dev/null+++ b/src/skillevaluator/tier_group.py@@ -0,0 +1,50 @@+# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.+# SPDX-License-Identifier: Apache-2.0++"""A tier's default path workflow alongside its explicit expert commands."""++from __future__ import annotations++import copy+from pathlib import Path++import click++from skillevaluator.cli_help import RichGroup, render_help+++class TierGroup(RichGroup):+ """Dispatch paths to a workflow without inventing a public subcommand."""++ workflow: click.Command | None = None++ def parse_args(self, ctx: click.Context, args: list[str]) -> list[str]:+ if not args and not ctx.resilient_parsing:+ click.echo(ctx.get_help())+ ctx.exit()+ if args and self.workflow is not None:+ first = args[0]+ if first not in ctx.help_option_names and first not in self.commands:+ is_path = first.startswith((".", "~")) or "/" in first or "\\" in first or Path(first).exists()+ if first.startswith("-") or is_path:+ ctx.meta["direct_tier_args"] = args+ return args+ return super().parse_args(ctx, args)++ def invoke(self, ctx: click.Context):+ args = ctx.meta.pop("direct_tier_args", None)+ if args is not None and self.workflow is not None:+ with self.workflow.make_context(ctx.info_name, args, parent=ctx.parent) as workflow_ctx:+ return self.workflow.invoke(workflow_ctx)+ return super().invoke(ctx)++ def collect_usage_pieces(self, ctx: click.Context) -> list[str]: # noqa: ARG002 - Click method interface+ return ["[OPTIONS] PATH", "| COMMAND [ARGS]..."]++ def format_help(self, ctx: click.Context, formatter: click.HelpFormatter) -> None:+ # Show workflow options and expert commands together without making+ # workflow flags apply to every expert subcommand's parser.+ display = copy.copy(self)+ if self.workflow is not None:+ display.params = list(self.workflow.params)+ formatter.write(render_help(display, ctx, width=formatter.width))diff --git a/src/skillevaluator/tier_workflows.py b/src/skillevaluator/tier_workflows.pynew file mode 100644index 00000000..e0f273b1--- /dev/null+++ b/src/skillevaluator/tier_workflows.py@@ -0,0 +1,166 @@+# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.+# SPDX-License-Identifier: Apache-2.0++"""Compose complete, independently scoped Tier 1 and Tier 2 workflows."""++from __future__ import annotations++import os+from pathlib import Path+from typing import TYPE_CHECKING++import click++from skillevaluator.provider_config import ProviderConfigurationError, resolve_embedding_provider, resolve_llm_provider+from skillevaluator.tier1 import commands as tier1+from skillevaluator.utils.tier2_paths import is_link_or_reparse, sanitize_path_text+from skillevaluator.validators.policy import apply_policy++if TYPE_CHECKING:+ from skillevaluator.models.result import ValidationResult+ from skillevaluator.validators.policy import ValidationPolicy+++def require_skill(path: Path) -> None:+ if not path.is_dir() or not (path / "SKILL.md").is_file():+ raise click.UsageError("PATH must be one skill directory containing SKILL.md.")+ if is_link_or_reparse(path) or is_link_or_reparse(path / "SKILL.md"):+ raise click.UsageError("The skill directory and SKILL.md must not be symlinks or reparse points.")+++def _chat_enabled(requested: bool | None) -> bool:+ if requested is False:+ return False+ configured = any(+ os.environ.get(name)+ for name in ("SKILL_EVAL_LLM_PROVIDER", "NVIDIA_API_KEY", "OPENAI_API_KEY", "ANTHROPIC_API_KEY")+ )+ if requested is None and not configured:+ return False+ try:+ resolve_llm_provider()+ except ProviderConfigurationError as exc:+ raise click.ClickException(f"{exc}\n\nTo run static Tier 1 checks only, add --no-llm.") from exc+ return True+++def _stage(results: list[ValidationResult]) -> dict[str, str]:+ status = "incomplete" if any(result.is_incomplete for result in results) else "passed"+ if status != "incomplete" and (not results or any(not result.passed for result in results)):+ status = "failed"+ return {"status": status}+++def _record_scope(results: list[ValidationResult], tier: int, stages: dict) -> list[ValidationResult]:+ for result in results:+ result.metadata["workflow"] = {"tier": tier, "stages": stages}+ result.metadata["gating"] = {"tier": tier, "blocking": True}+ for stage, details in stages.items():+ if details["status"] == "skipped":+ click.echo(f"{stage.replace('_', ' ')} skipped: {details['reason']}", err=True)+ if results:+ results[0].add_warning(f"Workflow scope: {stage.replace('_', ' ')} skipped. {details['reason']}")+ return results+++def run_tier1_workflow(+ skill_path: Path,+ *,+ checks: str | None,+ llm: bool | None,+ min_score: int,+ profile: ValidationPolicy,+ previous_version: str | None,+) -> list[ValidationResult]:+ require_skill(skill_path)+ if checks is not None and not checks.strip(", \t\n"):+ raise click.UsageError("--checks must name at least one static check.")+ selected = checks if checks is not None else ",".join((*tier1.DEFAULT_CHECKS, *tier1.OPTIONAL_CHECKS))+ lineup = tier1.enabled_check_lineup(selected)+ unknown = set(lineup) - tier1.RECOGNIZED_CHECKS+ if unknown:+ raise click.UsageError(f"Unknown Tier 1 check(s): {', '.join(sorted(unknown))}")+ use_llm = _chat_enabled(llm)+ if use_llm:+ try:+ import openai # noqa: F401 -- fail before scanning if the LLM extra is absent+ except ImportError as exc:+ raise click.ClickException("Install skillevaluator[llm] to run LLM checks.") from exc+ results = tier1.run_validation(+ skill_path,+ checks=selected,+ use_llm=use_llm,+ llm_verify=use_llm,+ min_score=min_score,+ previous_version=previous_version,+ policy=profile,+ content_type="skill",+ continue_on_failure=True,+ )+ apply_policy(results, profile)+ stages = {"validation": _stage(results)}+ if use_llm:+ rubric_results = tier1.run_rubric_eval(skill_path, min_score=min_score)+ apply_policy(rubric_results, profile)+ results.extend(rubric_results)+ stages["rubric"] = _stage(rubric_results)+ # Static and LLM security findings share a validator result. Describe+ # enabled scope here; do not invent an independent LLM pass/fail.+ stages["llm"] = {"status": "enabled"}+ else:+ stages["llm"] = {+ "status": "skipped",+ "reason": "LLM checks disabled by --no-llm."+ if llm is False+ else ("No LLM provider configured; set SKILL_EVAL_LLM_PROVIDER and its API key to include LLM checks."),+ }+ return _record_scope(results, 1, stages)+++def run_tier2_workflow(+ skill_path: Path,+ *,+ catalog: Path | None,+ threshold: float,+ similarity_threshold: float,+ full_body: bool,+) -> list[ValidationResult]:+ require_skill(skill_path)+ if full_body and catalog is None:+ raise click.UsageError("--full-body requires --catalog for inter-skill comparison.")+ try:+ resolve_embedding_provider()+ resolve_llm_provider()+ except ProviderConfigurationError as exc:+ raise click.ClickException(str(exc)) from exc+ try:+ from skillevaluator.tier2 import commands as tier2+ except ImportError as exc:+ raise click.ClickException("Install skillevaluator[tier2] to run Tier 2.") from exc+ if catalog is not None:+ from skillevaluator.embedding.client import EmbeddingClient+ from skillevaluator.embedding.registry import EmbeddingRegistry++ try:+ # Parsing and compatibility checks are local: reject invalid,+ # linked, or mismatched catalogs before any paid model calls.+ EmbeddingRegistry(EmbeddingClient(), full_body=full_body).load_catalog(catalog)+ except (OSError, ValueError) as exc:+ raise click.ClickException(sanitize_path_text(str(exc), (skill_path, catalog))) from exc+ results = tier2.run_context_optimization_check(skill_path, threshold=threshold)+ stages = {"intra_skill": _stage(results)}+ if catalog is not None:+ inter_results = tier2.run_similarity_check(+ skill_path,+ catalog=catalog,+ threshold=similarity_threshold,+ full_body=full_body,+ )+ results.extend(inter_results)+ stages["catalog_comparison"] = _stage(inter_results)+ else:+ stages["catalog_comparison"] = {+ "status": "skipped",+ "reason": "No comparison catalog supplied; add --catalog skill-catalog.json to compare other skills.",+ }+ return _record_scope(results, 2, stages)diff --git a/src/skillevaluator/validators/similarity.py b/src/skillevaluator/validators/similarity.pyindex 86f67aac..7a8d558c 100644--- a/src/skillevaluator/validators/similarity.py+++ b/src/skillevaluator/validators/similarity.py@@ -150,7 +150,16 @@ class SimilarityValidator(ValidatorBase):"catalog_saved",f"Saved local catalog to {self._catalog_display_name(self._save_catalog_path)}",)- except (SimilarityConfigError, ValueError, OSError) as exc:+ except SimilarityConfigError as exc:+ result.mark_scan_incomplete("embedding-provider")+ result.add_error(+ sanitize_path_text(+ f"Embedding provider error: {exc}",+ (skill_path, self._catalog_path, self._save_catalog_path),+ )+ )+ return result+ except (ValueError, OSError) as exc:result.add_error(sanitize_path_text(str(exc),diff --git a/tests/cli/test_tier_workflows.py b/tests/cli/test_tier_workflows.pynew file mode 100644index 00000000..5f81e01e--- /dev/null+++ b/tests/cli/test_tier_workflows.py@@ -0,0 +1,307 @@+# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.+# SPDX-License-Identifier: Apache-2.0++"""Public behavior of direct tier workflows and their expert commands."""++from __future__ import annotations++import json++import pytest+from click.testing import CliRunner++from skillevaluator.cli import cli+from skillevaluator.cli_help import render_help+from skillevaluator.models.result import ValidationResult++[email protected](autouse=True)+def clean_provider_environment(monkeypatch):+ import os++ for name in os.environ:+ if name.startswith(("SKILL_EVAL_", "SKILLSPECTOR_")) or name in {+ "OPENAI_API_KEY",+ "NVIDIA_API_KEY",+ "ANTHROPIC_API_KEY",+ "LLM_JUDGE_MODEL",+ }:+ monkeypatch.delenv(name)+++def skill(tmp_path):+ path = tmp_path / "sample"+ path.mkdir()+ (path / "SKILL.md").write_text(+ "---\nname: sample\ndescription: Use when asked to summarize a local text file.\n"+ "metadata:\n author: Example Author <[email protected]>\n---\n"+ "# Summarize text\n\nRead the supplied file and return a concise summary.\n",+ )+ return path+++def _result(name):+ result = ValidationResult(validator_name=name)+ result.add_success("checked", "Completed this check")+ return [result]+++def _report(output_dir):+ files = list(output_dir.glob("*.json"))+ assert len(files) == 1+ return json.loads(files[0].read_text())++[email protected]("tier", ["tier1", "tier2", "tier3"])+def test_bare_tier_displays_help_without_running(tier):+ result = CliRunner().invoke(cli, [tier])+ assert result.exit_code == 0, result.output+ assert "Usage:" in result.output+ assert "PATH" in result.output+ assert "Commands:" in result.output++[email protected]("tier", ["tier1", "tier2", "tier3"])+def test_unknown_subcommand_and_removed_run_are_errors(tier):+ for name in ("misspelled-command", "run"):+ result = CliRunner().invoke(cli, [tier, name])+ assert result.exit_code == 2+ assert "No such command" in result.output+++def test_direct_tier1_runs_only_requested_static_checks(skill, tmp_path):+ output = tmp_path / "reports"+ result = CliRunner().invoke(+ cli,+ ["tier1", str(skill), "--checks", "schema", "--no-llm", "-r", "json", "-o", str(output)],+ )+ assert result.exit_code == 0, result.output+ payload = _report(output)+ assert len(payload["results"]) == 1+ assert "Schema" in payload["results"][0]["validator"]+ assert payload["results"][0]["workflow"]["tier"] == 1+++def test_direct_tier1_options_before_path_and_failed_findings(skill, tmp_path):+ (skill / "SKILL.md").write_text("Missing required frontmatter\n")+ result = CliRunner().invoke(+ cli,+ ["tier1", "--checks", "schema", "--no-llm", str(skill), "-r", "json", "-o", str(tmp_path / "reports")],+ )+ assert result.exit_code == 1, result.output+ assert _report(tmp_path / "reports")["results"][0]["passed"] is False+++def test_default_tier1_includes_dependency_and_configured_llm_stages(skill, monkeypatch):+ from skillevaluator.tier1 import commands++ calls = []++ def validation(path, **kwargs):+ calls.append(("static", path, kwargs))+ return _result("Schema Validation")++ def rubric(path, **kwargs):+ calls.append(("rubric", path, kwargs))+ return _result("Rubric Evaluation")++ monkeypatch.setattr(commands, "run_validation", validation)+ monkeypatch.setattr(commands, "run_rubric_eval", rubric)+ monkeypatch.setenv("SKILL_EVAL_LLM_PROVIDER", "nv_build")+ monkeypatch.setenv("NVIDIA_API_KEY", "test-credential")+ result = CliRunner().invoke(cli, ["tier1", str(skill)])+ assert result.exit_code == 0, result.output+ assert [call[0] for call in calls] == ["static", "rubric"]+ assert "dependency" in calls[0][2]["checks"].split(",")+ assert calls[0][2]["use_llm"] is True+ assert calls[0][2]["llm_verify"] is True+++def test_keyless_tier1_reports_unrun_llm_scope(skill, tmp_path):+ result = CliRunner().invoke(+ cli,+ ["tier1", str(skill), "--checks", "schema", "-r", "json", "-o", str(tmp_path / "reports")],+ )+ assert result.exit_code == 0, result.output+ workflow = _report(tmp_path / "reports")["results"][0]["workflow"]+ assert workflow["stages"]["llm"]["status"] == "skipped"+ assert "LLM" in result.output and "skipped" in result.output++[email protected]("tier,options", [("tier1", ["--llm"]), ("tier2", [])])+def test_required_provider_failure_is_a_configuration_error(tier, options, skill, tmp_path):+ result = CliRunner().invoke(cli, [tier, str(skill), *options, "-o", str(tmp_path / "reports")])+ assert result.exit_code == 1+ assert result.stdout == ""+ assert "provider" in result.output.lower()+ assert "\n\nFor NVIDIA Build, set:\n export " in result.stderr+ assert ("--no-llm" in result.stderr) is (tier == "tier1")+ assert "No such command" not in result.output+ assert not (tmp_path / "reports").exists()+++def test_tier2_combines_intra_and_catalog_comparison_once(skill, tmp_path, monkeypatch):+ from skillevaluator.embedding.client import EmbeddingClient+ from skillevaluator.embedding.registry import EmbeddingRegistry+ from skillevaluator.tier2 import commands++ calls = []+ catalog = tmp_path / "catalog.json"++ def intra(path, **kwargs):+ calls.append(("intra", kwargs))+ return _result("Context Deduplication")++ def inter(path, **kwargs):+ calls.append(("inter", kwargs))+ return _result("Similarity Check")++ monkeypatch.setattr(commands, "run_context_optimization_check", intra)+ monkeypatch.setattr(commands, "run_similarity_check", inter)+ monkeypatch.setenv("SKILL_EVAL_LLM_PROVIDER", "nv_build")+ monkeypatch.setenv("NVIDIA_API_KEY", "test-credential")+ client = EmbeddingClient()+ monkeypatch.setattr(client, "embed", lambda _texts: [[1.0, 0.0]])+ registry = EmbeddingRegistry(client)+ registry.build_from_directory(skill.parent, "skill")+ registry.save_catalog(catalog)+ result = CliRunner().invoke(cli, ["tier2", str(skill), "--catalog", str(catalog)])+ assert result.exit_code == 0, result.output+ assert [call[0] for call in calls] == ["intra", "inter"]+ assert calls[1][1]["catalog"] == catalog+++def test_tier2_invalid_catalog_fails_before_model_work(skill, tmp_path, monkeypatch):+ from skillevaluator.tier2 import commands++ calls = []+ monkeypatch.setattr(commands, "run_context_optimization_check", lambda *_a, **_kw: calls.append("intra") or [])+ monkeypatch.setenv("SKILL_EVAL_LLM_PROVIDER", "nv_build")+ monkeypatch.setenv("NVIDIA_API_KEY", "test-credential")+ catalog = tmp_path / "bad.json"+ catalog.write_text("[]")+ result = CliRunner().invoke(cli, ["tier2", str(skill), "--catalog", str(catalog)])+ assert result.exit_code != 0+ assert not calls+ assert "Catalog" in result.output+++def test_tier1_static_failure_does_not_become_a_rubric_failure(skill, tmp_path, monkeypatch):+ from skillevaluator.tier1 import commands++ failure = ValidationResult(validator_name="Schema Validation")+ failure.add_error("Invalid schema")+ monkeypatch.setattr(commands, "run_validation", lambda *_a, **_kw: [failure])+ monkeypatch.setattr(commands, "run_rubric_eval", lambda *_a, **_kw: _result("Rubric Evaluation"))+ monkeypatch.setenv("SKILL_EVAL_LLM_PROVIDER", "nv_build")+ monkeypatch.setenv("NVIDIA_API_KEY", "test-credential")+ result = CliRunner().invoke(cli, ["tier1", str(skill), "-r", "json", "-o", str(tmp_path / "reports")])+ assert result.exit_code == 1+ stages = _report(tmp_path / "reports")["workflow"]["stages"]+ assert stages["validation"]["status"] == "failed"+ assert stages["rubric"]["status"] == "passed"+ assert stages["llm"]["status"] == "enabled"+++def test_tier2_without_catalog_does_not_manufacture_a_similarity_pass(skill, tmp_path, monkeypatch):+ from skillevaluator.tier2 import commands++ monkeypatch.setattr(commands, "run_context_optimization_check", lambda *_a, **_kw: _result("Context Deduplication"))+ monkeypatch.setenv("SKILL_EVAL_LLM_PROVIDER", "nv_build")+ monkeypatch.setenv("NVIDIA_API_KEY", "test-credential")+ result = CliRunner().invoke(+ cli,+ ["tier2", str(skill), "-r", "json", "-o", str(tmp_path / "reports")],+ )+ assert result.exit_code == 0, result.output+ payload = _report(tmp_path / "reports")+ assert len(payload["results"]) == 1+ assert payload["results"][0]["workflow"]["stages"]["catalog_comparison"]["status"] == "skipped"+ assert "--catalog" in result.output+++def test_tier_name_collision_requires_explicit_path(tmp_path, monkeypatch):+ monkeypatch.chdir(tmp_path)+ path = tmp_path / "quality-check"+ path.mkdir()+ (path / "SKILL.md").write_text(+ "---\nname: quality-check\ndescription: Use when asked to check quality.\n"+ "metadata:\n author: Example Author <[email protected]>\n---\n# Quality check\n",+ )+ result = CliRunner().invoke(cli, ["tier1", "./quality-check", "--checks", "schema", "--no-llm"])+ assert result.exit_code == 0, result.output+ expert = CliRunner().invoke(cli, ["tier1", "quality-check", "--help"])+ assert expert.exit_code == 0+ assert "--min-score" in expert.output+++def test_tier1_validate_alias_stays_inside_tier1(skill, monkeypatch):+ from skillevaluator.tier1 import commands++ monkeypatch.setattr(commands, "run_validation", lambda *_a, **_kw: _result("Schema Validation"))+ result = CliRunner().invoke(cli, ["tier1", "validate", str(skill), "--no-llm"])+ assert result.exit_code == 0, result.output+ assert "Tier 2" not in result.output++[email protected]("tier,flag", [("tier1", "--no-llm"), ("tier2", "--catalog"), ("tier3", "--agents")])+def test_tier_help_shows_default_workflow_options(tier, flag):+ result = CliRunner().invoke(cli, [tier, "--help"])+ assert result.exit_code == 0+ assert flag in result.output++[email protected]("width", [80, 120])+def test_tier3_help_keeps_option_descriptions_visible(width):+ import click++ command = cli.commands["tier3"]+ output = render_help(command.workflow, click.Context(command.workflow), width=width)+ normalized = " ".join(output.split())+ assert "Run an extra agent-only execution of" in normalized+ assert "first staged task before the full" in normalized+ assert "matrix [default: disabled]" in normalized+ assert "Per-agent model override" in normalized+++def test_tier2_rejects_linked_target_before_provider_resolution(skill, tmp_path):+ link = tmp_path / "linked-skill"+ link.symlink_to(skill, target_is_directory=True)+ result = CliRunner().invoke(cli, ["tier2", str(link)])+ assert result.exit_code == 2+ assert "symlink" in result.output+++def test_tier2_rejects_catalog_report_collision_before_reading_or_overwriting(skill, tmp_path):+ catalog = tmp_path / "skillevaluator-tier2.json"+ catalog.write_text("keep this source unchanged")+ result = CliRunner().invoke(cli, ["tier2", str(skill), "--catalog", str(catalog), "-o", str(tmp_path)])+ assert result.exit_code == 2+ assert "conflicts" in result.output+ assert catalog.read_text() == "keep this source unchanged"+++def test_full_body_without_catalog_is_rejected(skill):+ result = CliRunner().invoke(cli, ["tier2", str(skill), "--full-body"])+ assert result.exit_code == 2+ assert "--full-body requires --catalog" in result.output+++def test_tier1_invalid_provider_is_not_silently_treated_as_keyless(skill, monkeypatch):+ monkeypatch.setenv("SKILL_EVAL_LLM_PROVIDER", "misspelled-provider")+ result = CliRunner().invoke(cli, ["tier1", str(skill), "--checks", "schema"])+ assert result.exit_code != 0+ assert "provider" in result.output.lower()+ static = CliRunner().invoke(cli, ["tier1", str(skill), "--checks", "schema", "--no-llm", "-r", "cli"])+ assert static.exit_code == 0, static.output+++def test_missing_target_and_unknown_workflow_flag_are_errors(tmp_path):+ for tier in ("tier1", "tier2", "tier3"):+ missing = CliRunner().invoke(cli, [tier, str(tmp_path / "missing")])+ assert missing.exit_code == 2+ assert "does not exist" in missing.output+ bad_flag = CliRunner().invoke(cli, [tier, "--unknown-option"])+ assert bad_flag.exit_code == 2+ assert "No such option" in bad_flag.outputdiff --git a/tests/cli/test_validate_defaults.py b/tests/cli/test_validate_defaults.pynew file mode 100644index 00000000..e6834b64--- /dev/null+++ b/tests/cli/test_validate_defaults.py@@ -0,0 +1,124 @@+# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.+# SPDX-License-Identifier: Apache-2.0++"""The ordinary validation path prepares and runs all three skill tiers."""++import json++import pytest+from click.testing import CliRunner++from skillevaluator import cli as cli_module+from skillevaluator.models.result import ValidationResult+++ ("flags", "expected"),+ [+ ([], ["tier1", "tier2", "dataset", "tier3"]),+ (["--full"], ["tier1", "tier2", "dataset", "tier3"]),+ (["--tier3"], ["tier1", "tier2", "dataset", "tier3"]),+ (["--autopilot"], ["tier1", "tier2", "dataset", "tier3"]),+ (["--tiers", "1,3"], ["tier1", "dataset", "tier3"]),+ (["--tiers", "1,2"], ["tier1", "tier2"]),+ (["--full", "--tiers", "1"], ["tier1"]),+ (["--no-tier2"], ["tier1", "dataset", "tier3"]),+ (["--no-tier3"], ["tier1", "tier2"]),+ (["--no-agent-eval"], ["tier1", "tier2"]),+ (["--full", "--no-tier3"], ["tier1", "tier2"]),+ (["--autopilot", "--no-tier3"], ["tier1", "tier2"]),+ (["--no-autopilot"], ["tier1", "tier2", "tier3"]),+ (["--full", "--no-autopilot"], ["tier1", "tier2", "tier3"]),+ (["--no-tier3", "--tiers", "1,3"], ["tier1", "dataset", "tier3"]),+ ],+)+def test_skill_validate_selects_tiers_and_prepares_dataset(monkeypatch, tmp_path, flags, expected):+ skill = tmp_path / "sample"+ skill.mkdir()+ (skill / "SKILL.md").write_text("---\nname: sample\ndescription: Test skill\n---\n")+ calls = []++ def run(name, path, **kwargs):+ assert path == skill+ calls.append(name)+ result = ValidationResult(validator_name="AGENT_EVAL" if name == "tier3" else name)+ result.add_success(name, "ok")+ return result++ monkeypatch.setattr(cli_module, "run_validation", lambda path, **kw: [run("tier1", path, **kw)])+ monkeypatch.setattr(cli_module, "_run_dedup_or_skip", lambda path: [run("tier2", path)])+ monkeypatch.setattr(cli_module, "_ensure_autopilot_dataset", lambda path, **_kw: run("dataset", path) and None)+ monkeypatch.setattr(cli_module, "_run_agent_eval_or_skip", lambda path, **kw: run("tier3", path, **kw))+ result = CliRunner().invoke(cli_module.cli, ["validate", str(skill), *flags, "-o", str(tmp_path / "reports")])+ assert result.exit_code == 0, result.output+ assert calls == expected+++def test_default_autopilot_receives_skill_directory_for_file_input(monkeypatch, tmp_path):+ from skillevaluator.tier3 import evals_spec++ skill = tmp_path / "file-input"+ skill.mkdir()+ marker = skill / "SKILL.md"+ marker.write_text("---\nname: file-input\ndescription: Test skill\n---\n")+ calls = []+ monkeypatch.setattr(cli_module, "run_validation", lambda *_a, **_kw: [])+ monkeypatch.setattr(cli_module, "_run_dedup_or_skip", lambda *_a, **_kw: [])+ monkeypatch.setattr(cli_module, "_ensure_autopilot_dataset", lambda path, **_kw: calls.append(path))++ def evaluate(path, **kwargs):+ calls.append(path)+ result = ValidationResult(validator_name="AGENT_EVAL")+ result.metadata["agent_eval"] = {"agents": {}}+ return result++ monkeypatch.setattr(cli_module, "_run_agent_eval_or_skip", evaluate)++ def validate_source(path):+ assert path == skill+ return "native_harbor", []++ monkeypatch.setattr(evals_spec, "validate_tier3_source", validate_source)+ result = CliRunner().invoke(+ cli_module.cli, ["validate", str(marker), "-r", "json", "-o", str(tmp_path / "reports")]+ )+ assert result.exit_code == 0, result.output+ assert calls == [skill, skill]+ report = json.loads(next((tmp_path / "reports").glob("*.json")).read_text())+ assert report["tier3_applicability"]["source_kind"] == "native_harbor"++[email protected]("content_type", ["rules", "workflows", "plugin"])+def test_non_skill_default_does_not_generate_or_run_skill_evals(monkeypatch, tmp_path, content_type):+ monkeypatch.setattr(cli_module, "run_validation", lambda *_a, **_kw: [])+ monkeypatch.setattr(cli_module, "_run_dedup_or_skip", lambda *_a, **_kw: [])+ monkeypatch.setattr(+ cli_module, "_ensure_autopilot_dataset", lambda *_a, **_kw: pytest.fail("unexpected generation")+ )+ monkeypatch.setattr(cli_module, "_run_agent_eval_or_skip", lambda *_a, **_kw: pytest.fail("unexpected evaluation"))+ result = CliRunner().invoke(+ cli_module.cli, ["validate", str(tmp_path), "--type", content_type, "-o", str(tmp_path / "reports")]+ )+ assert result.exit_code == 0, result.output+++def test_default_tier3_runs_after_tier1_failure(monkeypatch, tmp_path):+ skill = tmp_path / "failing-skill"+ skill.mkdir()+ (skill / "SKILL.md").write_text("---\nname: failing-skill\ndescription: Test skill\n---\n")+ failed = ValidationResult(validator_name="SCHEMA")+ failed.add_error("metadata.author missing")+ calls = []+ monkeypatch.setattr(cli_module, "run_validation", lambda *_a, **_kw: [failed])+ monkeypatch.setattr(cli_module, "_run_dedup_or_skip", lambda *_a, **_kw: [])+ monkeypatch.setattr(cli_module, "_ensure_autopilot_dataset", lambda *_a, **_kw: calls.append("dataset"))++ def evaluate(*args, **kwargs):+ calls.append("tier3")+ return ValidationResult(validator_name="AGENT_EVAL")++ monkeypatch.setattr(cli_module, "_run_agent_eval_or_skip", evaluate)+ result = CliRunner().invoke(cli_module.cli, ["validate", str(skill), "-o", str(tmp_path / "reports")])+ assert result.exit_code == 1+ assert calls == ["dataset", "tier3"]+ assert list((tmp_path / "reports").glob("*.json"))diff --git a/tests/deduplication/intra_skill/test_intra_skill_validator.py b/tests/deduplication/intra_skill/test_intra_skill_validator.pyindex c3c33914..3afd87fd 100644--- a/tests/deduplication/intra_skill/test_intra_skill_validator.py+++ b/tests/deduplication/intra_skill/test_intra_skill_validator.py@@ -46,7 +46,7 @@ class TestIntraSkillValidatorProperties:monkeypatch.setenv("NVIDIA_API_KEY", "nvapi-test")monkeypatch.delenv("SKILL_EVAL_EMBEDDING_MODEL", raising=False)- assert resolve_embedding_provider().model == "nvidia/nv-embed-v1"+ assert resolve_embedding_provider().model == "nvidia/nemotron-3-embed-1b"class TestIntraSkillValidatorValidate:@@ -169,7 +169,7 @@ class TestIntraSkillValidatorValidate:mock_llm.assert_not_called()@patch("skillevaluator.deduplication.intra_skill.intra_skill_validator.EmbeddingClient")- def test_embedding_error_produces_critical_finding(self, mock_embed, tmp_path: Path) -> None:+ def test_embedding_error_is_incomplete_without_skill_finding(self, mock_embed, tmp_path: Path) -> None:skill_dir = tmp_path / "skill"skill_dir.mkdir()(skill_dir / "SKILL.md").write_text("## Section A\n" + "a" * 200 + "\n## Section B\n" + "b" * 200)@@ -178,8 +178,10 @@ class TestIntraSkillValidatorValidate:v = IntraSkillValidator()result = v.validate(skill_dir)assert result.passed is False- assert any(f.severity == Severity.CRITICAL for f in result.findings)- assert all(f.file_path == skill_dir.name for f in result.findings)+ assert result.status == "incomplete"+ assert result.incomplete_scans == ["embedding-provider"]+ assert result.findings == []+ assert "No API key" in result.errors[0]@patch("skillevaluator.deduplication.intra_skill.intra_skill_validator.LLMClient")@patch("skillevaluator.deduplication.intra_skill.intra_skill_validator.EmbeddingClient")@@ -197,8 +199,9 @@ class TestIntraSkillValidatorValidate:result = IntraSkillValidator().validate(skill_dir)assert result.passed is False- assert result.findings[0].check_name == "embedding_error"- assert result.findings[0].file_path == skill_dir.name+ assert result.status == "incomplete"+ assert result.findings == []+ assert "Embedding provider error" in result.errors[0]mock_llm.assert_not_called()@patch("skillevaluator.deduplication.intra_skill.intra_skill_validator.LLMClient")@@ -233,6 +236,7 @@ class TestIntraSkillValidatorValidate:v = IntraSkillValidator()result = v.validate(skill_dir)assert result.passed is False+ assert result.status == "failed"assert len(result.findings) >= 1assert result.findings[0].category == "DUPLICATE"@@ -359,26 +363,117 @@ class TestIntraSkillValidatorValidate:@patch("skillevaluator.deduplication.intra_skill.intra_skill_validator.analyze_cluster")@patch("skillevaluator.deduplication.intra_skill.intra_skill_validator.LLMClient")@patch("skillevaluator.deduplication.intra_skill.intra_skill_validator.EmbeddingClient")- def test_llm_error_produces_critical_finding(self, mock_embed, _mock_llm, mock_analyze, tmp_path: Path) -> None:+ def test_llm_error_is_incomplete_without_skill_finding(+ self, mock_embed, _mock_llm, mock_analyze, tmp_path: Path, caplog+ ) -> None:skill_dir = tmp_path / "skill"skill_dir.mkdir()(skill_dir / "SKILL.md").write_text("## Section A\n" + "a" * 200 + "\n## Section B\n" + "b" * 200)mock_embed.return_value.embed.return_value = [[1.0, 0.0], [1.0, 0.0]]- mock_analyze.side_effect = LLMClientError("API failed")+ mock_analyze.side_effect = LLMClientError("API failed: private provider data")v = IntraSkillValidator()result = v.validate(skill_dir)assert result.passed is False- assert any(f.severity == Severity.CRITICAL for f in result.findings)- assert any("LLM" in f.message for f in result.findings)- assert all(f.file_path == skill_dir.name for f in result.findings)+ assert result.status == "incomplete"+ assert result.incomplete_scans == ["deduplication-llm"]+ assert result.findings == []+ assert "LLM" in result.errors[0]+ assert "private provider data" not in str(result.errors)+ assert "private provider data" not in caplog.text++ @patch("skillevaluator.deduplication.intra_skill.intra_skill_validator.analyze_cluster")+ @patch("skillevaluator.deduplication.intra_skill.intra_skill_validator.LLMClient")+ @patch("skillevaluator.deduplication.intra_skill.intra_skill_validator.EmbeddingClient")+ def test_partial_llm_failure_preserves_valid_duplicate_finding(+ self, mock_embed, _mock_llm, mock_analyze, tmp_path: Path+ ) -> None:+ skill = tmp_path / "skill"+ skill.mkdir()+ (skill / "SKILL.md").write_text("\n".join(f"## Section {letter}\n{letter.lower() * 200}" for letter in "ABCD"))+ mock_embed.return_value.embed.return_value = [[1.0, 0.0], [1.0, 0.0], [0.0, 1.0], [0.0, 1.0]]++ def analyze(_client, cluster):+ if any("Section A" in member.heading for member in cluster.members):+ return LLMVerdict("DUPLICATE", 0.9, "Same content", "Remove one")+ raise RuntimeError("private provider response")++ mock_analyze.side_effect = analyze+ result = IntraSkillValidator().validate(skill)++ assert result.status == "incomplete"+ assert result.incomplete_scans == ["deduplication-llm"]+ assert len(result.findings) == 1+ assert result.findings[0].category == "DUPLICATE"+ assert result.findings[0].severity == Severity.HIGH+ assert result.summary.critical_count == 0+ assert result.summary.high_count == 1+ assert result.metadata["llm_analysis"]["clusters_completed"] == 1+ assert result.metadata["llm_analysis"]["clusters_failed"] == 1+ assert "1 of 2 content clusters" in result.errors[0]++ @patch("skillevaluator.deduplication.intra_skill.intra_skill_validator.LLMClient")+ @patch("skillevaluator.deduplication.intra_skill.intra_skill_validator.EmbeddingClient")+ def test_llm_initialization_error_preserves_collection_evidence(self, mock_embed, mock_llm, tmp_path: Path) -> None:+ skill = tmp_path / "skill"+ skill.mkdir()+ (skill / "SKILL.md").write_text("## Section A\n" + "a" * 200 + "\n## Section B\n" + "b" * 200)+ mock_embed.return_value.embed.return_value = [[1.0, 0.0], [1.0, 0.0]]+ mock_llm.side_effect = LLMClientError("missing credential")++ result = IntraSkillValidator().validate(skill)++ assert result.status == "incomplete"+ assert result.findings == []+ assert {detail.check_name for detail in result.success_details} == {"file_collection", "chunking"}def test_custom_threshold(self) -> None:v = IntraSkillValidator(threshold=0.95)assert v._threshold == 0.95+ @patch("skillevaluator.deduplication.intra_skill.intra_skill_validator.analyze_cluster")+ @patch("skillevaluator.deduplication.intra_skill.intra_skill_validator.LLMClient")+ @patch("skillevaluator.deduplication.intra_skill.intra_skill_validator.EmbeddingClient")+ def test_distinct_cluster_errors_are_grouped_in_deterministic_order(+ self, mock_embed, _mock_llm, mock_analyze, tmp_path: Path+ ) -> None:+ skill = tmp_path / "skill"+ skill.mkdir()+ (skill / "SKILL.md").write_text(+ "\n".join(f"## Section {letter}\n{letter.lower() * 200}" for letter in "ABCDEF")+ )+ mock_embed.return_value.embed.return_value = [+ [1.0, 0.0, 0.0],+ [1.0, 0.0, 0.0],+ [0.0, 1.0, 0.0],+ [0.0, 1.0, 0.0],+ [0.0, 0.0, 1.0],+ [0.0, 0.0, 1.0],+ ]++ class ServiceError(Exception):+ def __init__(self, status):+ self.status_code = status+ super().__init__("private provider response")++ def analyze(_client, cluster):+ raise ServiceError(429 if any("Section A" in member.heading for member in cluster.members) else 400)++ mock_analyze.side_effect = analyze+ result = IntraSkillValidator().validate(skill)++ assert result.status == "incomplete"+ assert len(result.errors) == 1+ assert "3 of 3 content clusters" in result.errors[0]+ failures = result.metadata["llm_analysis"]["failures"]+ assert [failure["count"] for failure in failures] == [2, 1]+ assert failures[0]["diagnostic"].startswith("HTTP 400")+ assert failures[1]["diagnostic"].startswith("HTTP 429")+ assert result.errors[0].index("HTTP 400") < result.errors[0].index("HTTP 429")+ assert "private provider response" not in result.errors[0]+def test_custom_models(self) -> None:v = IntraSkillValidator(embedding_model="custom/embed", llm_model="custom/llm")assert v._embedding_model == "custom/embed"diff --git a/tests/embedding/test_client.py b/tests/embedding/test_client.pyindex f2fa49ca..fa9ee46a 100644--- a/tests/embedding/test_client.py+++ b/tests/embedding/test_client.py@@ -90,11 +90,85 @@ class TestEmbed:assert result == expectedmock_openai.embeddings.create.assert_called_once_with(- model="nvidia/nv-embed-v1",+ model="nvidia/nemotron-3-embed-1b",input=["hello", "world"],encoding_format="float",+ extra_body={"input_type": "passage"},)+ @pytest.mark.parametrize("model", ["text-embedding-3-small", "custom-embedding-model"])+ def test_other_models_keep_standard_openai_request(self, model: str) -> None:+ client = EmbeddingClient(model=model, api_key="test-key", base_url="http://127.0.0.1:12345/v1")+ sdk = MagicMock()+ sdk.embeddings.create.return_value = _make_fake_response([[1.0, 0.0]])+ client._client = sdk++ assert client.embed(["text"]) == [[1.0, 0.0]]+ sdk.embeddings.create.assert_called_once_with(model=model, input=["text"], encoding_format="float")++ @pytest.mark.parametrize("model", [None, "publisher/nvidia/nemotron-3-embed-1b"])+ def test_nvidia_default_at_explicit_endpoint_includes_passage_type(self, model) -> None:+ client = EmbeddingClient(model=model, api_key="test-key", base_url="http://127.0.0.1:12345/v1")+ sdk = MagicMock()+ sdk.embeddings.create.return_value = _make_fake_response([[1.0, 0.0]])+ client._client = sdk++ client.embed(["text"])++ assert sdk.embeddings.create.call_args.kwargs["model"] == (model or "nvidia/nemotron-3-embed-1b")+ assert sdk.embeddings.create.call_args.kwargs["extra_body"] == {"input_type": "passage"}++ @pytest.mark.parametrize("status", [400, 401, 403, 404, 410, 429, 500])+ def test_service_error_is_actionable_without_echoing_response(self, status: int) -> None:+ import httpx+ from openai import APIStatusError++ client = EmbeddingClient(model="test-model", api_key="test-key", base_url="http://127.0.0.1:12345/v1")+ sdk = MagicMock()+ request = httpx.Request("POST", "http://127.0.0.1:12345/v1/embeddings?secret-marker")+ response = httpx.Response(status, request=request, json={"detail": "secret-marker"})+ sdk.embeddings.create.side_effect = APIStatusError(+ "secret-marker", response=response, body={"secret-marker": True}+ )+ client._client = sdk++ with pytest.raises(SimilarityConfigError) as error:+ client.embed(["private input text"])++ assert f"HTTP {status}" in str(error.value)+ assert "secret-marker" not in str(error.value)+ assert "private input text" not in str(error.value)+ if status in {404, 410}:+ assert "SKILL_EVAL_EMBEDDING_MODEL" in str(error.value)++ def test_connection_error_does_not_echo_endpoint_credentials(self) -> None:+ import httpx+ from openai import APIConnectionError++ client = EmbeddingClient(model="test-model", api_key="test-key", base_url="http://127.0.0.1:12345/v1")+ sdk = MagicMock()+ request = httpx.Request("POST", "http://127.0.0.1:12345/v1/embeddings?secret-marker")+ sdk.embeddings.create.side_effect = APIConnectionError(message="secret-marker", request=request)+ client._client = sdk++ with pytest.raises(SimilarityConfigError, match="connection") as error:+ client.embed(["private input text"])++ assert "secret-marker" not in str(error.value)++ def test_invalid_response_index_does_not_echo_provider_content(self) -> None:+ client = EmbeddingClient(model="test-model", api_key="test-key", base_url="http://127.0.0.1:12345/v1")+ sdk = MagicMock()+ sdk.embeddings.create.return_value = _FakeEmbeddingResponse(+ data=[_FakeEmbeddingItem(embedding=[1.0, 0.0], index="private-input-marker")]+ )+ client._client = sdk++ with pytest.raises(SimilarityConfigError, match="index") as error:+ client.embed(["text"])++ assert "private-input-marker" not in str(error.value)+def test_embed_reorders_out_of_order_provider_response_by_index(self, monkeypatch: pytest.MonkeyPatch) -> None:monkeypatch.setenv("NVIDIA_API_KEY", "test-key")client = EmbeddingClient()diff --git a/tests/golden/_cli_surface.py b/tests/golden/_cli_surface.pyindex 44b338ac..c1ddb6d4 100644--- a/tests/golden/_cli_surface.py+++ b/tests/golden/_cli_surface.py@@ -49,6 +49,9 @@ def _command_to_dict(command: click.Command) -> dict[str, Any]:}if isinstance(command, click.Group):data["commands"] = {name: _command_to_dict(command.commands[name]) for name in sorted(command.commands)}+ workflow = getattr(command, "workflow", None)+ if workflow is not None:+ data["workflow"] = _command_to_dict(workflow)return datadiff --git a/tests/golden/cli_surface.json b/tests/golden/cli_surface.jsonindex 2dfa9efe..c1a2b70d 100644--- a/tests/golden/cli_surface.json+++ b/tests/golden/cli_surface.json@@ -241,7 +241,6 @@"doctor": {"params": [{- "default": "codex","name": "agents","opts": ["--agents",@@ -309,7 +308,6 @@"type": "path"},{- "default": "codex","name": "agents","opts": ["--agents",@@ -596,7 +594,6 @@"health-check": {"params": [{- "default": "codex","name": "agents","opts": ["--agents",@@ -1400,118 +1397,32 @@"validate": {"params": [{- "name": "target_path",+ "name": "skill_path","opts": [- "target_path"+ "skill_path"],"param_type": "argument","required": true,- "type": "path"- },- {- "choices": [- "skill",- "rules",- "workflows",- "plugin",- "auto"- ],- "default": "auto",- "name": "content_type",- "opts": [- "--type"- ],- "param_type": "option"- },- {- "name": "tiers",- "opts": [- "--tiers"- ],- "param_type": "option",- "type": "text"- },- {- "default": "False",- "is_flag": true,- "name": "full",- "opts": [- "--full"- ],- "param_type": "option",- "type": "boolean"- },- {- "default": "False",- "is_flag": true,- "name": "verbose",- "opts": [- "--verbose"- ],- "param_type": "option",- "type": "boolean"+ "type": "directory"},{"name": "checks","opts": [- "--checks",- "--tier1-checks"+ "--checks"],"param_type": "option","type": "text"},{- "name": "previous_version",- "opts": [- "--previous-version"- ],- "param_type": "option",- "type": "text"- },- {- "default": "False",- "is_flag": true,- "name": "fail_fast",- "opts": [- "--fail-fast"- ],- "param_type": "option",- "type": "boolean"- },- {- "default": "False",- "is_flag": true,- "name": "continue_on_failure",- "opts": [- "--continue-on-failure",- "-c"- ],- "param_type": "option",- "type": "boolean"- },- {- "default": "False","is_flag": true,"name": "llm","opts": [- "--llm",- "--tier1-llm"+ "--llm"],"param_type": "option","secondary_opts": [- "--no-llm",- "--no-tier1-llm"- ],- "type": "boolean"- },- {- "default": "False",- "is_flag": true,- "name": "llm_verify",- "opts": [- "--llm-verify"+ "--no-llm"],- "param_type": "option","type": "boolean"},{@@ -1521,7 +1432,7 @@"--min-score"],"param_type": "option",- "type": "integer"+ "type": "integer range"},{"name": "profile",@@ -1532,276 +1443,9 @@"type": "text"},{- "default": "False",- "is_flag": true,- "name": "external",- "opts": [- "--external"- ],- "param_type": "option",- "type": "boolean"- },- {- "name": "policy_path",- "opts": [- "--policy"- ],- "param_type": "option",- "type": "file"- },- {- "default": "1",- "name": "workers",- "opts": [- "--workers"- ],- "param_type": "option",- "type": "integer range"- },- {- "default": "True",- "is_flag": true,- "name": "dedup",- "opts": [- "--dedup",- "--tier2"- ],- "param_type": "option",- "secondary_opts": [- "--no-dedup",- "--no-tier2"- ],- "type": "boolean"- },- {- "is_flag": true,- "name": "block_on_dedup",- "opts": [- "--block-on-dedup"- ],- "param_type": "option",- "secondary_opts": [- "--no-block-on-dedup"- ],- "type": "boolean"- },- {- "default": "False",- "is_flag": true,- "name": "agent_eval",- "opts": [- "--agent-eval",- "--tier3"- ],- "param_type": "option",- "type": "boolean"- },- {- "is_flag": true,- "name": "block_on_agent_eval",- "opts": [- "--block-on-agent-eval"- ],- "param_type": "option",- "secondary_opts": [- "--no-block-on-agent-eval"- ],- "type": "boolean"- },- {- "default": "False",- "is_flag": true,- "name": "autopilot",- "opts": [- "--autopilot"- ],- "param_type": "option",- "type": "boolean"- },- {- "default": "codex",- "name": "agents",- "opts": [- "--agents",- "-a"- ],- "param_type": "option",- "type": "text"- },- {- "choices": [- "docker",- "daytona",- "e2b",- "modal",- "runloop",- "langsmith",- "gke",- "novita",- "apple-container",- "singularity",- "islo",- "tensorlake",- "cwsandbox",- "wandb",- "use-computer",- "local"- ],- "default": "docker",- "name": "env_mode",- "opts": [- "--env-mode"- ],- "param_type": "option"- },- {- "default": "False",- "is_flag": true,- "name": "skip_baseline",- "opts": [- "--skip-baseline"- ],- "param_type": "option",- "type": "boolean"- },- {- "name": "n_concurrent",- "opts": [- "--n-concurrent"- ],- "param_type": "option",- "type": "integer"- },- {- "name": "max_agents",- "opts": [- "--max-agents"- ],- "param_type": "option",- "type": "integer"- },- {- "name": "n_attempts",- "opts": [- "--n-attempts"- ],- "param_type": "option",- "type": "integer"- },- {- "name": "pass_threshold",- "opts": [- "--pass-threshold"- ],- "param_type": "option",- "type": "float"- },- {- "is_flag": true,- "name": "stop_on_pass",- "opts": [- "--stop-on-pass"- ],- "param_type": "option",- "secondary_opts": [- "--no-stop-on-pass"- ],- "type": "boolean"- },- {- "name": "model",- "opts": [- "--model"- ],- "param_type": "option",- "type": "text"- },- {- "multiple": true,- "name": "agent_model",- "opts": [- "--agent-model"- ],- "param_type": "option",- "type": "text"- },- {- "choices": [- "default",- "default_plus_custom",- "custom_only"- ],- "name": "grading_mode",- "opts": [- "--grading-mode"- ],- "param_type": "option"- },- {- "name": "results_dir",- "opts": [- "--results-dir"- ],- "param_type": "option",- "type": "directory"- },- {- "multiple": true,- "name": "include_skills",- "opts": [- "--include-skills"- ],- "param_type": "option",- "type": "path"- },- {- "default": "False",- "is_flag": true,- "name": "copy_repo",- "opts": [- "--copy-repo"- ],- "param_type": "option",- "type": "boolean"- },- {- "name": "timeout_multiplier",- "opts": [- "--timeout-multiplier"- ],- "param_type": "option",- "type": "float"- },- {- "default": "False",- "is_flag": true,- "name": "harbor_keep_jobs",- "opts": [- "--harbor-keep-jobs"- ],- "param_type": "option",- "type": "boolean"- },- {- "name": "evaluated_source_repository",- "opts": [- "--evaluated-source-repository"- ],- "param_type": "option",- "type": "text"- },- {- "name": "evaluated_source_revision",- "opts": [- "--evaluated-source-revision"- ],- "param_type": "option",- "type": "text"- },- {- "name": "evaluator_container_revision",+ "name": "previous_version","opts": [- "--evaluator-container-revision"+ "--previous-version"],"param_type": "option","type": "text"@@ -1814,7 +1458,7 @@"markdown","sarif"],- "default": "('cli',)",+ "default": "('cli', 'json', 'html')","multiple": true,"name": "report_formats","opts": [@@ -1836,7 +1480,92 @@]}},- "params": []+ "params": [],+ "workflow": {+ "params": [+ {+ "name": "skill_path",+ "opts": [+ "skill_path"+ ],+ "param_type": "argument",+ "required": true,+ "type": "directory"+ },+ {+ "name": "checks",+ "opts": [+ "--checks"+ ],+ "param_type": "option",+ "type": "text"+ },+ {+ "is_flag": true,+ "name": "llm",+ "opts": [+ "--llm"+ ],+ "param_type": "option",+ "secondary_opts": [+ "--no-llm"+ ],+ "type": "boolean"+ },+ {+ "default": "70",+ "name": "min_score",+ "opts": [+ "--min-score"+ ],+ "param_type": "option",+ "type": "integer range"+ },+ {+ "name": "profile",+ "opts": [+ "--profile"+ ],+ "param_type": "option",+ "type": "text"+ },+ {+ "name": "previous_version",+ "opts": [+ "--previous-version"+ ],+ "param_type": "option",+ "type": "text"+ },+ {+ "choices": [+ "cli",+ "json",+ "html",+ "markdown",+ "sarif"+ ],+ "default": "('cli', 'json', 'html')",+ "multiple": true,+ "name": "report_formats",+ "opts": [+ "--report",+ "-r"+ ],+ "param_type": "option"+ },+ {+ "default": "reports",+ "name": "output_dir",+ "opts": [+ "--output-dir",+ "-o"+ ],+ "param_type": "option",+ "type": "directory"+ }+ ]+ }},"tier2": {"commands": {@@ -2084,7 +1813,83 @@]}},- "params": []+ "params": [],+ "workflow": {+ "params": [+ {+ "name": "skill_path",+ "opts": [+ "skill_path"+ ],+ "param_type": "argument",+ "required": true,+ "type": "directory"+ },+ {+ "name": "catalog",+ "opts": [+ "--catalog"+ ],+ "param_type": "option",+ "type": "file"+ },+ {+ "default": "0.8",+ "name": "threshold",+ "opts": [+ "--threshold"+ ],+ "param_type": "option",+ "type": "float"+ },+ {+ "default": "0.75",+ "name": "similarity_threshold",+ "opts": [+ "--similarity-threshold"+ ],+ "param_type": "option",+ "type": "float"+ },+ {+ "default": "False",+ "is_flag": true,+ "name": "full_body",+ "opts": [+ "--full-body"+ ],+ "param_type": "option",+ "type": "boolean"+ },+ {+ "choices": [+ "cli",+ "json",+ "html",+ "markdown",+ "sarif"+ ],+ "default": "('cli', 'json', 'html')",+ "multiple": true,+ "name": "report_formats",+ "opts": [+ "--report",+ "-r"+ ],+ "param_type": "option"+ },+ {+ "default": "reports",+ "name": "output_dir",+ "opts": [+ "--output-dir",+ "-o"+ ],+ "param_type": "option",+ "type": "directory"+ }+ ]+ }},"tier3": {"commands": {@@ -2199,7 +2004,6 @@"doctor": {"params": [{- "default": "codex","name": "agents","opts": ["--agents",@@ -2267,7 +2071,6 @@"type": "path"},{- "default": "codex","name": "agents","opts": ["--agents",@@ -2740,7 +2543,289 @@]}},- "params": []+ "params": [],+ "workflow": {+ "params": [+ {+ "name": "skill_path",+ "opts": [+ "skill_path"+ ],+ "param_type": "argument",+ "required": true,+ "type": "path"+ },+ {+ "name": "agents",+ "opts": [+ "--agents",+ "-a"+ ],+ "param_type": "option",+ "type": "text"+ },+ {+ "choices": [+ "docker",+ "daytona",+ "e2b",+ "modal",+ "runloop",+ "langsmith",+ "gke",+ "novita",+ "apple-container",+ "singularity",+ "islo",+ "tensorlake",+ "cwsandbox",+ "wandb",+ "use-computer",+ "local"+ ],+ "default": "docker",+ "name": "env_mode",+ "opts": [+ "--env-mode"+ ],+ "param_type": "option"+ },+ {+ "default": "False",+ "is_flag": true,+ "name": "autopilot",+ "opts": [+ "--autopilot"+ ],+ "param_type": "option",+ "type": "boolean"+ },+ {+ "default": "False",+ "is_flag": true,+ "name": "skip_baseline",+ "opts": [+ "--skip-baseline"+ ],+ "param_type": "option",+ "type": "boolean"+ },+ {+ "name": "n_attempts",+ "opts": [+ "--n-attempts"+ ],+ "param_type": "option",+ "type": "integer"+ },+ {+ "name": "pass_threshold",+ "opts": [+ "--pass-threshold"+ ],+ "param_type": "option",+ "type": "float"+ },+ {+ "is_flag": true,+ "name": "stop_on_pass",+ "opts": [+ "--stop-on-pass"+ ],+ "param_type": "option",+ "secondary_opts": [+ "--no-stop-on-pass"+ ],+ "type": "boolean"+ },+ {+ "name": "n_concurrent",+ "opts": [+ "--n-concurrent"+ ],+ "param_type": "option",+ "type": "integer"+ },+ {+ "name": "max_agents",+ "opts": [+ "--max-agents"+ ],+ "param_type": "option",+ "type": "integer"+ },+ {+ "name": "model",+ "opts": [+ "--model"+ ],+ "param_type": "option",+ "type": "text"+ },+ {+ "multiple": true,+ "name": "agent_model",+ "opts": [+ "--agent-model"+ ],+ "param_type": "option",+ "type": "text"+ },+ {+ "choices": [+ "preserve",+ "rebase"+ ],+ "name": "custom_dockerfile_mode",+ "opts": [+ "--custom-dockerfile-mode"+ ],+ "param_type": "option"+ },+ {+ "choices": [+ "isolated",+ "group"+ ],+ "name": "skill_workspace_mode",+ "opts": [+ "--skill-workspace-mode"+ ],+ "param_type": "option"+ },+ {+ "multiple": true,+ "name": "include_skills",+ "opts": [+ "--include-skills"+ ],+ "param_type": "option",+ "type": "path"+ },+ {+ "default": "False",+ "is_flag": true,+ "name": "copy_repo",+ "opts": [+ "--copy-repo"+ ],+ "param_type": "option",+ "type": "boolean"+ },+ {+ "choices": [+ "default",+ "default_plus_custom",+ "custom_only"+ ],+ "name": "grading_mode",+ "opts": [+ "--grading-mode"+ ],+ "param_type": "option"+ },+ {+ "name": "results_dir",+ "opts": [+ "--results-dir"+ ],+ "param_type": "option",+ "type": "directory"+ },+ {+ "default": "False",+ "is_flag": true,+ "name": "harbor_keep_jobs",+ "opts": [+ "--harbor-keep-jobs"+ ],+ "param_type": "option",+ "type": "boolean"+ },+ {+ "is_flag": true,+ "name": "agent_runtime_preflight",+ "opts": [+ "--agent-runtime-preflight"+ ],+ "param_type": "option",+ "secondary_opts": [+ "--no-agent-runtime-preflight"+ ],+ "type": "boolean"+ },+ {+ "name": "timeout_multiplier",+ "opts": [+ "--timeout-multiplier"+ ],+ "param_type": "option",+ "type": "float"+ },+ {+ "name": "override_cpus",+ "opts": [+ "--override-cpus"+ ],+ "param_type": "option",+ "type": "integer"+ },+ {+ "name": "override_memory_mb",+ "opts": [+ "--override-memory-mb"+ ],+ "param_type": "option",+ "type": "integer"+ },+ {+ "name": "override_storage_mb",+ "opts": [+ "--override-storage-mb"+ ],+ "param_type": "option",+ "type": "integer"+ },+ {+ "name": "evaluated_source_repository",+ "opts": [+ "--evaluated-source-repository"+ ],+ "param_type": "option",+ "type": "text"+ },+ {+ "name": "evaluated_source_revision",+ "opts": [+ "--evaluated-source-revision"+ ],+ "param_type": "option",+ "type": "text"+ },+ {+ "name": "evaluator_container_revision",+ "opts": [+ "--evaluator-container-revision"+ ],+ "param_type": "option",+ "type": "text"+ },+ {+ "choices": [+ "auto",+ "rich",+ "plain",+ "off"+ ],+ "default": "auto",+ "name": "progress",+ "opts": [+ "--progress"+ ],+ "param_type": "option"+ }+ ]+ }},"validate": {"params": [@@ -2931,7 +3016,6 @@"type": "boolean"},{- "default": "False","is_flag": true,"name": "agent_eval","opts": [@@ -2939,6 +3023,10 @@"--tier3"],"param_type": "option",+ "secondary_opts": [+ "--no-agent-eval",+ "--no-tier3"+ ],"type": "boolean"},{@@ -2954,17 +3042,18 @@"type": "boolean"},{- "default": "False","is_flag": true,"name": "autopilot","opts": ["--autopilot"],"param_type": "option",+ "secondary_opts": [+ "--no-autopilot"+ ],"type": "boolean"},{- "default": "codex","name": "agents","opts": ["--agents",@@ -3127,6 +3216,18 @@"param_type": "option","type": "boolean"},+ {+ "is_flag": true,+ "name": "agent_runtime_preflight",+ "opts": [+ "--agent-runtime-preflight"+ ],+ "param_type": "option",+ "secondary_opts": [+ "--no-agent-runtime-preflight"+ ],+ "type": "boolean"+ },{"name": "evaluated_source_repository","opts": [diff --git a/tests/golden/test_policy_behavior.py b/tests/golden/test_policy_behavior.pyindex ae91193c..8f37e85a 100644--- a/tests/golden/test_policy_behavior.py+++ b/tests/golden/test_policy_behavior.py@@ -41,7 +41,7 @@ def _write_skill(root: Path, name: str, author_line: str | None) -> Path:def _validate(skill: Path, out: Path, *args: str) -> int:result = CliRunner().invoke(cli,- ["validate", str(skill), "--no-llm", "--checks", "schema", "-o", str(out), *args],+ ["validate", str(skill), "--tiers", "1", "--no-llm", "--checks", "schema", "-o", str(out), *args],)return result.exit_codediff --git a/tests/inference/test_diagnostics.py b/tests/inference/test_diagnostics.pynew file mode 100644index 00000000..df3b30e3--- /dev/null+++ b/tests/inference/test_diagnostics.py@@ -0,0 +1,95 @@+# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.+# SPDX-License-Identifier: Apache-2.0++"""Provider diagnostics expose actionable protocol fields, never raw data."""++import json++import httpx+import pytest+from openai import APIConnectionError, APIStatusError, APITimeoutError++from skillevaluator.inference import LLMClientError+from skillevaluator.inference.diagnostics import llm_failure_diagnostic, safe_llm_labels++[email protected]("status", [400, 401, 403, 404, 410, 422, 429, 500])+def test_http_status_without_echoing_response_or_request(status):+ request = httpx.Request("POST", "https://[email protected]/v1/chat/completions")+ response = httpx.Response(status, request=request)+ exception = APIStatusError(+ "message-private-token",+ response=response,+ body={"error": {"message": "body-private-token", "code": "model_not_found", "param": "model"}},+ )+ diagnostic = llm_failure_diagnostic(exception)+ assert f"HTTP {status}" in diagnostic+ assert "code=model_not_found" in diagnostic+ assert "param=model" in diagnostic+ assert "private-token" not in diagnostic+ assert "example.invalid" not in diagnostic+++ "body",+ [+ None,+ [],+ "private-token",+ {"error": "private-token"},+ {"error": {"code": "private-token", "param": "private-token", "type": "private-token"}},+ {"error": {"code": [], "param": {}, "type": ["invalid_request_error"]}},+ ],+)+def test_unknown_or_malformed_provider_fields_are_not_echoed(body):+ request = httpx.Request("POST", "https://example.invalid")+ exception = APIStatusError("private-token", response=httpx.Response(400, request=request), body=body)+ diagnostic = llm_failure_diagnostic(exception)+ assert "HTTP 400" in diagnostic+ assert "private-token" not in diagnostic+ assert "code=" not in diagnostic+ assert "param=" not in diagnostic+ assert "type=" not in diagnostic+++ "exception, expected",+ [+ (APIConnectionError(request=httpx.Request("POST", "https://[email protected]")), "connection"),+ (APITimeoutError(request=httpx.Request("POST", "https://[email protected]")), "timed out"),+ (LLMClientError("LLM returned invalid JSON: Raw: private-token"), "structured-output"),+ (json.JSONDecodeError("private-token", "private-token", 0), "structured-output"),+ (ValueError("private-token"), "structured-output"),+ (RuntimeError("private-token"), "Unexpected"),+ ],+)+def test_transport_and_response_errors_do_not_echo_raw_content(exception, expected):+ diagnostic = llm_failure_diagnostic(exception)+ assert expected in diagnostic+ assert "private-token" not in diagnostic+++ "model",+ [+ "https://[email protected]",+ "secret\nnew line",+ "sk-secret",+ "nvapi-secret",+ "m" * 161,+ None,+ ],+)+def test_model_labels_reject_urls_tokens_and_control_text(model):+ assert safe_llm_labels("nv_build", model) == ("nv_build", "unresolved")+++def test_model_labels_preserve_real_model_ids_and_bound_unknown_provider():+ assert safe_llm_labels("nv_build", "nvidia/nemotron-3.5-lightning-30b-a3b") == (+ "nv_build",+ "nvidia/nemotron-3.5-lightning-30b-a3b",+ )+ assert safe_llm_labels("private-token", "anthropic.claude-model-v1:0") == (+ "unresolved",+ "anthropic.claude-model-v1:0",+ )diff --git a/tests/inference/test_llm_client.py b/tests/inference/test_llm_client.pyindex 64356424..f5df8665 100644--- a/tests/inference/test_llm_client.py+++ b/tests/inference/test_llm_client.py@@ -54,7 +54,7 @@ class TestLLMClientInit:client = LLMClient()- assert client.model == "nvidia/nemotron-3-nano-30b-a3b"+ assert client.model == "nvidia/nemotron-3-super-120b-a12b"assert client._client is Nonedef test_custom_params(self) -> None:@@ -407,7 +407,8 @@ class TestCompletions:mock_openai.chat.completions.create.assert_called_once()call_kwargs = mock_openai.chat.completions.create.call_args.kwargs- assert call_kwargs["model"] == "nvidia/nemotron-3-nano-30b-a3b"+ assert call_kwargs["model"] == "nvidia/nemotron-3-super-120b-a12b"+ assert call_kwargs["stream"] is Falseassert call_kwargs["max_tokens"] == 512assert call_kwargs["temperature"] == 0.0assert "max_completion_tokens" not in call_kwargsdiff --git a/tests/reporting/test_mixed_execution_errors.py b/tests/reporting/test_mixed_execution_errors.pynew file mode 100644index 00000000..c4d45960--- /dev/null+++ b/tests/reporting/test_mixed_execution_errors.py@@ -0,0 +1,180 @@+# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.+# SPDX-License-Identifier: Apache-2.0++"""Execution diagnostics remain visible alongside genuine content findings."""++from __future__ import annotations++import json+import threading+from dataclasses import asdict+from html.parser import HTMLParser+from http.server import BaseHTTPRequestHandler, ThreadingHTTPServer+from pathlib import Path++import pytest+from click.testing import CliRunner++from skillevaluator.cli import cli+from skillevaluator.models import Finding, Severity, ValidationResult+++class _VisibleHTMLText(HTMLParser):+ """Exclude diagnostics present only in the report's embedded JSON."""++ def __init__(self) -> None:+ super().__init__()+ self.hidden = 0+ self.parts: list[str] = []++ def handle_starttag(self, tag, _attrs) -> None:+ if tag in {"script", "style"}:+ self.hidden += 1++ def handle_endtag(self, tag) -> None:+ if tag in {"script", "style"}:+ self.hidden -= 1++ def handle_data(self, data) -> None:+ if not self.hidden:+ self.parts.append(data)++[email protected]("outcome", ["mixed", "errors_only", "finding_only"])+def test_tier2_cli_reports_preserve_analysis_errors_with_findings(tmp_path: Path, monkeypatch, outcome: str) -> None:+ """Exercise collection, clustering, SDK requests and all reports over loopback HTTP."""+ requests: list[str] = []++ class AnalysisHandler(BaseHTTPRequestHandler):+ def do_POST(self):+ body = json.loads(self.rfile.read(int(self.headers["Content-Length"])))+ requests.append(self.path)+ if self.path == "/v1/embeddings":+ payload = {+ "data": [+ {"index": index, "embedding": [float(index // 2 == dimension) for dimension in range(2)]}+ for index in range(len(body["input"]))+ ]+ }+ elif self.path == "/v1/chat/completions":+ first_cluster = "Section A" in body["messages"][-1]["content"]+ verdict = "DUPLICATE" if first_cluster else "RELATED_BUT_DISTINCT"+ if outcome == "errors_only" or (outcome == "mixed" and not first_cluster):+ verdict = "INVALID"+ payload = {+ "id": "local-completion",+ "object": "chat.completion",+ "created": 0,+ "model": body["model"],+ "choices": [+ {+ "index": 0,+ "finish_reason": "stop",+ "message": {+ "role": "assistant",+ "content": json.dumps(+ {+ "verdict": verdict,+ "confidence": 0.9,+ "reasoning": "Repeated instructions",+ "suggestion": "Consolidate the repeated sections",+ }+ ),+ },+ }+ ],+ }+ else:+ self.send_error(404)+ return+ response = json.dumps(payload).encode()+ self.send_response(200)+ self.send_header("Content-Type", "application/json")+ self.send_header("Content-Length", str(len(response)))+ self.end_headers()+ self.wfile.write(response)++ def log_message(self, _format, *_args):+ pass++ server = ThreadingHTTPServer(("127.0.0.1", 0), AnalysisHandler)+ thread = threading.Thread(target=server.serve_forever, daemon=True)+ thread.start()+ skill = tmp_path / "skill"+ skill.mkdir()+ (skill / "SKILL.md").write_text(+ "\n".join(f"## Section {letter}\n{letter.lower() * 200}" for letter in "ABCD"), encoding="utf-8"+ )+ reports = tmp_path / "reports"+ for purpose in ("LLM", "EMBEDDING"):+ monkeypatch.setenv(f"SKILL_EVAL_{purpose}_PROVIDER", "openai-compatible")+ monkeypatch.setenv(f"SKILL_EVAL_{purpose}_BASE_URL", f"http://127.0.0.1:{server.server_port}/v1")+ monkeypatch.setenv(f"SKILL_EVAL_{purpose}_API_KEY", "local-test-key")+ monkeypatch.setenv(f"SKILL_EVAL_{purpose}_MODEL", "local-test-model")+ try:+ invocation = CliRunner().invoke(cli, ["tier2", str(skill), "-r", "cli,json,html,markdown", "-o", str(reports)])+ finally:+ server.shutdown()+ server.server_close()+ thread.join(timeout=5)++ assert invocation.exit_code == 1, invocation.output+ assert requests.count("/v1/embeddings") == 1+ assert requests.count("/v1/chat/completions") == 2+ payload = json.loads((reports / "skillevaluator-tier2.json").read_text(encoding="utf-8"))+ result = payload["results"][0]+ failed_clusters = {"mixed": 1, "errors_only": 2, "finding_only": 0}[outcome]+ assert result["status"] == ("incomplete" if failed_clusters else "failed")+ assert result["llm_analysis"]["clusters_total"] == 2+ assert result["llm_analysis"]["clusters_failed"] == failed_clusters+ assert result["llm_analysis"]["clusters_completed"] == 2 - failed_clusters+ # Provider failures remain execution evidence rather than duplicate findings.+ assert [finding["check_name"] for finding in result["findings"]] == (+ [] if outcome == "errors_only" else ["duplicate"]+ )++ html = _VisibleHTMLText()+ html.feed((reports / "skillevaluator-tier2.html").read_text(encoding="utf-8"))+ # Earlier logger output must not mask omissions from the actual CLI report.+ marker = "SkillEvaluator Validation Results"+ assert marker in invocation.output+ outputs = {+ "cli": invocation.output[invocation.output.index(marker) :],+ "html": " ".join(html.parts),+ "markdown": (reports / "skillevaluator-tier2.md").read_text(encoding="utf-8"),+ }+ outputs = {name: " ".join(text.split()) for name, text in outputs.items()}+ diagnostic = "LLM analysis did not complete"+ expected_diagnostics = int(failed_clusters > 0)+ assert {name: text.count(diagnostic) for name, text in outputs.items()} == dict.fromkeys(+ outputs, expected_diagnostics+ )+ if failed_clusters:+ for text in outputs.values():+ assert f"{failed_clusters} of 2 content clusters" in text+ assert "structured-output support" in text+ duplicate_message = "Duplicate content found within SKILL.md:"+ # Markdown intentionally repeats the finding in its table and details.+ expected_findings = {"cli": 1, "html": 1, "markdown": 2}+ assert {name: text.count(duplicate_message) for name, text in outputs.items()} == {+ name: count if outcome != "errors_only" else 0 for name, count in expected_findings.items()+ }++[email protected]("prefixed", [False, True])+def test_additional_errors_excludes_only_existing_finding_messages_without_mutation(prefixed: bool) -> None:+ from skillevaluator.reporting.base import additional_errors++ result = ValidationResult(validator_name="Context Deduplication")+ result.add_finding(Finding("DUPLICATE", Severity.HIGH, "duplicate", "Repeated instructions", "SKILL.md"))+ diagnostic = "LLM analysis failed while reviewing Repeated instructions"+ result.add_error(diagnostic)+ if prefixed:+ merged = ValidationResult(validator_name="Context Deduplication")+ merged.merge_with_prefix(result, "sample-skill")+ result = merged+ diagnostic = f"[sample-skill] {diagnostic}"+ before = asdict(result)++ assert additional_errors(result) == [diagnostic]+ assert asdict(result) == beforediff --git a/tests/reporting/test_reporters.py b/tests/reporting/test_reporters.pyindex 4e5c7600..6dc8cfea 100644--- a/tests/reporting/test_reporters.py+++ b/tests/reporting/test_reporters.py@@ -423,6 +423,27 @@ class TestJSONReporter:# Compact JSON should not have newlines (except in strings)assert output.count("\n") == 0+ def test_tier2_analysis_diagnostics_are_exported_without_unrelated_metadata(self) -> None:+ result = ValidationResult(validator_name="Context Deduplication")+ result.mark_scan_incomplete("deduplication-llm")+ result.metadata["llm_analysis"] = {+ "provider": "nv_build",+ "model": "nvidia/test-model",+ "clusters_total": 6,+ "clusters_completed": 1,+ "clusters_failed": 5,+ "failures": [{"count": 5, "diagnostic": "HTTP 410: Model unavailable."}],+ }+ result.metadata["private_provider_context"] = "private-token"+ reporter = JSONReporter(include_timestamp=False)++ for text in (reporter.render(result), reporter.render_all([result])):+ data = json.loads(text)+ actual = data["results"][0] if "results" in data else data+ assert actual["status"] == "incomplete"+ assert actual["llm_analysis"] == result.metadata["llm_analysis"]+ assert "private-token" not in text+def test_name_property(self) -> None:"""Test reporter name."""reporter = JSONReporter()diff --git a/tests/test_base_install.py b/tests/test_base_install.pyindex 73c7ec9c..95c4adef 100644--- a/tests/test_base_install.py+++ b/tests/test_base_install.py@@ -56,10 +56,19 @@ assert models_result.exit_code == 1, models_result.outputassert "No provider is configured" in models_result.output, models_result.outputvalidate_result = CliRunner().invoke(- cli, ["validate", FIXTURE, "--no-llm", "--checks", "schema,quality,lint"]+ cli, ["validate", FIXTURE, "--tiers", "1", "--no-llm", "--checks", "schema,quality,lint"])assert validate_result.exit_code == 0, validate_result.output+for tier in ("tier1", "tier2", "tier3"):+ help_result = CliRunner().invoke(cli, [tier, "--help"])+ assert help_result.exit_code == 0, help_result.output++direct_result = CliRunner().invoke(+ cli, ["tier1", FIXTURE, "--no-llm", "--checks", "schema,quality,lint", "--report", "cli"]+)+assert direct_result.exit_code == 0, direct_result.output+leaked = sorted(m for m in BLOCKED if m in sys.modules)assert not leaked, f"base path imported extras-only modules: {leaked}"print("BASE_OK")diff --git a/tests/test_benchmark_source_provenance.py b/tests/test_benchmark_source_provenance.pyindex e24f2939..79fca609 100644--- a/tests/test_benchmark_source_provenance.py+++ b/tests/test_benchmark_source_provenance.py@@ -707,9 +707,7 @@ class TestStrictGateRevisionSyntax:assert (self._STRICT not in reasons) is accepted@pytest.mark.parametrize(("length", "accepted"), [(255, True), (256, False)])- def test_a_registry_host_does_not_spend_the_path_budget(- self, tmp_path: Path, length: int, accepted: bool- ) -> None:+ def test_a_registry_host_does_not_spend_the_path_budget(self, tmp_path: Path, length: int, accepted: bool) -> None:"""The bound measures the path once the host is split off, as the reference grammar does."""reference = "ghcr.io/" + "n" * length + "@sha256:" + "0117bc2e" * 8reasons = self._container_reasons(tmp_path, reference)@@ -843,7 +841,7 @@ class TestCliSurfacesTheConflict:result = CliRunner().invoke(cli,- ["validate", str(skill), "--no-dedup", "-r", "cli", "-o", str(tmp_path / "out")],+ ["validate", "--no-tier3", str(skill), "--no-dedup", "-r", "cli", "-o", str(tmp_path / "out")],)assert result.exit_code != 0@@ -881,7 +879,17 @@ class TestCliSuppliesTheIdentity:output_dir = tmp_path / "out"invocation = CliRunner().invoke(cli,- ["validate", str(self._skill(tmp_path)), "--no-dedup", "-r", "cli", "-o", str(output_dir), *args],+ [+ "validate",+ "--no-tier3",+ str(self._skill(tmp_path)),+ "--no-dedup",+ "-r",+ "cli",+ "-o",+ str(output_dir),+ *args,+ ],)return invocation, output_dir / "BENCHMARK.md"@@ -1179,7 +1187,7 @@ class TestTier1OnlyReportsCarryTheIdentity:output_dir = tmp_path / "out"invocation = CliRunner().invoke(cli,- ["validate", str(skill), "--no-dedup", "-r", "json", "-o", str(output_dir), *args],+ ["validate", "--no-tier3", str(skill), "--no-dedup", "-r", "json", "-o", str(output_dir), *args],)assert "evaluated source" not in invocation.outputreturn output_dir@@ -1235,6 +1243,7 @@ class TestConflictAbortsBeforeAnyReportIsWritten:cli,["validate",+ "--no-tier3",str(skill),"--no-dedup","-r",@@ -1281,6 +1290,7 @@ class TestPartialRecordedIdentityMergesWithTheInput:cli,["validate",+ "--no-tier3",str(skill),"--no-dedup","-r",diff --git a/tests/test_cli.py b/tests/test_cli.pyindex b6a9ed7d..73c4e485 100644--- a/tests/test_cli.py+++ b/tests/test_cli.py@@ -54,18 +54,18 @@ def test_top_level_help_groups_commands_by_workflow() -> None:assert result.exit_code == 0headings = (+ "Tier workflows:","Core workflows:","Tier 1 · Static and security:","Tier 2 · Deduplication:","Tier 3 · Live evaluation:",- "Expert aliases:",)positions = [result.output.index(heading) for heading in headings]assert positions == sorted(positions)- core = result.output.split(headings[0], 1)[1].split(headings[1], 1)[0]+ core = result.output.split("Core workflows:", 1)[1].split("Tier 1 · Static and security:", 1)[0]assert all(command in core for command in ("validate", "health-check", "doctor", "models"))- tier3 = result.output.split(headings[3], 1)[1].split(headings[4], 1)[0]+ tier3 = result.output.split("Tier 3 · Live evaluation:", 1)[1]assert all(command in tier3 for command in ("create-eval-dataset", "compare", "view", "harbor-view"))assert "Other commands:" not in result.output@@ -255,7 +255,7 @@ def test_validate_preserves_linked_root_support_when_tier2_is_disabled(tmp_path:result = CliRunner().invoke(cli,- ["validate", str(linked_target), "--no-dedup", "--checks", "schema"],+ ["validate", "--no-tier3", str(linked_target), "--no-dedup", "--checks", "schema"],)assert result.exit_code == 0, result.output@@ -562,7 +562,7 @@ def test_live_eval_help_uses_skill_evaluator_runtime_and_grading_names() -> Noneassert "default_plus_custom" in evaluate.outputassert "harbor-environment" not in evaluate.outputassert "k8s-sandbox" not in evaluate.output- assert "local" not in evaluate.output+ assert "local" in evaluate.outputassert "--autopilot" in evaluate.outputassert "--progress [auto|rich|plain|off]" in evaluate.output@@ -711,13 +711,14 @@ def test_validate_help_is_detailed() -> None:assert "skillevaluator validate ./my-skill" in result.output-def test_tier1_validate_alias_shares_detailed_help() -> None:- # The tier1 alias is the same command object, so it carries the same help.+def test_tier1_validate_alias_shows_only_tier1_options() -> None:result = CliRunner().invoke(cli, ["tier1", "validate", "-h"])assert result.exit_code == 0- assert "Tier 3 · Live Agent Evaluation:" in result.output- assert "Examples:" in result.output+ assert "--checks" in result.output+ assert "--no-llm" in result.output+ assert "--agents" not in result.output+ assert "--dedup" not in result.outputdef test_validate_code_integrity_reports_only_static_test_evidence(tmp_path: Path, monkeypatch) -> None:@@ -776,6 +777,7 @@ def test_validate_code_integrity_reports_only_static_test_evidence(tmp_path: Patcli,["validate",+ "--no-tier3",str(skill),"--verbose","--checks",diff --git a/tests/test_cli_banner.py b/tests/test_cli_banner.pynew file mode 100644index 00000000..0d290268--- /dev/null+++ b/tests/test_cli_banner.py@@ -0,0 +1,99 @@+# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.+# SPDX-License-Identifier: Apache-2.0++"""The welcome banner must not change the CLI's output contracts."""++import os+import shutil+import sys++import click+import pytest+from click.testing import CliRunner++from skillevaluator import __version__+from skillevaluator.cli import cli+from skillevaluator.cli_help import render_help+++def terminal(monkeypatch):+ monkeypatch.setattr(sys.stdout, "isatty", lambda: True)+ monkeypatch.setattr(sys.stderr, "isatty", lambda: True)+ monkeypatch.setattr(shutil, "get_terminal_size", lambda: os.terminal_size((120, 40)))+ monkeypatch.setenv("TERM", "xterm-256color")+ monkeypatch.setenv("COLORTERM", "truecolor")+ monkeypatch.delenv("NO_COLOR", raising=False)+ monkeypatch.delenv("FORCE_COLOR", raising=False)+++def root_help(width=80, *, color=False):+ with cli.make_context("skillevaluator", [], resilient_parsing=True, color=color) as ctx:+ return render_help(cli, ctx, width=width)++[email protected]("terminal_width", [115, 120])+def test_interactive_root_help_has_wordmark_and_installed_version(terminal, monkeypatch, terminal_width):+ monkeypatch.setattr(shutil, "get_terminal_size", lambda: os.terminal_size((terminal_width, 40)))+ output = root_help()+ banner, help_text = output.split("Usage:", 1)++ assert len([line for line in banner.splitlines() if "█" in line]) == 5+ assert "╚══════╝" in banner+ assert f"v{__version__}" in banner+ assert "Static checks · Deduplication · Live evaluation" in banner+ assert "[OPTIONS] COMMAND [ARGS]..." in help_text+ assert all(len(line) <= terminal_width for line in banner.splitlines())+ assert all(len(line) <= 80 for line in help_text.splitlines())++[email protected]("formatter_width,terminal_width", [(78, 40), (78, 80), (78, 114)])+def test_narrow_help_uses_compact_banner(terminal, monkeypatch, formatter_width, terminal_width):+ monkeypatch.setattr(shutil, "get_terminal_size", lambda: os.terminal_size((terminal_width, 40)))+ banner = root_help(formatter_width).split("Usage:", 1)[0]++ assert "█" not in banner+ assert "SKILLEVALUATOR" in banner+ assert f"v{__version__}" in banner+ assert all(len(line) <= terminal_width for line in banner.splitlines())++[email protected]("redirected", ["stdout", "stderr"])+def test_redirected_stream_suppresses_banner_even_with_forced_color(terminal, monkeypatch, redirected):+ monkeypatch.setattr(getattr(sys, redirected), "isatty", lambda: False)+ monkeypatch.setenv("FORCE_COLOR", "1")++ assert root_help(color=None).startswith("\x1b[1mUsage:")+ assert "█" not in root_help(color=None)+++def test_banner_respects_terminal_color_capabilities(terminal, monkeypatch):+ assert "\x1b[1;38;2;118;185;0m" in root_help(color=None)+ monkeypatch.setenv("NO_COLOR", "1")+ plain = root_help(color=None)+ assert "\x1b[" not in plain+ assert "█" in plain+ for term in ("dumb", "unknown"):+ monkeypatch.setenv("TERM", term)+ assert root_help().startswith("Usage:")+++def test_nested_help_does_not_show_banner(terminal):+ parent = click.Context(cli, info_name="skillevaluator")+ tier = cli.get_command(parent, "tier1")+ ctx = click.Context(tier, info_name="tier1", parent=parent, color=False)++ assert render_help(tier, ctx).startswith("Usage: skillevaluator tier1")+++ "args,exit_code,stream",+ [([], 2, "stderr"), (["--help"], 0, "stdout"), (["-h"], 0, "stdout"), (["--version"], 0, "stdout")],+)+def test_noninteractive_invocations_preserve_streams_and_exit_codes(args, exit_code, stream):+ result = CliRunner().invoke(cli, args)++ assert result.exit_code == exit_code+ assert getattr(result, stream)+ assert not getattr(result, "stderr" if stream == "stdout" else "stdout")+ assert "█" not in result.outputdiff --git a/tests/test_cli_html_parser_compat.py b/tests/test_cli_html_parser_compat.pyindex 3750dd1a..e7c84513 100644--- a/tests/test_cli_html_parser_compat.py+++ b/tests/test_cli_html_parser_compat.py@@ -46,7 +46,7 @@ def test_validate_code_integrity_handles_raw_html_on_supported_python_patches(result = CliRunner().invoke(cli,- ["validate", str(skill), "--checks", "code-integrity", "--no-dedup", "-r", "cli"],+ ["validate", "--no-tier3", str(skill), "--checks", "code-integrity", "--no-dedup", "-r", "cli"],)assert result.exit_code == 0, result.outputdiff --git a/tests/test_commands.py b/tests/test_commands.pyindex 54142000..e77ef01f 100644--- a/tests/test_commands.py+++ b/tests/test_commands.py@@ -15,7 +15,7 @@ from click.testing import CliRunnerfrom skillevaluator import cli as cli_modulefrom skillevaluator.cli import cli-from skillevaluator.tier3.commands import parse_agent_model_overrides, parse_agents+from skillevaluator.tier3.commands import parse_agent_model_overrides, parse_agents, resolve_agentsFIXTURE = Path(__file__).parent / "fixtures" / "skills" / "simple"@@ -45,6 +45,7 @@ def test_validate_passes_explicit_previous_version(monkeypatch) -> None:cli,["validate",+ "--no-tier3",str(FIXTURE),"--no-dedup","--checks",@@ -62,6 +63,24 @@ def test_claude_alias_is_canonicalized_and_deduplicated() -> None:assert parse_agents("claude, claude-code, opencode, claude") == ["claude-code", "opencode"]+ ("provider", "expected"),+ [+ ("nv_build", ["opencode"]),+ ("openai", ["codex"]),+ ("anthropic", ["claude-code"]),+ ("bedrock", ["claude-code"]),+ ("openai-compatible", ["codex"]),+ ],+)+def test_agent_default_follows_the_selected_provider(provider: str, expected: list[str]) -> None:+ assert resolve_agents(None, provider=provider) == expected+++def test_explicit_agent_selection_overrides_the_provider_default() -> None:+ assert resolve_agents("codex,claude", provider="nv_build") == ["codex", "claude-code"]++def test_claude_alias_model_override_uses_canonical_agent_name() -> None:assert parse_agent_model_overrides(("claude=anthropic/claude-sonnet",)) == {"claude-code": ["anthropic/claude-sonnet"]@@ -90,7 +109,17 @@ def test_repeated_canonical_model_overrides_are_rejected() -> None:def test_validate_fixture_no_llm() -> None:result = CliRunner().invoke(- cli, ["validate", str(FIXTURE), "--verbose", "--no-llm", "--no-dedup", "--checks", "schema,quality,lint"]+ cli,+ [+ "validate",+ "--no-tier3",+ str(FIXTURE),+ "--verbose",+ "--no-llm",+ "--no-dedup",+ "--checks",+ "schema,quality,lint",+ ],)assert result.exit_code == 0, result.output@@ -105,6 +134,7 @@ def test_validate_reports_malformed_policy_without_traceback(tmp_path: Path) ->cli,["validate",+ "--no-tier3",str(FIXTURE),"--no-llm","--no-dedup",@@ -124,7 +154,17 @@ def test_validate_prints_tier1_section_banner() -> None:# The Tier 1 section is announced as it runs so it is visibly reported in# CI logs (SkillEvaluator parity), not only inside the final combined report.result = CliRunner().invoke(- cli, ["validate", str(FIXTURE), "--verbose", "--no-llm", "--no-dedup", "--checks", "schema,quality,lint"]+ cli,+ [+ "validate",+ "--no-tier3",+ str(FIXTURE),+ "--verbose",+ "--no-llm",+ "--no-dedup",+ "--checks",+ "schema,quality,lint",+ ],)assert result.exit_code == 0, result.output@@ -135,7 +175,17 @@ def test_validate_tier1_banner_is_stable_in_narrow_terminal(monkeypatch) -> Nonemonkeypatch.setenv("COLUMNS", "20")result = CliRunner().invoke(- cli, ["validate", str(FIXTURE), "--verbose", "--no-llm", "--no-dedup", "--checks", "schema,quality,lint"]+ cli,+ [+ "validate",+ "--no-tier3",+ str(FIXTURE),+ "--verbose",+ "--no-llm",+ "--no-dedup",+ "--checks",+ "schema,quality,lint",+ ],)assert result.exit_code == 0, result.output@@ -167,7 +217,17 @@ def test_validate_flushes_tier1_results_before_tier3(monkeypatch) -> None:with runner.isolated_filesystem():result = runner.invoke(cli,- ["validate", str(FIXTURE), "--verbose", "--no-llm", "--no-dedup", "--agent-eval", "--checks", "schema"],+ [+ "validate",+ "--no-autopilot",+ str(FIXTURE),+ "--verbose",+ "--no-llm",+ "--no-dedup",+ "--agent-eval",+ "--checks",+ "schema",+ ],)assert result.exit_code == 0, result.output@@ -178,6 +238,55 @@ def test_validate_flushes_tier1_results_before_tier3(monkeypatch) -> None:assert out.index("Validation Results") < out.index("Tier 3: Live Agent Evaluation")+def test_validate_help_exposes_optional_agent_runtime_preflight() -> None:+ result = CliRunner().invoke(cli, ["validate", "--help"])++ assert result.exit_code == 0, result.output+ assert "--agent-runtime-preflight" in result.output+ assert "--no-agent-runtime-preflight" in result.output+ assert "default: disabled" in " ".join(result.output.split())+++ ("flag", "expected"),+ [+ ("--agent-runtime-preflight", True),+ ("--no-agent-runtime-preflight", False),+ ],+)+def test_validate_forwards_agent_runtime_preflight_override(monkeypatch, flag: str, expected: bool) -> None:+ from skillevaluator import cli as cli_module+ from skillevaluator.models.result import ValidationResult++ captured: dict[str, object] = {}++ def _tier3(*_args, **kwargs) -> ValidationResult:+ captured.update(kwargs)+ result = ValidationResult(validator_name="AGENT_EVAL")+ result.add_success("agent_eval", "ok")+ return result++ monkeypatch.setattr(cli_module, "_run_agent_eval_or_skip", _tier3)++ result = CliRunner().invoke(+ cli,+ [+ "validate",+ "--no-autopilot",+ str(FIXTURE),+ "--no-llm",+ "--no-tier2",+ "--tier3",+ flag,+ "--checks",+ "schema",+ ],+ )++ assert result.exit_code == 0, result.output+ assert captured["agent_runtime_preflight"] is expected++def test_tier1_lint_scripts_fixture() -> None:result = CliRunner().invoke(cli, ["tier1", "lint-scripts", str(FIXTURE)])@@ -233,7 +342,7 @@ def test_validate_quiet_default_renders_pipeline_view() -> None:runner = CliRunner()with runner.isolated_filesystem():result = runner.invoke(- cli, ["validate", str(FIXTURE), "--no-llm", "--no-tier2", "--tier1-checks", "schema,quality"]+ cli, ["validate", "--no-tier3", str(FIXTURE), "--no-llm", "--no-tier2", "--tier1-checks", "schema,quality"])out = _plain_text(result.output)@@ -251,7 +360,9 @@ def test_validate_quiet_default_renders_pipeline_view() -> None:def test_validate_quiet_always_writes_html_and_json_reports() -> None:runner = CliRunner()with runner.isolated_filesystem():- result = runner.invoke(cli, ["validate", str(FIXTURE), "--no-llm", "--no-dedup", "--checks", "schema"])+ result = runner.invoke(+ cli, ["validate", "--no-tier3", str(FIXTURE), "--no-llm", "--no-dedup", "--checks", "schema"]+ )assert result.exit_code == 0, result.outputreports = list(Path("reports").iterdir())assert any(p.suffix == ".html" for p in reports), reports@@ -287,14 +398,16 @@ def test_validate_tier_aliases_and_selector(monkeypatch) -> None:runner = CliRunner()with runner.isolated_filesystem():- result = runner.invoke(cli, ["validate", str(FIXTURE), "--no-llm", "--tiers", "1,3", "--checks", "schema"])+ result = runner.invoke(+ cli, ["validate", "--no-autopilot", str(FIXTURE), "--no-llm", "--tiers", "1,3", "--checks", "schema"]+ )assert result.exit_code == 0, result.outputassert calls == {"tier3": True}calls.clear()with runner.isolated_filesystem():result = runner.invoke(- cli, ["validate", str(FIXTURE), "--no-llm", "--no-tier2", "--tier3", "--checks", "schema"]+ cli, ["validate", "--no-autopilot", str(FIXTURE), "--no-llm", "--no-tier2", "--tier3", "--checks", "schema"])assert result.exit_code == 0, result.outputassert calls == {"tier3": True}@@ -342,7 +455,17 @@ def test_validate_catalog_runs_each_skill_as_separate_job() -> None:second.write_text(second.read_text(encoding="utf-8").replace("name: simple", "name: simple2"), encoding="utf-8")result = runner.invoke(cli,- ["validate", str(catalog.resolve()), "--no-llm", "--no-dedup", "--checks", "quality", "-o", "out"],+ [+ "validate",+ "--no-tier3",+ str(catalog.resolve()),+ "--no-llm",+ "--no-dedup",+ "--checks",+ "quality",+ "-o",+ "out",+ ],)out = _plain_text(result.output)@@ -377,6 +500,7 @@ def test_validate_catalog_workers_runs_skills_in_parallel() -> None:cli,["validate",+ "--no-tier3",str(catalog.resolve()),"--workers","2",@@ -484,6 +608,7 @@ def test_validate_catalog_workers_records_the_evaluated_source_on_every_card() -cli,["validate",+ "--no-tier3",str(catalog.resolve()),"--workers","2",@@ -521,6 +646,7 @@ def test_validate_catalog_workers_accepts_options_before_target_path() -> None:cli,["validate",+ "--no-tier3","--workers","2",str(catalog.resolve()),@@ -548,6 +674,7 @@ def test_validate_catalog_workers_preserves_min_score_and_json_format() -> None:cli,["validate",+ "--no-tier3",str(catalog.resolve()),"--workers","2",@@ -574,6 +701,7 @@ def test_validate_catalog_workers_cli_only_report_format() -> None:cli,["validate",+ "--no-tier3",str(catalog.resolve()),"--workers","2",@@ -601,6 +729,7 @@ def test_validate_catalog_workers_implicit_default_reports() -> None:cli,["validate",+ "--no-tier3",str(catalog.resolve()),"--workers","2",@@ -627,7 +756,7 @@ def test_validate_records_json_report_name_for_catalog_binding(monkeypatch) -> Nwith runner.isolated_filesystem():result = runner.invoke(cli,- ["validate", str(FIXTURE), "--no-llm", "--no-tier2", "--checks", "schema", "-o", "out"],+ ["validate", "--no-tier3", str(FIXTURE), "--no-llm", "--no-tier2", "--checks", "schema", "-o", "out"],)assert result.exit_code == 0, result.output@@ -734,7 +863,9 @@ def test_catalog_summary_binds_exact_json_report_not_sarif_sidecar(monkeypatch)sarif.write_text("{}", encoding="utf-8")return all(result.passed for result in results)- monkeypatch.setattr(cli_module, "run_validation", lambda *_args, **_kwargs: [ValidationResult(validator_name="Schema")])+ monkeypatch.setattr(+ cli_module, "run_validation", lambda *_args, **_kwargs: [ValidationResult(validator_name="Schema")]+ )monkeypatch.setattr(cli_module, "emit_reports", _emit)runner = CliRunner()@@ -745,6 +876,7 @@ def test_catalog_summary_binds_exact_json_report_not_sarif_sidecar(monkeypatch)cli,["validate",+ "--no-tier3",str(catalog.resolve()),"--no-llm","--no-dedup",@@ -814,11 +946,35 @@ def test_catalog_summary_same_second_rerun_overwrites_json(monkeypatch) -> None:shutil.copytree(FIXTURE, catalog / "simple")first = runner.invoke(cli,- ["validate", str(catalog.resolve()), "--no-llm", "--no-dedup", "--checks", "schema", "-r", "json", "-o", "out"],+ [+ "validate",+ "--no-tier3",+ str(catalog.resolve()),+ "--no-llm",+ "--no-dedup",+ "--checks",+ "schema",+ "-r",+ "json",+ "-o",+ "out",+ ],)second = runner.invoke(cli,- ["validate", str(catalog.resolve()), "--no-llm", "--no-dedup", "--checks", "schema", "-r", "json", "-o", "out"],+ [+ "validate",+ "--no-tier3",+ str(catalog.resolve()),+ "--no-llm",+ "--no-dedup",+ "--checks",+ "schema",+ "-r",+ "json",+ "-o",+ "out",+ ],)assert first.exit_code == 0, first.output@@ -875,6 +1031,7 @@ def test_validate_catalog_rejects_one_previous_version_for_every_skill() -> Nonecli,["validate",+ "--no-tier3",str(catalog.resolve()),"--no-llm","--no-dedup",@@ -912,7 +1069,9 @@ def test_validate_quiet_failing_run_renders_verdict_and_fails_cleanly(monkeypatcrunner = CliRunner()with runner.isolated_filesystem():- result = runner.invoke(cli, ["validate", str(FIXTURE), "--no-llm", "--no-tier2", "--checks", "schema"])+ result = runner.invoke(+ cli, ["validate", "--no-tier3", str(FIXTURE), "--no-llm", "--no-tier2", "--checks", "schema"]+ )out = _plain_text(result.output)assert result.exit_code != 0@@ -966,7 +1125,7 @@ def test_validate_quiet_tier3_execution_errors_do_not_render_green(monkeypatch)runner = CliRunner()with runner.isolated_filesystem():result = runner.invoke(- cli, ["validate", str(FIXTURE), "--no-llm", "--no-tier2", "--tier3", "--checks", "schema"]+ cli, ["validate", "--no-autopilot", str(FIXTURE), "--no-llm", "--no-tier2", "--tier3", "--checks", "schema"])out = _plain_text(result.output)@@ -1130,10 +1289,10 @@ def test_validate_tier2_default_is_blocking_and_can_be_advisory(monkeypatch) ->runner = CliRunner()with runner.isolated_filesystem():- blocking = runner.invoke(cli, ["validate", str(FIXTURE), "--checks", "schema"])+ blocking = runner.invoke(cli, ["validate", "--no-tier3", str(FIXTURE), "--checks", "schema"])advisory = runner.invoke(cli,- ["validate", str(FIXTURE), "--checks", "schema", "--no-block-on-dedup"],+ ["validate", "--no-tier3", str(FIXTURE), "--checks", "schema", "--no-block-on-dedup"],)assert blocking.exit_code != 0@@ -1163,6 +1322,7 @@ def test_validate_missing_tier3_source_respects_blocking_flag(monkeypatch, tmp_pcli,["validate",+ "--no-autopilot",str(skill),"--no-tier2","--tier3",@@ -1177,6 +1337,7 @@ def test_validate_missing_tier3_source_respects_blocking_flag(monkeypatch, tmp_pcli,["validate",+ "--no-autopilot",str(skill),"--no-tier2","--tier3",@@ -1212,7 +1373,19 @@ def test_validate_quiet_honors_explicit_report_formats() -> None:with runner.isolated_filesystem():result = runner.invoke(cli,- ["validate", str(FIXTURE), "--no-llm", "--no-dedup", "--checks", "schema", "-r", "cli", "-o", "out"],+ [+ "validate",+ "--no-tier3",+ str(FIXTURE),+ "--no-llm",+ "--no-dedup",+ "--checks",+ "schema",+ "-r",+ "cli",+ "-o",+ "out",+ ],)assert result.exit_code == 0, result.outputassert "Validation Results" in _plain_text(result.output)@@ -1222,7 +1395,19 @@ def test_validate_quiet_honors_explicit_report_formats() -> None:with runner.isolated_filesystem():result = runner.invoke(cli,- ["validate", str(FIXTURE), "--no-llm", "--no-dedup", "--checks", "schema", "-r", "json", "-o", "out"],+ [+ "validate",+ "--no-tier3",+ str(FIXTURE),+ "--no-llm",+ "--no-dedup",+ "--checks",+ "schema",+ "-r",+ "json",+ "-o",+ "out",+ ],)assert result.exit_code == 0, result.outputassert list(Path("out").glob("*.json"))@@ -1257,7 +1442,18 @@ def test_validate_catalog_survives_failing_skills(monkeypatch) -> None:for name in ("simple", "simple2"):shutil.copytree(FIXTURE, catalog / name)result = runner.invoke(- cli, ["validate", str(catalog.resolve()), "--no-llm", "--no-dedup", "--checks", "schema", "-o", "out"]+ cli,+ [+ "validate",+ "--no-tier3",+ str(catalog.resolve()),+ "--no-llm",+ "--no-dedup",+ "--checks",+ "schema",+ "-o",+ "out",+ ],)out = _plain_text(result.output)@@ -1405,7 +1601,18 @@ def test_validate_catalog_reports_unexpected_errors(monkeypatch) -> None:for name in ("simple", "simple2"):shutil.copytree(FIXTURE, catalog / name)result = runner.invoke(- cli, ["validate", str(catalog.resolve()), "--no-llm", "--no-dedup", "--checks", "schema", "-o", "out"]+ cli,+ [+ "validate",+ "--no-tier3",+ str(catalog.resolve()),+ "--no-llm",+ "--no-dedup",+ "--checks",+ "schema",+ "-o",+ "out",+ ],)out = _plain_text(result.output)diff --git a/tests/test_evaluation_service.py b/tests/test_evaluation_service.pyindex b884bfc0..e8fab31d 100644--- a/tests/test_evaluation_service.py+++ b/tests/test_evaluation_service.py@@ -109,6 +109,24 @@ def test_engine_kwargs_excludes_skill_path() -> None:assert kwargs["env_mode"] == "docker"+def test_evaluation_options_leave_agent_selection_to_the_provider() -> None:+ assert EvaluationOptions(skill_path=Path("/tmp/x")).agents is None+++def test_cli_evaluate_rejects_an_empty_explicit_agent_list(monkeypatch: pytest.MonkeyPatch) -> None:+ from types import SimpleNamespace++ from skillevaluator.tier3 import commands++ monkeypatch.setattr(commands, "resolve_llm_provider", lambda: SimpleNamespace(provider="openai"))+ monkeypatch.setattr(commands, "run_harbor_eval", lambda **_kwargs: pytest.fail("must reject before execution"))++ result = CliRunner().invoke(cli, ["evaluate", str(FIXTURE), "--agents", "", "--progress", "off"])++ assert result.exit_code != 0+ assert "Select at least one agent" in result.output++def test_service_defaults_to_null_progress_reporter(monkeypatch: pytest.MonkeyPatch) -> None:from skillevaluator.tier3 import commandsfrom skillevaluator.tier3.harbor.progress import NullProgressReporter@@ -202,7 +220,7 @@ def test_cli_autopilot_uses_keyed_llm_one_case_generation_and_forwards_options(skill = _autopilot_skill(tmp_path)calls = []captured: dict[str, object] = {}- monkeypatch.setattr(provider_config, "resolve_llm_provider", lambda: SimpleNamespace(provider="openai"))+ monkeypatch.setattr(provider_config, "resolve_llm_provider", lambda: SimpleNamespace(provider="openai", model="m"))def create(_self, _skill_path, *, use_llm):calls.append(use_llm)@@ -279,7 +297,7 @@ def test_cli_autopilot_warns_and_falls_back_when_llm_generation_errors(from skillevaluator.inference.client import LLMClientskill = _autopilot_skill(tmp_path)- monkeypatch.setattr(provider_config, "resolve_llm_provider", lambda: SimpleNamespace(provider="openai"))+ monkeypatch.setattr(provider_config, "resolve_llm_provider", lambda: SimpleNamespace(provider="openai", model="m"))monkeypatch.setattr(LLMClient,"completions",@@ -494,7 +512,7 @@ def test_cli_evaluate_renders_real_command_failure_before_nonzero_exit(result = CliRunner().invoke(cli, ["evaluate", str(FIXTURE), "--skip-baseline", "--progress", "off"])assert result.exit_code != 0- assert "FAILED" in result.output+ assert "INCOMPLETE" in result.outputassert "401 Unauthorized" in result.outputassert "🔍 Inspect jobs" not in result.outputdiff --git a/tests/test_gateway_defaults.py b/tests/test_gateway_defaults.pynew file mode 100644index 00000000..f176a5d5--- /dev/null+++ b/tests/test_gateway_defaults.py@@ -0,0 +1,176 @@+# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.+# SPDX-License-Identifier: Apache-2.0++"""A gateway needs only a provider, URL and key; model overrides remain exact."""++import pytest++from skillevaluator.provider_config import (+ ProviderConfigurationError,+ resolve_embedding_provider,+ resolve_llm_provider,+)+from skillevaluator.tier3.harbor.runner import _judge_model_config, _model_for_agent, _resolve_agent_runtime_plan+++def gateway(monkeypatch):+ for name in ("ANTHROPIC_API_KEY", "ANTHROPIC_BASE_URL", "SKILL_EVAL_LLM_MODEL"):+ monkeypatch.delenv(name, raising=False)+ return {+ "SKILL_EVAL_LLM_PROVIDER": "openai-compatible",+ "SKILL_EVAL_LLM_BASE_URL": "https://gateway.example/team/v1",+ "SKILL_EVAL_LLM_API_KEY": "gateway-key",+ }+++def test_gateway_defaults_need_only_provider_url_and_key(gateway):+ chat = resolve_llm_provider(gateway)+ embedding = resolve_embedding_provider(gateway)+ assert chat.model == "nvidia/nvidia/nemotron-3-super-120b-long-ctx"+ assert embedding.model == "nvidia/nvidia/nemotron-3-embed-1b"+ assert chat.api_key == embedding.api_key == "gateway-key"+ assert chat.base_url == embedding.base_url == gateway["SKILL_EVAL_LLM_BASE_URL"]+ assert _judge_model_config(chat, {}, "default")["model"] == chat.model+++def test_gateway_judge_override_precedence(gateway):+ provider = resolve_llm_provider({**gateway, "SKILL_EVAL_LLM_MODEL": "catalog/evaluator"})+ assert _judge_model_config(provider, {}, "default")["model"] == "catalog/evaluator"+ aliases = {"SKILL_EVAL_JUDGE_MODEL": "catalog/judge"}+ assert _judge_model_config(provider, aliases, "default")["model"] == "catalog/judge"+ aliases["LLM_JUDGE_MODEL"] = "catalog/priority-judge"+ assert _judge_model_config(provider, aliases, "default")["model"] == "catalog/priority-judge"+ assert _judge_model_config(provider, aliases, "custom_only") == {"enabled": False}+++def test_gateway_separate_embedding_route_keeps_chat_settings(gateway):+ embedding = resolve_embedding_provider(+ {+ **gateway,+ "SKILL_EVAL_EMBEDDING_BASE_URL": "https://embeddings.example/tenant/v1",+ "SKILL_EVAL_EMBEDDING_API_KEY": "embedding-only-key",+ }+ )+ assert embedding.model == "nvidia/nvidia/nemotron-3-embed-1b"+ assert embedding.base_url == "https://embeddings.example/tenant/v1"+ assert embedding.api_key == "embedding-only-key"+ assert "SKILL_EVAL_LLM_API_KEY" not in embedding.child_environment()+ assert resolve_llm_provider(gateway).api_key == "gateway-key"+++ "resolver,variable",+ [+ (resolve_llm_provider, "SKILL_EVAL_LLM_MODEL"),+ (resolve_embedding_provider, "SKILL_EVAL_EMBEDDING_MODEL"),+ ],+)+def test_gateway_preserves_catalog_model_overrides(gateway, resolver, variable):+ config = resolver({**gateway, variable: "publisher/catalog/exact-model"})+ assert config.model == "publisher/catalog/exact-model"+ assert config.litellm_model == "openai/publisher/catalog/exact-model"+++ "resolver,variable",+ [+ (resolve_llm_provider, "SKILL_EVAL_LLM_MODEL"),+ (resolve_embedding_provider, "SKILL_EVAL_EMBEDDING_MODEL"),+ ],+)+def test_gateway_rejects_blank_model_overrides(gateway, resolver, variable):+ with pytest.raises(ProviderConfigurationError, match=variable + " must be a non-empty"):+ resolver({**gateway, variable: " "})+++ "agent,expected",+ [+ ("codex", "openai/openai/gpt-5.6-sol"),+ ("claude-code", "aws/anthropic/bedrock-claude-opus-5"),+ ("opencode", "openai/nvidia/nvidia/nemotron-3-super-120b-long-ctx"),+ ],+)+def test_gateway_uses_harness_specific_defaults(gateway, agent, expected):+ provider = resolve_llm_provider({**gateway, "SKILL_EVAL_LLM_MODEL": "custom/evaluator"})+ assert _model_for_agent(agent, cli_model=None, config_agents={}, provider=provider) == (+ expected,+ "openai-compatible agent default",+ )+ assert _model_for_agent(agent, cli_model="exact/cli/model", config_agents={}, provider=provider) == (+ "exact/cli/model",+ "CLI",+ )+ assert _model_for_agent(+ agent,+ cli_model=None,+ config_agents={agent: {"model": "exact/config/model"}},+ provider=provider,+ ) == ("exact/config/model", "evals/config.yml")+++def plan(gateway):+ provider = resolve_llm_provider(gateway)+ agents = ["codex", "claude-code", "opencode"]+ selected = {agent: _model_for_agent(agent, cli_model=None, config_agents={}, provider=provider) for agent in agents}+ return _resolve_agent_runtime_plan(+ provider=provider,+ agents=agents,+ models={a: v[0] for a, v in selected.items()},+ model_sources={a: v[1] for a, v in selected.items()},+ configured_runtime_env={},+ env_mode="docker",+ )+++def test_gateway_shared_credentials_are_scoped_per_agent(gateway):+ plans = plan(gateway)+ claude = plans["claude-code"]+ assert claude.provider.api_key == "gateway-key"+ assert claude.provider.base_url == "https://gateway.example/team"+ assert claude.subprocess_env["ANTHROPIC_API_KEY"] == "gateway-key"+ assert claude.subprocess_env["ANTHROPIC_BASE_URL"] == "https://gateway.example/team"+ assert set(claude.staged_env) == {"ANTHROPIC_API_KEY", "ANTHROPIC_BASE_URL"}+ for agent in ("codex", "opencode"):+ assert plans[agent].provider.base_url == gateway["SKILL_EVAL_LLM_BASE_URL"]+ assert set(plans[agent].staged_env) == {"OPENAI_API_KEY", "OPENAI_BASE_URL"}+++ "base,key,expected_base,expected_key",+ [+ (None, "native-key", None, "native-key"),+ ("https://claude.example/prefix/v1", "other-key", "https://claude.example/prefix", "other-key"),+ ("https://gateway.example/anthropic/v1", None, "https://gateway.example/anthropic", "gateway-key"),+ ],+)+def test_explicit_claude_route_takes_precedence(gateway, monkeypatch, base, key, expected_base, expected_key):+ if base:+ monkeypatch.setenv("ANTHROPIC_BASE_URL", base)+ if key:+ monkeypatch.setenv("ANTHROPIC_API_KEY", key)+ plans = plan(gateway)+ assert plans["claude-code"].provider.base_url == expected_base+ assert plans["claude-code"].provider.api_key == expected_key+ assert plans["codex"].provider.api_key == "gateway-key"+++def test_independent_native_claude_key_uses_native_model_default(gateway, monkeypatch):+ monkeypatch.setenv("ANTHROPIC_API_KEY", "native-key")+ provider = resolve_llm_provider(gateway)+ assert _model_for_agent("claude-code", cli_model=None, config_agents={}, provider=provider) == (+ "claude-opus-5",+ "native Anthropic agent default",+ )+ assert _model_for_agent("claude-code", cli_model="exact/override", config_agents={}, provider=provider) == (+ "exact/override",+ "CLI",+ )+++def test_invalid_claude_gateway_root_is_rejected_before_execution(gateway):+ gateway["SKILL_EVAL_LLM_BASE_URL"] = "https://user:[email protected]/v1"+ with pytest.raises(ProviderConfigurationError, match="SKILL_EVAL_LLM_BASE_URL") as exc:+ plan(gateway)+ assert "secret" not in str(exc.value)diff --git a/tests/test_harbor_local_environment.py b/tests/test_harbor_local_environment.pyindex a8feba09..8776943b 100644--- a/tests/test_harbor_local_environment.py+++ b/tests/test_harbor_local_environment.py@@ -6,11 +6,43 @@ from __future__ import annotationsimport osimport shutilimport stat+import subprocess+import sys+import venvfrom pathlib import Path+import pytest+from skillevaluator.tier3.harbor.local_environment import SkillEvaluatorLocalEnvironment[email protected](os.name == "nt", reason="Native Windows local mode is unsupported")+def test_verifier_python_keeps_virtualenv_dependencies(monkeypatch, tmp_path: Path) -> None:+ """Resolving the interpreter symlink loses the venv's installed dependencies."""+ runtime = tmp_path / "evaluator venv"+ venv.EnvBuilder(with_pip=False, symlinks=True).create(runtime)+ python = runtime / ("Scripts/python.exe" if os.name == "nt" else "bin/python3")+ site_dir = subprocess.check_output(+ [str(python), "-c", "import sysconfig; print(sysconfig.get_path('purelib'))"], text=True+ ).strip()+ (Path(site_dir) / "verifier_dependency.py").write_text("VALUE = 'available'\n")+ environment = SkillEvaluatorLocalEnvironment.__new__(SkillEvaluatorLocalEnvironment)+ environment._runtime_root = tmp_path / "agents"+ environment._runtime_agent = "codex"+ monkeypatch.setattr(sys, "executable", str(python))++ env = {**os.environ, "PATH": environment._path_with_evaluator_python(os.defpath)}+ env.pop("PYTHONPATH", None)+ result = subprocess.run(+ ["python3", "-c", "import verifier_dependency; print(verifier_dependency.VALUE)"],+ env=env,+ capture_output=True,+ text=True,+ )+ assert result.returncode == 0, result.stderr+ assert result.stdout.strip() == "available"++def test_local_environment_rewrites_read_only_uploaded_script_once(tmp_path: Path) -> None:"""A read-only template is made writable without rewriting its local path twice."""source = tmp_path / "template_eval.py"diff --git a/tests/test_llm_judge.py b/tests/test_llm_judge.pyindex de28a3f2..7d9043d8 100644--- a/tests/test_llm_judge.py+++ b/tests/test_llm_judge.py@@ -36,6 +36,7 @@ def test_native_openai_gpt5_uses_max_completion_tokens_without_temperature(model"model": model,"max_completion_tokens": 321,"messages": [{"role": "user", "content": "Judge this response"}],+ "stream": False,}assert "max_tokens" not in payloadassert "temperature" not in payloaddiff --git a/tests/test_models_command.py b/tests/test_models_command.pyindex 3da075a5..5f8510a0 100644--- a/tests/test_models_command.py+++ b/tests/test_models_command.py@@ -7,6 +7,7 @@ from __future__ import annotationsimport json+import pytestfrom click.testing import CliRunnerfrom skillevaluator import model_commands@@ -63,20 +64,25 @@ def test_models_missing_provider_uses_canonical_configuration_error(monkeypatch)result = CliRunner().invoke(cli, ["models"])assert result.exit_code == 1+ assert result.stdout == ""assert "No provider is configured" in result.outputassert "NVIDIA_API_KEY" in result.output-def test_models_requires_explicit_provider_when_credentials_are_ambiguous(monkeypatch) -> None:[email protected]("options", [[], ["--json"]])+def test_models_requires_explicit_provider_when_credentials_are_ambiguous(monkeypatch, options) -> None:_clear_provider_env(monkeypatch)monkeypatch.setenv("NVIDIA_API_KEY", "nvidia-secret")monkeypatch.setenv("OPENAI_API_KEY", "openai-secret")- result = CliRunner().invoke(cli, ["models"])+ result = CliRunner().invoke(cli, ["models", *options])assert result.exit_code == 1+ assert result.stdout == ""assert "SKILL_EVAL_LLM_PROVIDER is required" in result.output- assert "multiple public provider credentials" in result.output+ assert "multiple public provider credentials" in result.stderr.lower()+ assert "Accepted values:\n anthropic, bedrock, nv_build, openai, openai-compatible" in result.stderr+ assert "export SKILL_EVAL_LLM_PROVIDER=nv_build" in result.stderrassert "nvidia-secret" not in result.outputassert "openai-secret" not in result.outputdiff --git a/tests/test_oss_packaging.py b/tests/test_oss_packaging.pyindex 5a955733..b27e199a 100644--- a/tests/test_oss_packaging.py+++ b/tests/test_oss_packaging.py@@ -245,8 +245,10 @@ def test_public_docs_declare_support_and_security_sections() -> None:def test_public_readme_is_a_concise_docs_landing_page() -> None:readme = (REPO_ROOT / "README.md").read_text(encoding="utf-8")- quickstart = readme.partition("\n## Quickstart\n")[2].partition("\n## LLM provider setup\n")[0]- deeper_evaluations = readme.partition("\n## Run deeper evaluations\n")[2].partition("\n## Documentation\n")[0]+ quickstart = readme.partition("\n## Quickstart\n")[2].partition("\n## Run the combined pipeline\n")[0]+ combined_pipeline = readme.partition("\n## Run the combined pipeline\n")[2].partition(+ "\n## Run from a source checkout\n"+ )[0]normalized = " ".join(readme.split())positioning = (@@ -262,23 +264,29 @@ def test_public_readme_is_a_concise_docs_landing_page() -> None:assert "docs/assets/three-tier-overview.svg" in readmeassert "\n## Quickstart\n" in readmeassert "skillevaluator[all] @ git+https://github.com/NVIDIA/SkillEvaluator.git" in readme- assert (- "skillevaluator validate ./my-skill \\\n --checks schema,pii,license,quality,unicode,lint \\\n --no-dedup"- ) in quickstart- assert "skillevaluator quality-check ./my-skill" not in quickstart- assert "SKILL_EVAL_LLM_PROVIDER=nv_build" in readme- assert "NVIDIA_API_KEY='nvapi-...'" in readme- assert "skillevaluator context-optimization-check ./my-skill" in readme- assert (- "skillevaluator validate ./my-skill \\\n --full \\\n --agents codex \\\n --env-mode docker"- ) in deeper_evaluations- assert "Semgrep, SkillSpector, and Gitleaks" in deeper_evaluations- assert "enables autopilot" in deeper_evaluations- assert "evals/evals.json" in deeper_evaluations- assert "only for trusted skills and workspaces" in deeper_evaluations- assert "skillevaluator create-eval-dataset ./my-skill --full" in deeper_evaluations- assert "skillevaluator tier3 evaluate ./my-skill" not in deeper_evaluations- assert "--n-attempts 1" not in deeper_evaluations+ for tier in (1, 2, 3):+ assert f"skillevaluator tier{tier} ./my-skill" in quickstart+ assert f"skillevaluator tier{tier} run" not in quickstart+ assert "export SKILL_EVAL_LLM_PROVIDER=nv_build" in quickstart+ assert "export NVIDIA_API_KEY='nvapi-...'" in quickstart+ assert "export SKILL_EVAL_LLM_PROVIDER=openai" in quickstart+ assert "export OPENAI_API_KEY='sk-...'" in quickstart+ assert "set just two variables" in normalized+ assert "Semgrep, SkillSpector, and Gitleaks" in quickstart+ assert "skillevaluator doctor --env-mode docker" in quickstart+ assert "skillevaluator quality-check ./my-skill" in quickstart+ assert "--catalog ./skill-catalog.json" in quickstart+ assert "inter-skill comparison did not run" in normalized+ assert "one starter evaluation case" in normalized+ assert "Valid existing sources are reused unchanged; invalid ones produce an error" in normalized+ assert "configured defaults, not automatically updated selections of the latest models" in normalized+ assert "```bash\nskillevaluator validate ./my-skill\n```" in combined_pipeline+ assert "with autopilot by default" in combined_pipeline+ assert "`--full` remains supported but is unnecessary" in combined_pipeline+ assert "skillevaluator tier3 create-eval-dataset ./my-skill --full" in combined_pipeline+ assert "--block-on-agent-eval" in combined_pipeline+ assert "--n-attempts 1" not in combined_pipeline+ assert "uv run --extra all skillevaluator tier1 ./my-skill" in readmeassert "tier3-live-evaluation#plan-for-cost" in readmeassert "\n## Tier 1:" not in readmeassert "Skill Evaluator" not in readme@@ -517,8 +525,8 @@ def test_public_docs_show_external_nvidia_build_harness_paths_only() -> None:assert "gpt-5.6-sol" in public_docsassert "gpt-5.4-mini" in public_docsassert "claude-opus-5" in public_docs- assert "nvidia/nemotron-3-nano-30b-a3b" in public_docs- assert "nvidia/nvidia/nemotron-3-nano-30b-a3b" in public_docs+ assert "nvidia/nemotron-3-super-120b-a12b" in public_docs+ assert "nvidia/nvidia/nemotron-3-super-120b-a12b" in public_docsassert "Nemotron Super" in public_docsassert "meta/llama-3.1-8b-instruct" in public_docsassert "--agent-model opencode=nvidia/nvidia/nemotron-3-super-120b-a12b" in public_docs@@ -528,8 +536,8 @@ def test_public_docs_show_external_nvidia_build_harness_paths_only() -> None:assert "skillevaluator tier3 evaluate ./my-skill --agents opencode --env-mode docker\n" in tier3assert "skillevaluator tier3 evaluate ./my-skill --agents codex --env-mode docker\n" in tier3assert "skillevaluator tier3 evaluate ./my-skill --agents claude-code --env-mode docker\n" in tier3- assert "never changes models silently" in public_docs- assert "direct OpenCode" in public_docs+ assert "Explicit model overrides are preserved exactly" in public_docs+ assert "OpenCode renders it as" in public_docsassert "Docker or local compatibility bridge" in public_docsassert "experimental Claude Code" in public_docs@@ -630,10 +638,11 @@ def test_harbor_atif_and_agent_eval_alias_are_defined() -> None:content = (REPO_ROOT / "docs" / name).read_text(encoding="utf-8")assert "Agent Trajectory Interchange Format (ATIF)" in content- for name in ("tier1-validation.mdx", "ci-integration.mdx", "cli-reference.mdx", "tier3-live-evaluation.mdx"):+ for name in ("cli-reference.mdx", "tier3-live-evaluation.mdx"):content = (REPO_ROOT / "docs" / name).read_text(encoding="utf-8")assert "--agent-eval" in content- assert "not currently deprecated" in " ".join(content.split())+ assert "--tier3" in content+ assert "alias" in contentdef test_public_product_branding_uses_the_canonical_name() -> None:diff --git a/tests/test_provider_agent_routing.py b/tests/test_provider_agent_routing.pyindex 42dc4e5a..8a0b3070 100644--- a/tests/test_provider_agent_routing.py+++ b/tests/test_provider_agent_routing.py@@ -34,9 +34,9 @@ def _provider(name: str, model: str) -> ProviderConfig:(_provider("openai", "gpt-5.5"), "opencode", "openai/gpt-5.5"),(_provider("anthropic", "claude-opus-5"), "claude-code", "claude-opus-5"),(- _provider("nv_build", "nvidia/nemotron-3-nano-30b-a3b"),+ _provider("nv_build", "nvidia/nemotron-3-super-120b-a12b"),"opencode",- "nvidia/nvidia/nemotron-3-nano-30b-a3b",+ "nvidia/nvidia/nemotron-3-super-120b-a12b",),(_provider("nv_build", "nvidia/nemotron-3-nano-30b-a3b"),diff --git a/tests/test_provider_config.py b/tests/test_provider_config.pyindex 92ce56e8..b32a0c08 100644--- a/tests/test_provider_config.py+++ b/tests/test_provider_config.py@@ -62,6 +62,7 @@ def test_chat_default_models_are_the_single_source_of_truth() -> None:CHAT_DEFAULT_ANTHROPIC,CHAT_DEFAULT_BEDROCK,CHAT_DEFAULT_MODELS,+ CHAT_DEFAULT_NVIDIA,CHAT_DEFAULT_OPENAI,)from skillevaluator.tier3.eval_core.llm_judge import DEFAULT_JUDGE_MODEL@@ -69,6 +70,7 @@ def test_chat_default_models_are_the_single_source_of_truth() -> None:assert CHAT_DEFAULT_MODELS["openai"] == CHAT_DEFAULT_OPENAI == "gpt-5.6-sol"assert CHAT_DEFAULT_MODELS["anthropic"] == CHAT_DEFAULT_ANTHROPIC == "claude-opus-5"assert CHAT_DEFAULT_MODELS["bedrock"] == CHAT_DEFAULT_BEDROCK == "us.anthropic.claude-opus-5"+ assert CHAT_DEFAULT_MODELS["nv_build"] == CHAT_DEFAULT_NVIDIA == "nvidia/nemotron-3-super-120b-a12b"assert CHAT_CHEAP_OPENAI == "gpt-5.4-mini"assert DIMENSION_JUDGE_MODEL == CHAT_DEFAULT_OPENAIassert DEFAULT_JUDGE_MODEL == CHAT_DEFAULT_OPENAI@@ -235,7 +237,7 @@ def test_nvidia_build_uses_public_build_endpoint() -> None:assert config.base_url == "https://integrate.api.nvidia.com/v1"assert config.api_key == "test-nvidia-key"assert config.credential_env == "NVIDIA_API_KEY"- assert config.model == "nvidia/nemotron-3-nano-30b-a3b"+ assert config.model == "nvidia/nemotron-3-super-120b-a12b"assert config.child_environment() == {"NVIDIA_API_KEY": "test-nvidia-key"}@@ -275,6 +277,21 @@ def test_nvidia_build_is_inferred_from_its_public_key() -> None:assert config.provider == "nv_build"+ "resolver,variable,choices",+ [+ (+ resolve_llm_provider,+ "SKILL_EVAL_LLM_PROVIDER",+ {"anthropic", "bedrock", "nv_build", "openai", "openai-compatible"},+ ),+ (+ resolve_embedding_provider,+ "SKILL_EVAL_EMBEDDING_PROVIDER",+ {"nv_build", "openai", "openai-compatible"},+ ),+ ],+)@pytest.mark.parametrize("credentials",[@@ -283,9 +300,19 @@ def test_nvidia_build_is_inferred_from_its_public_key() -> None:{"OPENAI_API_KEY": "openai-key", "ANTHROPIC_API_KEY": "anthropic-key"},],)-def test_multiple_public_credentials_require_explicit_provider(credentials: dict[str, str]) -> None:- with pytest.raises(ProviderConfigurationError, match=r"SKILL_EVAL_LLM_PROVIDER.*multiple"):- resolve_llm_provider(credentials)+def test_multiple_public_credentials_require_explicit_provider(credentials, resolver, variable, choices) -> None:+ with pytest.raises(ProviderConfigurationError) as error:+ resolver(credentials)++ message = str(error.value)+ assert message.startswith(f"{variable} is required.\n")+ assert "multiple public provider credentials" in message.lower()+ accepted = message.split("Accepted values:\n ", 1)[1].splitlines()[0]+ assert set(accepted.split(", ")) == choices+ example = message.split(f"export {variable}=", 1)[1].splitlines()[0]+ assert resolver({**credentials, variable: example}).provider == example+ assert max(map(len, message.splitlines())) <= 80+ assert all(secret not in message for secret in credentials.values())def test_nvidia_build_normalizes_the_key_forwarded_to_children() -> None:@@ -320,7 +347,7 @@ def test_nvidia_build_endpoint_cannot_be_redirected() -> None:assert embedding.base_url == "https://integrate.api.nvidia.com/v1"-def test_openai_compatible_provider_requires_explicit_model() -> None:+def test_openai_compatible_provider_requires_explicit_endpoint() -> None:with pytest.raises(ProviderConfigurationError) as exc_info:resolve_llm_provider({@@ -328,7 +355,7 @@ def test_openai_compatible_provider_requires_explicit_model() -> None:"SKILL_EVAL_LLM_API_KEY": "test-key",})- assert str(exc_info.value) == "SKILL_EVAL_LLM_MODEL is required for openai-compatible providers."+ assert str(exc_info.value) == "SKILL_EVAL_LLM_BASE_URL is required for the selected provider."def test_anthropic_requires_explicit_embedding_provider() -> None:@@ -434,20 +461,21 @@ def test_explicit_chat_model_is_trimmed() -> None:assert config.litellm_model == "openai/openai/gpt-oss-120b"-def test_no_credential_llm_error_lists_every_setup_option() -> None:- # The error is the setup documentation for a fresh environment: every- # variable it names must actually work as claimed.+def test_no_credential_llm_error_leads_with_copyable_setup() -> None:with pytest.raises(ProviderConfigurationError) as err:resolve_llm_provider({})message = str(err.value)- assert "NVIDIA_API_KEY" in message+ assert message.startswith("No provider is configured.\n\n")+ assert " export SKILL_EVAL_LLM_PROVIDER=nv_build\n" in message+ assert " export NVIDIA_API_KEY='your-api-key'\n" in messageassert "build.nvidia.com" in messageassert "OPENAI_API_KEY" in messageassert "ANTHROPIC_API_KEY" in message- # openai-compatible needs all three extras, including the model.- assert "SKILL_EVAL_LLM_BASE_URL" in message- assert "SKILL_EVAL_LLM_API_KEY" in message- assert "SKILL_EVAL_LLM_MODEL" in message+ assert "https://docs.nvidia.com/skills/skillevaluator/configuration" in message+ # Advanced endpoint/model setup belongs in the linked documentation.+ assert "SKILL_EVAL_LLM_BASE_URL" not in message+ assert "SKILL_EVAL_LLM_API_KEY" not in message+ assert "SKILL_EVAL_LLM_MODEL" not in messagedef test_no_credential_embedding_error_omits_non_embedding_providers() -> None:@@ -461,7 +489,9 @@ def test_no_credential_embedding_error_omits_non_embedding_providers() -> None:assert "bedrock" not in messageassert "NVIDIA_API_KEY" in messageassert "OPENAI_API_KEY" in message- assert "SKILL_EVAL_EMBEDDING_MODEL" in message+ assert " export SKILL_EVAL_EMBEDDING_PROVIDER=nv_build\n" in message+ assert "SKILL_EVAL_EMBEDDING_MODEL" not in message+ assert "https://docs.nvidia.com/skills/skillevaluator/configuration" in messagedef test_embedding_rejection_of_llm_only_providers_names_the_fix() -> None:diff --git a/tests/test_tier2_command_failures.py b/tests/test_tier2_command_failures.pyindex 4a00e6cb..72425cb4 100644--- a/tests/test_tier2_command_failures.py+++ b/tests/test_tier2_command_failures.py@@ -5,8 +5,16 @@from __future__ import annotations+import json+import threading+from http.server import BaseHTTPRequestHandler, ThreadingHTTPServerfrom pathlib import Path+import pytest+from click.testing import CliRunner++from skillevaluator.cli import cli+from skillevaluator.models.result import Finding, Severity, ValidationResultfrom skillevaluator.tier2 import commands@@ -19,7 +27,7 @@ def test_similarity_check_wraps_unexpected_validator_exceptions(passdef validate(self, _content_path: Path):- raise RuntimeError("catalog exploded")+ raise RuntimeError("provider body contains private-token")monkeypatch.setattr(commands, "SimilarityValidator", BrokenSimilarityValidator)@@ -28,4 +36,232 @@ def test_similarity_check_wraps_unexpected_validator_exceptions(assert result.validator_name == "Similarity Check"assert result.validator_description == "Tier 2 check"assert result.passed is False- assert result.errors == ["Similarity Check failed: catalog exploded"]+ assert result.status == "incomplete"+ assert result.findings == []+ assert "unexpected error" in result.errors[0]+ assert "private-token" not in result.errors[0]++[email protected]("during_construction", [False, True])+def test_context_check_preserves_incomplete_contract_for_unexpected_errors(+ tmp_path: Path, monkeypatch, during_construction: bool+) -> None:+ class BrokenValidator:+ def __init__(self, **_kwargs):+ if during_construction:+ raise RuntimeError("private provider details")++ def validate(self, _path):+ raise RuntimeError("private provider details")++ monkeypatch.setattr(commands, "IntraSkillValidator", BrokenValidator)++ (result,) = commands.run_context_optimization_check(tmp_path)++ assert result.status == "incomplete"+ assert not result.passed+ assert result.findings == []+ assert "private provider details" not in result.errors[0]+++def test_detected_duplicate_remains_failed_not_incomplete(tmp_path: Path, monkeypatch) -> None:+ result = ValidationResult(validator_name="Context Deduplication")+ result.add_finding(Finding("DUPLICATE", Severity.HIGH, "duplicate", "Repeated instructions", "SKILL.md"))++ class DuplicateValidator:+ def __init__(self, **_kwargs):+ pass++ def validate(self, _path):+ return result++ monkeypatch.setattr(commands, "IntraSkillValidator", DuplicateValidator)++ (actual,) = commands.run_context_optimization_check(tmp_path)++ assert actual.status == "failed"+ assert actual.findings[0].category == "DUPLICATE"+++def test_http_410_is_incomplete_in_real_cli_and_reports(tmp_path: Path, monkeypatch) -> None:+ """Exercise the actual SDK against a local HTTP service, without external calls."""+ requests = []++ class RetiredModelHandler(BaseHTTPRequestHandler):+ def do_POST(self):+ body = json.loads(self.rfile.read(int(self.headers["Content-Length"])))+ requests.append((self.path, body))+ response = json.dumps(+ {"error": {"message": "Retired model: provider-private-token", "type": "model_retired"}}+ ).encode()+ self.send_response(410)+ self.send_header("Content-Type", "application/json")+ self.send_header("Content-Length", str(len(response)))+ self.end_headers()+ self.wfile.write(response)++ def log_message(self, _format, *_args):+ pass++ server = ThreadingHTTPServer(("127.0.0.1", 0), RetiredModelHandler)+ thread = threading.Thread(target=server.serve_forever, daemon=True)+ thread.start()+ skill = tmp_path / "skill"+ skill.mkdir()+ (skill / "SKILL.md").write_text("## Section A\n" + "a" * 200 + "\n## Section B\n" + "b" * 200)+ reports = tmp_path / "reports"+ for purpose in ("LLM", "EMBEDDING"):+ monkeypatch.setenv(f"SKILL_EVAL_{purpose}_PROVIDER", "openai-compatible")+ monkeypatch.setenv(f"SKILL_EVAL_{purpose}_BASE_URL", f"http://127.0.0.1:{server.server_port}/v1")+ monkeypatch.setenv(f"SKILL_EVAL_{purpose}_API_KEY", "local-test-key")+ monkeypatch.setenv(f"SKILL_EVAL_{purpose}_MODEL", "local-test-model")+ try:+ invocation = CliRunner().invoke(cli, ["tier2", str(skill), "-o", str(reports)])+ finally:+ server.shutdown()+ server.server_close()+ thread.join(timeout=5)++ assert invocation.exit_code == 1, invocation.output+ assert len(requests) == 1+ assert requests[0][0] == "/v1/embeddings"+ assert requests[0][1]["model"] == "local-test-model"+ assert "INCOMPLETE" in invocation.output+ payload = json.loads((reports / "skillevaluator-tier2.json").read_text())+ html = (reports / "skillevaluator-tier2.html").read_text()+ assert payload["overall_status"] == "incomplete"+ assert payload["overall_passed"] is False+ assert payload["results"][0]["status"] == "incomplete"+ assert payload["results"][0]["findings"] == []+ assert "Incomplete" in html+ for output in (invocation.output, json.dumps(payload), html):+ assert "provider-private-token" not in output++[email protected]("chat_status", [200, 400, 410, 429])+def test_chat_http_diagnostics_after_successful_embedding(tmp_path: Path, monkeypatch, chat_status: int) -> None:+ """Run collection, SDK requests, clustering, analysis and reports over loopback HTTP."""+ requests = []++ class ChatHandler(BaseHTTPRequestHandler):+ def do_POST(self):+ body = json.loads(self.rfile.read(int(self.headers["Content-Length"])))+ requests.append((self.path, body))+ if self.path == "/v1/embeddings":+ status = 200+ payload = {+ "data": [+ {"index": index, "embedding": [float(dimension == index // 2) for dimension in range(6)]}+ for index in range(len(body["input"]))+ ]+ }+ elif self.path == "/v1/chat/completions":+ status = chat_status+ if status == 200:+ payload = {+ "id": "local-completion",+ "object": "chat.completion",+ "created": 0,+ "model": body["model"],+ "choices": [+ {+ "index": 0,+ "finish_reason": "stop",+ "message": {+ "role": "assistant",+ "content": json.dumps(+ {+ "verdict": "RELATED_BUT_DISTINCT",+ "confidence": 0.9,+ "reasoning": "Separate tasks",+ "suggestion": "Keep both",+ }+ ),+ },+ }+ ],+ }+ else:+ payload = {+ "error": {+ "message": "provider-private-token with private input content",+ "code": "unsupported_parameter" if status == 400 else "model_retired",+ "param": "temperature",+ "type": "provider-private-token",+ }+ }+ else:+ status, payload = 404, {}+ response = json.dumps(payload).encode()+ self.send_response(status)+ self.send_header("Content-Type", "application/json")+ self.send_header("Content-Length", str(len(response)))+ self.send_header("x-should-retry", "false")+ self.end_headers()+ self.wfile.write(response)++ def log_message(self, _format, *_args):+ pass++ server = ThreadingHTTPServer(("127.0.0.1", 0), ChatHandler)+ thread = threading.Thread(target=server.serve_forever, daemon=True)+ thread.start()+ skill = tmp_path / "skill"+ skill.mkdir()+ (skill / "SKILL.md").write_text(+ "\n".join(f"## Section {letter}\n{letter.lower() * 200}" for letter in "ABCDEFGHIJKL")+ )+ reports = tmp_path / "reports"+ for purpose in ("LLM", "EMBEDDING"):+ monkeypatch.setenv(f"SKILL_EVAL_{purpose}_PROVIDER", "openai-compatible")+ monkeypatch.setenv(f"SKILL_EVAL_{purpose}_BASE_URL", f"http://127.0.0.1:{server.server_port}/v1")+ monkeypatch.setenv(f"SKILL_EVAL_{purpose}_API_KEY", "local-test-key")+ monkeypatch.setenv(f"SKILL_EVAL_{purpose}_MODEL", f"local-{purpose.lower()}-model")+ try:+ invocation = CliRunner().invoke(cli, ["tier2", str(skill), "-o", str(reports)])+ finally:+ server.shutdown()+ server.server_close()+ thread.join(timeout=5)++ assert requests[0][0] == "/v1/embeddings"+ chat_requests = [body for path, body in requests if path == "/v1/chat/completions"]+ assert len(chat_requests) == 6+ assert all(body["model"] == "local-llm-model" and body["stream"] is False for body in chat_requests)+ payload = json.loads((reports / "skillevaluator-tier2.json").read_text())+ html = (reports / "skillevaluator-tier2.html").read_text()+ result = payload["results"][0]+ assert result["findings"] == []+ analysis = result["llm_analysis"]+ assert analysis["provider"] == "openai-compatible"+ assert analysis["model"] == "local-llm-model"+ assert analysis["clusters_total"] == 6+ if chat_status == 200:+ assert invocation.exit_code == 0, invocation.output+ assert payload["overall_status"] == "passed"+ assert analysis["clusters_completed"] == 6+ assert analysis["clusters_failed"] == 0+ assert analysis["failures"] == []+ else:+ assert invocation.exit_code == 1, invocation.output+ assert payload["overall_status"] == "incomplete"+ assert result["status"] == "incomplete"+ assert analysis["clusters_failed"] == 6+ assert analysis["clusters_completed"] == 0+ errors = result["legacy"]["errors"]+ assert len(errors) == len(analysis["failures"]) == 1+ assert analysis["failures"][0]["count"] == 6+ for output in (invocation.output, json.dumps(payload), html):+ assert f"HTTP {chat_status}" in output+ assert "6 of 6 content clusters" in output+ assert "local-llm-model" in output+ assert "provider-private-token" not in output+ assert "private input content" not in output+ assert "local-test-key" not in output+ if chat_status == 400:+ assert "code=unsupported_parameter" in errors[0]+ assert "param=temperature" in errors[0]+ elif chat_status == 410:+ assert "SKILL_EVAL_LLM_MODEL" in errors[0]+ elif chat_status == 429:+ assert "quota" in errors[0]diff --git a/tests/test_tier3_config_key_parity.py b/tests/test_tier3_config_key_parity.pyindex b243fcfc..2b2631a5 100644--- a/tests/test_tier3_config_key_parity.py+++ b/tests/test_tier3_config_key_parity.py@@ -223,7 +223,7 @@ harbor:assert calls == []-def test_agent_runtime_preflight_defaults_to_enabled(+def test_agent_runtime_preflight_defaults_to_disabled(monkeypatch: pytest.MonkeyPatch,tmp_path: Path,) -> None:@@ -231,6 +231,24 @@ def test_agent_runtime_preflight_defaults_to_enabled(result, _captured = _run_engine(monkeypatch, tmp_path, USER_CONFIG, agent_runtime_preflight=None)+ assert "error" not in result+ assert calls == []+++def test_agent_runtime_preflight_config_key_enables_preflight(+ monkeypatch: pytest.MonkeyPatch,+ tmp_path: Path,+) -> None:+ config = """\+schema_version: 1+harbor:+ task_source: evals_json+ agent_runtime_preflight: true+"""+ calls = _observe_preflight(monkeypatch)++ result, _captured = _run_engine(monkeypatch, tmp_path, config, agent_runtime_preflight=None)+assert "error" not in resultassert calls == ["opencode"]diff --git a/tests/test_tier3_progress.py b/tests/test_tier3_progress.pyindex d3df5bfb..512b4a32 100644--- a/tests/test_tier3_progress.py+++ b/tests/test_tier3_progress.py@@ -920,7 +920,8 @@ def test_inconclusive_credential_probe_degrades_and_continues()assert "error" not in result- assert len(probe_calls) == (2 if provider_name == "anthropic" else 1)+ # Gateway harness defaults are distinct from the evaluator/judge model.+ assert len(probe_calls) == (2 if provider_name in {"anthropic", "openai-compatible"} else 1)assert any(call.provider == provider_name for call in probe_calls)assert task_callstransitions = [(event.stage, event.state) for event in reporter.events]@@ -1886,7 +1887,14 @@ def test_default_task_staging_failure_cleans_transient_artifacts(assert result["run_config"]["credential_validation"]["status"] == "degraded"assert result["run_config"]["credential_validation"]["targets"] == [{- "labels": ["codex", "standard grader"],+ "labels": ["codex"],+ "provider": "openai-compatible",+ "model": "openai/openai/gpt-5.6-sol",+ "status": "degraded",+ "detail": "model catalog access does not verify runtime credentials for this endpoint",+ },+ {+ "labels": ["standard grader"],"provider": "openai-compatible","model": "gpt-5","status": "degraded",@@ -2004,10 +2012,32 @@ def test_runtime_preflight_running_event_precedes_slow_preflight_call(["codex"],output_dir=tmp_path / "results",keep_harbor_jobs=True,+ agent_runtime_preflight=True,progress_reporter=reporter,)+def test_runtime_preflight_is_skipped_by_default_with_enablement_hint(+ monkeypatch: pytest.MonkeyPatch,+ tmp_path: Path,+) -> None:+ runner, skill = _stub_runner(monkeypatch, tmp_path)+ reporter = _RecordingReporter()++ runner.run_harbor_eval(+ skill,+ ["codex"],+ output_dir=tmp_path / "results",+ progress_reporter=reporter,+ )++ event = next(event for event in reporter.events if event.stage == "agent-runtime-preflight")+ assert event.state == "skipped"+ assert event.detail == (+ "disabled by default; enable with --agent-runtime-preflight or harbor.agent_runtime_preflight"+ )++def test_cleanup_failure_degrades_terminal_progress_after_retention_finalizes(monkeypatch: pytest.MonkeyPatch,tmp_path: Path,@@ -2153,6 +2183,7 @@ def test_runner_emits_truthful_stages_plan_and_per_agent_state(["codex", "opencode"],output_dir=tmp_path / "results",keep_harbor_jobs=True,+ agent_runtime_preflight=True,progress_reporter=reporter,)diff --git a/tests/test_tier3_public_runtime.py b/tests/test_tier3_public_runtime.pyindex a0135446..c841dac1 100644--- a/tests/test_tier3_public_runtime.py+++ b/tests/test_tier3_public_runtime.py@@ -54,7 +54,7 @@ def test_live_eval_exposes_only_harbor_native_environments() -> None:assert "modal" in result.outputassert "harbor-environment" not in result.outputassert "k8s-sandbox" not in result.output- assert "local" not in result.output+ assert "local" in result.outputassert "base-image-mode" not in result.outputassert "--agent-runtime-preflight" in result.output@@ -195,15 +195,24 @@ def test_local_bridge_command_uses_custom_agent_import_path() -> None:assert "-a" not in command-def test_custom_agent_import_path_is_rejected_for_native_cloud() -> None:- with pytest.raises(ValueError, match="agent_import_path is supported only with --env docker or local"):- build_harbor_run_command(- dataset_path="/tmp/dataset",- agent="codex",- job_name="bridge-test",- env_mode="e2b",- agent_import_path="example:Agent",- )[email protected]("env_mode", ["e2b", "daytona"])+def test_custom_agent_import_path_preserves_native_cloud_environment(env_mode: str) -> None:+ import_path = "skillevaluator.tier3.harbor.local_agents:SkillEvaluatorGatewayCodex"+ model = "openai/openai/gpt-5.6-sol"+ command = build_harbor_run_command(+ dataset_path="/tmp/dataset",+ agent="codex",+ job_name="gateway-test",+ env_mode=env_mode,+ agent_import_path=import_path,+ model=model,+ )++ assert command[command.index("--agent-import-path") + 1] == import_path+ assert command[command.index("--env") + 1] == env_mode+ assert command[command.index("--model") + 1] == model+ assert "-a" not in command+ assert "--environment-import-path" not in commanddef test_evaluate_forwards_native_environment_without_legacy_sandbox_configuration(monkeypatch, tmp_path) -> None:@@ -762,7 +771,7 @@ def test_nvidia_build_opencode_default_model_is_prefixed_for_local_runtime() ->("provider_name", "expected"),[("openai", "openai/test-model"),- ("openai-compatible", "openai/test-model"),+ ("openai-compatible", "openai/nvidia/nvidia/nemotron-3-super-120b-long-ctx"),("anthropic", "anthropic/test-model"),],)@@ -777,7 +786,7 @@ def test_opencode_default_model_is_provider_qualified(provider_name: str, expectassert _model_for_agent("opencode", cli_model=None, config_agents={}, provider=provider) == (expected,- "public provider default",+ "openai-compatible agent default" if provider_name == "openai-compatible" else "public provider default",)diff --git a/tests/test_tier3_result_display.py b/tests/test_tier3_result_display.pyindex 5b246b7d..968027f0 100644--- a/tests/test_tier3_result_display.py+++ b/tests/test_tier3_result_display.py@@ -5,6 +5,7 @@import ioimport re+from copy import deepcopyfrom pathlib import Pathimport pytest@@ -15,6 +16,103 @@ from skillevaluator.tier3.harbor.metrics import CUSTOM_ONLY_METRIC_SET, DEFAULT_from skillevaluator.tier3.result_display import _with_skill_overall, render_evaluation_result, render_result[email protected]("delta", [0.3, 0.0, -0.3])+def test_overall_lift_headline_preserves_signed_persisted_value_and_original_tables(delta: float) -> None:+ result = {+ "execution_status": "succeeded",+ "agents": {+ "codex": {+ "execution_status": "succeeded",+ "lift": {"overall": {"with_skill": 0.5 + delta, "without_skill": 0.5, "delta": delta}},+ "dimensions_with_skill": {"effectiveness": {"score": 0.9}},+ "dimensions_without_skill": {"effectiveness": {"score": 0.1}},+ }+ },+ }+ original = deepcopy(result)+ output = render_result(result)++ assert re.search(rf"OVERALL SKILL LIFT\s+{re.escape(f'{delta:+.2f}')}", output)+ assert output.index("OVERALL SKILL LIFT") < output.index("With Skill")+ assert output.count("Results by Evaluator") == 1+ assert output.count("Results by Dimension") == 1+ assert "Skill Lift" in output+ assert "█" in output+ assert result == original+++ "change",+ [+ {+ "conditions": {+ "with_skill": {"execution_status": "failed"},+ "without_skill": {"execution_status": "succeeded"},+ }+ },+ {+ "conditions": {+ "with_skill": {"execution_status": "succeeded"},+ "without_skill": {"execution_status": "skipped"},+ }+ },+ {+ "conditions": {+ "with_skill": {"execution_status": "succeeded"},+ "without_skill": {"execution_status": "failed"},+ }+ },+ {"lift": {"overall": {"with_skill": 0.8, "without_skill": 0.5}}},+ {"lift": {"overall": {"with_skill": 0.8, "without_skill": None, "delta": 0.3}}},+ {"lift": {"overall": {"with_skill": float("nan"), "without_skill": 0.5, "delta": 0.3}}},+ {"lift": {"overall": {"with_skill": 0.8, "without_skill": 0.5, "delta": float("inf")}}},+ {"lift": {"overall": {"with_skill": 0.8, "without_skill": 0.5, "delta": True}}},+ ],+)+def test_overall_lift_headline_omits_unusable_or_unscored_comparisons(change: dict) -> None:+ agent = {+ "execution_status": "succeeded",+ "lift": {"overall": {"with_skill": 0.8, "without_skill": 0.5, "delta": 0.3}},+ **change,+ }+ output = render_result({"execution_status": "succeeded", "agents": {"codex": agent}})+ assert "OVERALL SKILL LIFT" not in output+++def test_overall_lift_headline_is_per_agent_and_highlighted_without_a_background() -> None:+ from rich.console import Group+ from rich.text import Text++ printed = []++ class RecordingConsole:+ def print(self, value):+ printed.append(value)++ agents = {+ name: {+ "execution_status": "succeeded",+ "lift": {"overall": {"with_skill": 0.5 + delta, "without_skill": 0.5, "delta": delta}},+ }+ for name, delta in (("codex", 0.3), ("opencode", -0.2))+ }+ render_evaluation_result({"execution_status": "succeeded", "agents": agents}, console=RecordingConsole())+ evaluator_panels = [+ item for item in printed if isinstance(item, Panel) and str(item.title) == "Results by Evaluator"+ ]+ assert len(evaluator_panels) == 2+ console = Console()+ for panel, (name, delta) in zip(evaluator_panels, (("codex", 0.3), ("opencode", -0.2)), strict=True):+ assert isinstance(panel.renderable, Group)+ headline = panel.renderable.renderables[0]+ assert isinstance(headline, Text)+ assert headline.plain == f"OVERALL SKILL LIFT {delta:+.2f} · {name}"+ style = headline.get_style_at_offset(console, headline.plain.index(f"{delta:+.2f}"))+ assert style.bold+ assert style.color.name == ("green" if delta > 0 else "red")+ assert style.bgcolor is None++def _skip_baseline_agent(with_skill: dict[str, float], *, pass_rate: float = 0.5) -> dict[str, object]:return {"execution_status": "succeeded",@@ -227,7 +325,11 @@ def test_skip_baseline_unusable_agent_does_not_synthesize_with_skill_score(agentoutput = render_result(result)assert "opencode" in output- assert re.search(r"Security\s+NO SCORE", output)+ if agent_status == "failed":+ assert "Tier 3 Evaluation: INCOMPLETE" in output+ assert "Results by Evaluator" not in output+ else:+ assert re.search(r"Security\s+NO SCORE", output)assert "0.71" not in outputassert "0.50" not in outputassert "job incomplete" in output@@ -541,9 +643,181 @@ def test_failed_agent_without_diagnostic_says_no_score_and_explains_failure() ->})- assert "NO SCORE" in output- assert "Findings" in output- assert "opencode evaluation failed without diagnostic details" in output+ assert "Evaluation did not complete" in output+ assert "Tier 3 Evaluation: INCOMPLETE" in output+ assert "opencode: evaluation failed without diagnostic details" in output+++def _unscored_timeout_result() -> dict:+ agent_reason = "AgentTimeoutError: Agent execution timed out after 300.0 seconds"+ judge_reason = (+ "Required judge evaluation failed: accuracy: LLM judge error: The read operation timed out; "+ "behavior_check: LLM judge error: The read operation timed out"+ )+ aggregate = "Harbor job did not complete successfully: 1 errored"+ conditions = {}+ failures = {}+ errors = []+ for variant, trial, reason in (+ ("with_skill", "case-001__with", agent_reason),+ ("without_skill", "case-001__without", judge_reason),+ ):+ arm_errors = [f"Unscoreable reward in {trial}: {reason}"]+ if variant == "with_skill":+ arm_errors = [aggregate, f"Agent runtime failed in {trial}: {reason}", *arm_errors]+ arm_errors.extend(["Missing scored attempts for cases: case-001", "Scored attempt coverage is 0/1"])+ conditions[variant] = {+ "execution_status": "failed",+ "execution_errors": arm_errors,+ "expected_attempts": 1,+ "scored_attempts": 0,+ }+ failures[variant] = [{"trial": trial, "reason": reason}]+ errors.extend(arm_errors)+ feedback = "; ".join(+ [+ *errors,+ f"With skill aggregate job: {aggregate}",+ f"With skill trial case-001__with: {agent_reason}",+ f"Without skill trial case-001__without: {judge_reason}",+ ]+ )+ return {+ "execution_status": "failed",+ "expected_attempts": 2,+ "scored_attempts": 0,+ "execution_errors": [*errors, f"codex with-skill Harbor run failed: {aggregate}"],+ "agents": {+ "codex": {+ "execution_status": "failed",+ "execution_errors": errors,+ "conditions": conditions,+ "trial_failures": failures,+ "with_skill": {},+ "without_skill": {},+ "num_trials_with": 0,+ }+ },+ "tier3_feedback": {+ "conclusions": [{"title": "Evaluation incomplete", "severity": "fail", "message": feedback}],+ "recommendations": [{"message": feedback}],+ "suggestions": [feedback],+ },+ }++[email protected]("width", [80, 120, 240])+def test_unscored_execution_shows_each_arm_once_without_empty_tables(width: int) -> None:+ result = _unscored_timeout_result()+ original = deepcopy(result)+ stream = io.StringIO()++ render_evaluation_result(result, console=Console(file=stream, force_terminal=False, width=width))+ output = stream.getvalue()+ normalized = " ".join(line.strip(" │") for line in output.splitlines())++ assert "Tier 3 Evaluation: INCOMPLETE" in output+ assert "Scored attempts: 0/2" in output+ assert "with-skill (0/1 scored)" in output+ assert "without-skill (0/1 scored)" in output+ assert normalized.count("300.0 seconds") == 1+ assert normalized.count("The read operation timed out") == 1+ assert "accuracy, behavior_check" in normalized+ assert "--timeout-multiplier" in normalized+ assert "Results by Evaluator" not in output+ assert "Results by Dimension" not in output+ assert "Feedback & Suggestions" not in output+ assert "0 trial(s)" not in output+ assert result == original+++def test_unscored_execution_preserves_unknown_errors_and_real_recommendations() -> None:+ result = _unscored_timeout_result()+ result["execution_errors"].append("Distinct top-level error")+ result["agents"]["codex"]["execution_errors"].append("Distinct agent error")+ result["agents"]["codex"]["conditions"]["with_skill"]["execution_errors"].append("Distinct arm error")+ result["tier3_feedback"]["recommendations"].append({"message": "Check the task's required service credentials."})+ result["tier3_feedback"]["conclusions"].append({"message": "Additional independent observation."})++ output = render_result(result)++ for message in (+ "Distinct top-level error",+ "Distinct agent error",+ "Distinct arm error",+ "Check the task's required service credentials.",+ "Additional independent observation.",+ ):+ assert output.count(message) == 1+++def test_unscored_execution_preserves_distinct_trial_ids_and_distinct_judge_failures() -> None:+ result = _unscored_timeout_result()+ failures = result["agents"]["codex"]["trial_failures"]+ failures["with_skill"].append({"trial": "case-002__with", "reason": failures["with_skill"][0]["reason"]})+ failures["without_skill"][0]["reason"] = (+ "Required judge evaluation failed: accuracy: LLM judge error: provider timed out; "+ "behavior_check: LLM judge error: invalid JSON"+ )++ output = render_result(result)++ assert "case-001__with" in output+ assert "case-002__with" in output+ assert "accuracy: LLM judge error: provider timed out" in output+ assert "behavior_check: LLM judge error: invalid JSON" in output+++def test_unscored_execution_does_not_hide_unexplained_job_errors_or_inconsistent_counts() -> None:+ result = _unscored_timeout_result()+ errors = result["agents"]["codex"]["conditions"]["with_skill"]["execution_errors"]+ errors.extend(["Harbor job did not complete successfully: 4 errored", "Scored attempt coverage is 1/5"])++ output = render_result(result)++ assert "Harbor job did not complete successfully: 4 errored" in output+ assert "Scored attempt coverage is 1/5" in output+++def test_unscored_execution_does_not_invent_attempt_counts() -> None:+ output = render_result({"execution_status": "failed", "execution_errors": ["setup failed"], "agents": {}})++ assert "setup failed" in output+ assert "Scored attempts:" not in output+ assert "0/0" not in output+ assert "No scores available" not in output+++def test_both_incomplete_arms_preserve_partial_scored_attempt_counts() -> None:+ result = {+ "execution_status": "failed",+ "expected_attempts": 4,+ "scored_attempts": 2,+ "agents": {+ "codex": {+ "execution_status": "failed",+ "conditions": {+ variant: {+ "execution_status": "failed",+ "expected_attempts": 2,+ "scored_attempts": 1,+ "execution_errors": ["Scored attempt coverage is 1/2"],+ }+ for variant in ("with_skill", "without_skill")+ },+ }+ },+ }++ output = render_result(result)++ assert "Tier 3 Evaluation: INCOMPLETE" in output+ assert "Scored attempts: 2/4" in output+ assert "with-skill (1/2 scored)" in output+ assert "without-skill (1/2 scored)" in output+ assert "No scores available" not in output+ assert "skill lift was not measured" in output+ assert "Results by Evaluator" not in outputdef test_multi_agent_result_has_one_shared_dimension_panel() -> None:diff --git a/tests/tier3/test_dataset_generation_progress.py b/tests/tier3/test_dataset_generation_progress.pynew file mode 100644index 00000000..4ab9ada9--- /dev/null+++ b/tests/tier3/test_dataset_generation_progress.py@@ -0,0 +1,205 @@+# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.+# SPDX-License-Identifier: Apache-2.0++"""Dataset preparation must remain visibly active without polluting stdout."""++from __future__ import annotations++import json+import threading+from io import StringIO++import click+import httpx+import pytest+from click.testing import CliRunner+from openai import APIStatusError, APITimeoutError++from skillevaluator.cli import _ensure_autopilot_dataset+from skillevaluator.inference.client import LLMClient+++def generation_skill(tmp_path, monkeypatch):+ skill = tmp_path / "demo"+ skill.mkdir()+ (skill / "SKILL.md").write_text("---\nname: demo\ndescription: Summarize supplied text.\n---\n# Demo\n")+ monkeypatch.setenv("SKILL_EVAL_LLM_PROVIDER", "nv_build")+ monkeypatch.setenv("NVIDIA_API_KEY", "test-key-never-sent")+ monkeypatch.delenv("SKILL_EVAL_LLM_MODEL", raising=False)+ case = {+ "id": "demo-001",+ "question": "Summarize the supplied text.",+ "expected_skill": "demo",+ "expected_script": None,+ "ground_truth": "A concise summary.",+ "expected_behavior": ["The agent provides a summary."],+ }+ monkeypatch.setattr(LLMClient, "completions", lambda *_args, **_kwargs: json.dumps([case]))+ return skill+++def test_generation_announces_provider_and_handoff_on_stderr(generation_skill):+ @click.command()+ def command():+ _ensure_autopilot_dataset(generation_skill)++ result = CliRunner().invoke(command)+ assert result.exit_code == 0, result.output+ assert result.stdout == ""+ assert "nv_build / nvidia/" in result.stderr+ assert "evaluation source ready" in result.stderr+ assert (generation_skill / "evals" / "evals.json").exists()+++def test_quiet_generation_has_no_provider_output(generation_skill):+ @click.command()+ def command():+ _ensure_autopilot_dataset(generation_skill, quiet=True)++ result = CliRunner().invoke(command)+ assert result.exit_code == 0, result.output+ assert result.output == ""+ assert (generation_skill / "evals" / "evals.json").exists()+++class _ObservedStream(StringIO):+ def __init__(self):+ super().__init__()+ self.heartbeat_received = threading.Event()++ def write(self, text):+ count = super().write(text)+ if "live evaluation has not started" in text:+ self.heartbeat_received.set()+ return count+++def test_heartbeat_reports_wait_before_completion_and_stops(monkeypatch):+ from skillevaluator.tier3 import dataset_progress++ monkeypatch.setattr(dataset_progress, "HEARTBEAT_INTERVAL_SECONDS", 0.01)+ stream = _ObservedStream()+ with dataset_progress.dataset_generation_progress(enabled=True, stream=stream):+ assert stream.heartbeat_received.wait(2), "generation wait must be visible before it completes"+ assert "elapsed" in stream.getvalue()+ assert "evaluation source ready" not in stream.getvalue()+ assert "evaluation source ready" in stream.getvalue()+ assert not any(thread.name == "dataset-generation-progress" for thread in threading.enumerate())++[email protected]("error", [RuntimeError, KeyboardInterrupt, SystemExit])+def test_failed_or_interrupted_generation_stops_without_success(monkeypatch, error):+ from skillevaluator.tier3 import dataset_progress++ monkeypatch.setattr(dataset_progress, "HEARTBEAT_INTERVAL_SECONDS", 0.01)+ stream = _ObservedStream()+ with pytest.raises(error), dataset_progress.dataset_generation_progress(enabled=True, stream=stream):+ assert stream.heartbeat_received.wait(2)+ raise error()+ assert "evaluation source ready" not in stream.getvalue()+ assert not any(thread.name == "dataset-generation-progress" for thread in threading.enumerate())+++def test_closed_progress_stream_does_not_fail_generation():+ from skillevaluator.tier3.dataset_progress import dataset_generation_progress++ stream = StringIO()+ stream.close()+ with dataset_generation_progress(enabled=True, stream=stream):+ pass+++def test_off_suppresses_progress_but_preserves_setup_notice(generation_skill):+ @click.command()+ def command():+ _ensure_autopilot_dataset(generation_skill, progress="off")++ result = CliRunner().invoke(command)+ assert result.exit_code == 0, result.output+ assert result.stdout == ""+ assert "Autopilot: generating one case" in result.stderr+ assert "elapsed" not in result.stderr+ assert "evaluation source ready" not in result.stderr+++def test_interrupted_autopilot_does_not_fallback_or_write_dataset(generation_skill, monkeypatch):+ from skillevaluator.evaluation import EvaluationService++ calls = []++ def interrupt(_self, _path, *, use_llm):+ calls.append(use_llm)+ raise KeyboardInterrupt++ monkeypatch.setattr(EvaluationService, "create_autopilot_dataset", interrupt)++ @click.command()+ def command():+ _ensure_autopilot_dataset(generation_skill)++ result = CliRunner().invoke(command)+ assert result.exit_code == 1+ assert calls == [True]+ assert "evaluation source ready" not in result.output+ assert not (generation_skill / "evals").exists()+++ "error, expected",+ [+ (+ APIStatusError(+ "private-response-content",+ response=httpx.Response(429, request=httpx.Request("POST", "https://private-endpoint.invalid")),+ body={"error": {"code": "rate_limit_exceeded", "message": "private-response-content"}},+ ),+ "HTTP 429",+ ),+ (APITimeoutError(request=httpx.Request("POST", "https://private-endpoint.invalid")), "timed out"),+ (json.JSONDecodeError("private-response-content", "private-response-content", 0), "structured-output"),+ (RuntimeError("private-response-content"), "Unexpected LLM"),+ ],+)+def test_fallback_explains_safe_failure_and_labels_starter(generation_skill, monkeypatch, error, expected):+ def fail(*_args, **_kwargs):+ raise error++ monkeypatch.setattr(LLMClient, "completions", fail)+ notes = []++ @click.command()+ def command():+ notes.append(_ensure_autopilot_dataset(generation_skill, progress="off"))++ result = CliRunner().invoke(command)+ assert result.exit_code == 0, result.output+ assert result.stdout == ""+ assert expected in result.stderr+ assert "falling back" in result.stderr.lower()+ assert "deterministic starter" in result.stderr.lower()+ assert "deterministic starter" in notes[0].lower()+ assert expected in notes[0]+ assert "private-response-content" not in result.output + notes[0]+ assert "private-endpoint" not in result.output + notes[0]+ assert "Tier 2" not in result.output + notes[0]+ assert len(json.loads((generation_skill / "evals" / "evals.json").read_text())["evals"]) == 1+++def test_quiet_fallback_preserves_reason_in_returned_note(generation_skill, monkeypatch):+ def fail(*_args, **_kwargs):+ raise TimeoutError("private-response-content")++ monkeypatch.setattr(LLMClient, "completions", fail)+ notes = []++ @click.command()+ def command():+ notes.append(_ensure_autopilot_dataset(generation_skill, quiet=True))++ result = CliRunner().invoke(command)+ assert result.exit_code == 0, result.output+ assert result.output == ""+ assert "timed out" in notes[0]+ assert "deterministic starter" in notes[0].lower()+ assert "private-response-content" not in notes[0]diff --git a/tests/tier3/test_gateway_codex.py b/tests/tier3/test_gateway_codex.pynew file mode 100644index 00000000..05ad7823--- /dev/null+++ b/tests/tier3/test_gateway_codex.py@@ -0,0 +1,132 @@+# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.+# SPDX-License-Identifier: Apache-2.0++import asyncio+import shlex++import pytest+from harbor.agents.factory import AgentFactory+from harbor.environments.base import ExecResult+from harbor.models.agent.context import AgentContext+from harbor.models.trial.config import AgentConfig++from skillevaluator.provider_config import ProviderConfig+from skillevaluator.tier3.harbor import local_agents, runner++[email protected]("provider", ["openai", "anthropic", "nv_build", "openai-compatible"])[email protected]("mode", sorted(runner.HARBOR_ENV_MODES))[email protected]("agent", ["codex", "claude-code", "opencode"])+def test_gateway_adapter_selection_preserves_other_routes(provider, mode, agent):+ config = ProviderConfig(+ provider=provider,+ model="vendor/model",+ api_key="test-key",+ base_url="https://example.com/v1",+ litellm_model="openai/vendor/model",+ )+ expected = runner._nvidia_build_agent_import_path(config, agent, mode)+ if provider == "openai-compatible" and mode != "local" and agent == "codex":+ expected = "skillevaluator.tier3.harbor.local_agents:SkillEvaluatorGatewayCodex"+ if provider == "openai-compatible" and mode == "docker" and agent == "opencode":+ expected = "skillevaluator.tier3.harbor.local_agents:SkillEvaluatorGatewayOpenCode"+ assert runner._agent_import_path(config, agent, mode) == expected++[email protected]("mode", ["local", "docker", "e2b", "daytona"])+ ("provider", "configured_model", "cli_model", "expected_model", "expected_source"),+ [+ ("openai-compatible", None, None, "openai/openai/gpt-5.6-sol", "openai-compatible agent default"),+ ("openai-compatible", "openai/openai/gpt-5.6-sol", None, "openai/openai/gpt-5.6-sol", "evals/config.yml"),+ ("openai-compatible", "openai/openai/gpt-5.6-sol", "azure/custom/deployment", "azure/custom/deployment", "CLI"),+ ("openai-compatible", None, "custom-deployment", "custom-deployment", "CLI"),+ ("openai", None, "openai/gpt-5.6-sol", "gpt-5.6-sol", "CLI"),+ ],+)+def test_selected_codex_launcher_preserves_provider_model_contract(+ monkeypatch, tmp_path, mode, provider, configured_model, cli_model, expected_model, expected_source+):+ """Exercise the built command, Harbor factory, and real Codex launcher together."""+ base_url = "https://gateway.example/v1" if provider == "openai-compatible" else None+ config = ProviderConfig(+ provider=provider,+ model="judge-model",+ api_key="test-key",+ base_url=base_url,+ litellm_model="openai/judge-model",+ )+ monkeypatch.setenv("OPENAI_API_KEY", "test-key")+ monkeypatch.delenv("CODEX_AUTH_JSON_PATH", raising=False)+ monkeypatch.delenv("CODEX_FORCE_AUTH_JSON", raising=False)+ if base_url:+ monkeypatch.setenv("OPENAI_BASE_URL", base_url)+ else:+ monkeypatch.delenv("OPENAI_BASE_URL", raising=False)+ monkeypatch.setattr(runner, "_harbor_supports_yes", lambda: False)+ model, source = runner._model_for_agent(+ "codex",+ cli_model=cli_model,+ config_agents={"codex": {"model": configured_model}} if configured_model else {},+ provider=config,+ )+ assert source == expected_source+ command = runner.build_harbor_run_command(+ dataset_path=tmp_path / "tasks",+ agent="codex",+ job_name="gateway-launcher",+ env_mode=mode,+ model=model,+ agent_import_path=runner._agent_import_path(config, "codex", mode),+ )++ def option_value(flag):+ return command[command.index(flag) + 1] if flag in command else None++ if mode in {"e2b", "daytona"}:+ assert option_value("--env") == mode+ assert "--environment-import-path" not in command+ agent = AgentFactory.create_agent_from_config(+ AgentConfig(+ name=option_value("-a"),+ import_path=option_value("--agent-import-path"),+ model_name=option_value("--model"),+ ),+ logs_dir=tmp_path / "logs",+ )++ class RecordingEnvironment:+ def __init__(self):+ self.commands = []++ async def exec(self, command, **kwargs):+ self.commands.append((command, kwargs.get("env") or {}))+ return ExecResult(return_code=0, stdout="", stderr="")++ environment = RecordingEnvironment()+ instruction = "quote --model gpt-5.6-sol and /tmp/codex-secrets literally"+ asyncio.run(agent.run(instruction, environment=environment, context=AgentContext()))++ launchers = [(text, env) for text, env in environment.commands if "codex exec " in text]+ assert len(launchers) == 1+ launcher, launch_env = launchers[0]+ argv = shlex.split(launcher)+ assert argv[argv.index("--model") + 1] == expected_model+ assert argv[argv.index("--") + 1] == instruction+ assert launch_env.get("OPENAI_BASE_URL") == base_url++[email protected]("model", ["azure/openai/gpt-5.6-sol", "gpt-5.6-sol"])+def test_gateway_codex_preserves_model_and_prompt(monkeypatch, tmp_path, model):+ commands = []++ async def capture(self, environment, command, **kwargs):+ commands.append(command)++ monkeypatch.setattr("harbor.agents.installed.base.BaseInstalledAgent.exec_as_agent", capture)+ agent = local_agents.SkillEvaluatorGatewayCodex(logs_dir=tmp_path, model_name=model)+ command = "codex exec --model gpt-5.6-sol --json -- 'quote --model gpt-5.6-sol literally'"+ asyncio.run(agent.exec_as_agent(object(), command, env={"OPENAI_BASE_URL": "https://example.com/v1"}))+ launcher, _, prompt = commands[0].partition(" -- ")+ assert f"--model {model} " in launcher+ assert prompt == "'quote --model gpt-5.6-sol literally'"diff --git a/tests/tier3/test_gateway_opencode.py b/tests/tier3/test_gateway_opencode.pynew file mode 100644index 00000000..eda8e7af--- /dev/null+++ b/tests/tier3/test_gateway_opencode.py@@ -0,0 +1,66 @@+# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.+# SPDX-License-Identifier: Apache-2.0++import copy+import json+import shlex++from skillevaluator.provider_config import ProviderConfig+from skillevaluator.tier3.harbor import local_agents, runner+++def test_gateway_opencode_docker_uses_chat_completions_adapter():+ provider = ProviderConfig(+ provider="openai-compatible",+ model="vendor/team/model",+ api_key="test-key",+ base_url="https://gateway.example/v1",+ litellm_model="openai/vendor/team/model",+ )+ assert runner._agent_import_path(provider, "opencode", "docker") == (+ "skillevaluator.tier3.harbor.local_agents:SkillEvaluatorGatewayOpenCode"+ )+++def test_gateway_opencode_config_preserves_model_and_uses_env_credential(monkeypatch, tmp_path):+ monkeypatch.setenv("OPENAI_BASE_URL", "https://gateway.example/v1")+ monkeypatch.setenv("OPENAI_API_KEY", "secret-must-not-be-serialized")+ assert hasattr(local_agents, "SkillEvaluatorGatewayOpenCode")+ agent = local_agents.SkillEvaluatorGatewayOpenCode(logs_dir=tmp_path, model_name="openai/vendor/team/model")+ command = agent._build_register_config_command()+ words = shlex.split(command)+ config = json.loads(words[words.index("echo") + 1])+ assert agent.model_name == "skillevaluator-gateway/vendor/team/model"+ route = config["provider"]["skillevaluator-gateway"]+ assert "vendor/team/model" in route["models"]+ assert route["npm"] == "@ai-sdk/openai-compatible"+ assert route["options"] == {"baseURL": "https://gateway.example/v1", "apiKey": "{env:OPENAI_API_KEY}"}+ assert "secret-must-not-be-serialized" not in command+ assert "openai" not in config["provider"]+++def test_gateway_opencode_route_is_owned_and_does_not_mutate_caller_config(monkeypatch, tmp_path):+ monkeypatch.setenv("OPENAI_BASE_URL", "https://gateway.example/v1")+ config = {+ "permission": {"bash": "ask"},+ "provider": {+ "skillevaluator-gateway": {+ "npm": "@ai-sdk/openai",+ "options": {"baseURL": "https://other.example", "apiKey": "wrong"},+ }+ },+ }+ before = copy.deepcopy(config)+ assert hasattr(local_agents, "SkillEvaluatorGatewayOpenCode")+ agent = local_agents.SkillEvaluatorGatewayOpenCode(+ logs_dir=tmp_path, model_name="openai/vendor/model", opencode_config=config+ )+ command = agent._build_register_config_command()+ words = shlex.split(command)+ emitted = json.loads(words[words.index("echo") + 1])+ assert config == before+ assert emitted["permission"] == {"bash": "ask"}+ route = emitted["provider"]["skillevaluator-gateway"]+ assert route["npm"] == "@ai-sdk/openai-compatible"+ assert route["options"]["baseURL"] == "https://gateway.example/v1"+ assert route["options"]["apiKey"] == "{env:OPENAI_API_KEY}"diff --git a/tests/tier3/test_judge_http_response_contract.py b/tests/tier3/test_judge_http_response_contract.pynew file mode 100644index 00000000..706c88ce--- /dev/null+++ b/tests/tier3/test_judge_http_response_contract.py@@ -0,0 +1,93 @@+# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.+# SPDX-License-Identifier: Apache-2.0++"""Exercise the standalone verifier against an endpoint that defaults to SSE."""++from __future__ import annotations++import importlib.util+import json+from http.server import BaseHTTPRequestHandler, ThreadingHTTPServer+from pathlib import Path+from threading import Thread++import pytest++[email protected]("provider", ["nv_build", "openai", "openai-compatible", "anthropic"])+def test_standalone_judge_requests_json_from_streaming_default_endpoint(monkeypatch, provider):+ template_path = Path(__file__).resolve().parents[2] / "src/skillevaluator/tier3/harbor/templates/eval.py"+ spec = importlib.util.spec_from_file_location("judge_http_response_contract", template_path)+ verifier = importlib.util.module_from_spec(spec)+ spec.loader.exec_module(verifier)+ requests = []+ judge_reply = json.dumps({"score": 1.0, "reason": "The answer matches the expected result."})++ class StreamingDefaultEndpoint(BaseHTTPRequestHandler):+ def do_POST(self):+ payload = json.loads(self.rfile.read(int(self.headers["Content-Length"])))+ requests.append({"path": self.path, "payload": payload})+ if payload.get("stream") is not False:+ # Omission is a real protocol mismatch: a single JSON parser+ # cannot consume the endpoint's default event stream.+ body = b'data: {"choices":[{"delta":{"content":"judge output"}}]}\n\ndata: [DONE]\n\n'+ content_type = "text/event-stream"+ else:+ response = (+ {"content": [{"type": "text", "text": judge_reply}]}+ if provider == "anthropic"+ else {"choices": [{"message": {"content": judge_reply}}]}+ )+ body = json.dumps(response).encode()+ content_type = "application/json"+ self.send_response(200)+ self.send_header("Content-Type", content_type)+ self.send_header("Content-Length", str(len(body)))+ self.end_headers()+ self.wfile.write(body)++ def log_message(self, _format, *_args):+ return++ for name in (+ "NVIDIA_API_KEY",+ "OPENAI_API_KEY",+ "ANTHROPIC_API_KEY",+ "SKILL_EVAL_LLM_API_KEY",+ "OPENAI_BASE_URL",+ "ANTHROPIC_BASE_URL",+ "LLM_JUDGE_MODEL",+ "SKILL_EVAL_JUDGE_MODEL",+ "LLM_JUDGE_FALLBACK_MODELS",+ ):+ monkeypatch.delenv(name, raising=False)+ monkeypatch.setenv("SKILL_EVAL_LLM_PROVIDER", provider)+ monkeypatch.setenv("SKILL_EVAL_LLM_MODEL", "test-judge")+ credential = {+ "nv_build": "NVIDIA_API_KEY",+ "openai": "OPENAI_API_KEY",+ "openai-compatible": "SKILL_EVAL_LLM_API_KEY",+ "anthropic": "ANTHROPIC_API_KEY",+ }[provider]+ monkeypatch.setenv(credential, "local-test-key")+ monkeypatch.setenv("NO_PROXY", "127.0.0.1")+ monkeypatch.setenv("no_proxy", "127.0.0.1")++ with ThreadingHTTPServer(("127.0.0.1", 0), StreamingDefaultEndpoint) as server:+ base_url = f"http://127.0.0.1:{server.server_port}/v1"+ monkeypatch.setenv(+ "SKILL_EVAL_LLM_BASE_URL", base_url + "/chat/completions" if provider == "nv_build" else base_url+ )+ worker = Thread(target=server.serve_forever, daemon=True)+ worker.start()+ try:+ result = verifier.judge_accuracy("What is two plus two?", "4", "4")+ finally:+ server.shutdown()+ worker.join(timeout=5)++ assert result["score"] == 1.0+ assert len(requests) == 1+ assert requests[0]["path"] == ("/v1/messages" if provider == "anthropic" else "/v1/chat/completions")+ assert requests[0]["payload"]["stream"] is False+ assert requests[0]["payload"]["model"] == "test-judge"diff --git a/tests/tier3/test_workflow.py b/tests/tier3/test_workflow.pynew file mode 100644index 00000000..9df4c219--- /dev/null+++ b/tests/tier3/test_workflow.py@@ -0,0 +1,610 @@+# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.+# SPDX-License-Identifier: Apache-2.0++"""Direct Tier 3 workflows preserve authored inputs and reuse evaluation."""++from __future__ import annotations++import json+from pathlib import Path++import pytest+from click.testing import CliRunner++from skillevaluator.cli import evaluate+from skillevaluator.evaluation import EvaluationService+from skillevaluator.tier3.workflow import build_tier3_workflow+++def skill(tmp_path: Path) -> Path:+ path = tmp_path / "demo-skill"+ path.mkdir()+ (path / "SKILL.md").write_text(+ "---\nname: demo-skill\ndescription: Explain how to validate a configuration.\n---\n"+ "# Demo\nValidate the configuration, then show the result.\n"+ )+ return path+++def _dataset(skill: Path, *, suffix: str = ".json") -> Path:+ directory = skill / "evals"+ directory.mkdir(exist_ok=True)+ path = directory / f"evals{suffix}"+ path.write_text(+ json.dumps(+ {+ "skill_name": skill.name,+ "evals": [+ {"id": "demo-001", "prompt": "Validate this config.", "expected_output": "Validation result."}+ ],+ }+ )+ )+ return path+++def _command():+ return build_tier3_workflow(evaluate)+++def configured(monkeypatch: pytest.MonkeyPatch) -> list:+ from skillevaluator.tier3.harbor import runner++ monkeypatch.setattr(runner, "_check_prerequisites", lambda **_kwargs: [])+ monkeypatch.setenv("SKILL_EVAL_LLM_PROVIDER", "nv_build")+ monkeypatch.setenv("NVIDIA_API_KEY", "test-key-never-sent")+ for name in ("SKILL_EVAL_LLM_MODEL", "LLM_JUDGE_MODEL", "SKILL_EVAL_JUDGE_MODEL"):+ monkeypatch.delenv(name, raising=False)+ captured = []+ monkeypatch.setattr(+ EvaluationService,+ "evaluate",+ lambda _self, options, **_kwargs: captured.append(options) or {"execution_status": "succeeded"},+ )+ return captured+++def test_direct_workflow_reuses_dataset_and_forwards_evaluation_options(skill, configured, monkeypatch):+ dataset = _dataset(skill)+ original = dataset.read_bytes()+ monkeypatch.setattr(+ EvaluationService, "create_autopilot_dataset", lambda *_args, **_kwargs: pytest.fail("must reuse")+ )+ result = CliRunner().invoke(+ _command(),+ [+ str(skill),+ "--agents",+ "opencode",+ "--skip-baseline",+ "--n-attempts",+ "3",+ "--no-agent-runtime-preflight",+ "--progress",+ "off",+ "--agent-model",+ "opencode=nvidia/nvidia/test-model",+ "--results-dir",+ str(skill.parent / "results"),+ ],+ )+ assert result.exit_code == 0, result.output+ assert dataset.read_bytes() == original+ assert configured[0].skip_baseline is True+ assert configured[0].n_attempts == 3+ assert configured[0].agent_runtime_preflight is False+ assert configured[0].agent_model == ("opencode=nvidia/nvidia/test-model",)+ assert configured[0].results_dir == skill.parent / "results"+ assert "reusing" in result.output.lower()+++def test_direct_workflow_generates_missing_dataset_then_evaluates(skill, configured, monkeypatch):+ calls = []++ def generate(self, skill_path, *, use_llm):+ calls.append(use_llm)+ return _dataset(skill_path)++ monkeypatch.setattr(EvaluationService, "create_autopilot_dataset", generate)+ result = CliRunner().invoke(_command(), [str(skill), "--progress", "off"])+ assert result.exit_code == 0, result.output+ assert calls == [True]+ assert len(configured) == 1+ assert configured[0].agents == "opencode"+ assert configured[0].skip_baseline is False+++ ("provider", "credential", "expected_agent"),+ [+ ("openai", "OPENAI_API_KEY", "codex"),+ ("anthropic", "ANTHROPIC_API_KEY", "claude-code"),+ ],+)+def test_direct_workflow_uses_the_provider_native_agent(+ skill: Path,+ monkeypatch: pytest.MonkeyPatch,+ provider: str,+ credential: str,+ expected_agent: str,+) -> None:+ from skillevaluator.tier3.harbor import runner++ _dataset(skill)+ monkeypatch.setattr(runner, "_check_prerequisites", lambda **_kwargs: [])+ monkeypatch.setenv("SKILL_EVAL_LLM_PROVIDER", provider)+ for name in ("NVIDIA_API_KEY", "OPENAI_API_KEY", "ANTHROPIC_API_KEY"):+ monkeypatch.delenv(name, raising=False)+ monkeypatch.setenv(credential, "test-key-never-sent")+ captured = []+ monkeypatch.setattr(+ EvaluationService,+ "evaluate",+ lambda _self, options, **_kwargs: captured.append(options) or {"execution_status": "succeeded"},+ )++ result = CliRunner().invoke(_command(), [str(skill), "--progress", "off"])++ assert result.exit_code == 0, result.output+ assert captured[0].agents == expected_agent+++def test_missing_provider_never_generates_dataset(skill, monkeypatch):+ monkeypatch.setenv("SKILL_EVAL_LLM_PROVIDER", "nv_build")+ monkeypatch.delenv("NVIDIA_API_KEY", raising=False)+ monkeypatch.setattr(+ EvaluationService, "create_autopilot_dataset", lambda *_args, **_kwargs: pytest.fail("must preflight")+ )+ result = CliRunner().invoke(_command(), [str(skill), "--progress", "off"])+ assert result.exit_code != 0+ assert "NVIDIA_API_KEY" in result.output+ assert not (skill / "evals").exists()++[email protected]("body", ['{"evals": []}', "{not valid JSON", '{"evals":[{"id":"a","prompt":""}]}'])+def test_invalid_existing_dataset_errors_without_overwrite(skill, configured, monkeypatch, body):+ dataset = _dataset(skill)+ dataset.write_text(body)+ monkeypatch.setattr(+ EvaluationService, "create_autopilot_dataset", lambda *_args, **_kwargs: pytest.fail("must preserve")+ )+ result = CliRunner().invoke(_command(), [str(skill), "--progress", "off"])+ assert result.exit_code != 0+ assert dataset.read_text() == body+ assert not configured+++ "options",+ [+ ["--agents", "unknown-agent"],+ ["--agent-model", "not-a-model-override"],+ ["--agent-model", "opencode=other-model"],+ ["--n-attempts", "0"],+ ["--stop-on-pass", "--n-attempts", "1"],+ ["--pass-threshold", "2"],+ ["--timeout-multiplier", "0"],+ ],+)+def test_invalid_options_error_before_generating(skill, configured, monkeypatch, options):+ monkeypatch.setattr(+ EvaluationService, "create_autopilot_dataset", lambda *_args, **_kwargs: pytest.fail("must preflight")+ )+ result = CliRunner().invoke(_command(), [str(skill), *options, "--progress", "off"])+ assert result.exit_code != 0+ assert "Error:" in result.output+ assert not (skill / "evals").exists()+ assert not configured+++def test_invalid_configuration_does_not_generate(skill, configured, monkeypatch):+ (skill / "evals").mkdir()+ config = skill / "evals" / "config.yml"+ config.write_text("schema_version: 1\nharbor:\n n_attempts: -1\n")+ monkeypatch.setattr(+ EvaluationService, "create_autopilot_dataset", lambda *_args, **_kwargs: pytest.fail("must preflight")+ )+ result = CliRunner().invoke(_command(), [str(skill), "--progress", "off"])+ assert result.exit_code != 0+ assert "n_attempts" in result.output+ assert not (skill / "evals" / "evals.json").exists()+ assert not configured+++def test_explicit_native_source_is_not_replaced_with_generated_json(skill, configured, monkeypatch):+ (skill / "evals").mkdir()+ (skill / "evals" / "config.yml").write_text("schema_version: 1\nharbor:\n task_source: native_harbor\n")+ monkeypatch.setattr(+ EvaluationService, "create_autopilot_dataset", lambda *_args, **_kwargs: pytest.fail("must preserve")+ )+ result = CliRunner().invoke(_command(), [str(skill), "--progress", "off"])+ assert result.exit_code != 0+ assert "native_harbor" in result.output+ assert not (skill / "evals" / "evals.json").exists()+++def test_direct_help_explains_generation_without_changing_expert_help():+ direct = CliRunner().invoke(_command(), ["--help"])+ expert = CliRunner().invoke(evaluate, ["--help"])+ assert direct.exit_code == 0+ assert "missing" in direct.output.lower()+ assert "--autopilot" not in direct.output+ assert "--autopilot" in expert.output+++def test_yaml_dataset_is_reused_without_json_creation(skill, configured, monkeypatch):+ dataset = _dataset(skill, suffix=".yaml")+ original = dataset.read_bytes()+ monkeypatch.setattr(+ EvaluationService, "create_autopilot_dataset", lambda *_args, **_kwargs: pytest.fail("must reuse YAML")+ )+ result = CliRunner().invoke(_command(), [str(skill), "--progress", "off"])+ assert result.exit_code == 0, result.output+ assert dataset.read_bytes() == original+ assert not (skill / "evals" / "evals.json").exists()+ assert len(configured) == 1+++def test_explicit_json_source_generates_missing_dataset(skill, configured, monkeypatch):+ (skill / "evals").mkdir()+ config = skill / "evals" / "config.yml"+ original = "schema_version: 1\nharbor:\n task_source: evals_json\n"+ config.write_text(original)+ monkeypatch.setattr(EvaluationService, "create_autopilot_dataset", lambda _self, path, **_kwargs: _dataset(path))+ result = CliRunner().invoke(_command(), [str(skill), "--progress", "off"])+ assert result.exit_code == 0, result.output+ assert config.read_text() == original+ assert len(configured) == 1+++def test_valid_native_tasks_are_reused_without_generating_json(skill, configured, monkeypatch):+ harbor = skill / "evals" / "harbor"+ case = harbor / "demo-001"+ case.mkdir(parents=True)+ (harbor / "dataset.toml").write_text('[[tasks]]\nname = "demo-001"\n')+ (case / "task.toml").write_text('version = "1.0"\n')+ (case / "instruction.md").write_text("Validate the supplied configuration.")+ (skill / "evals" / "config.yml").write_text("schema_version: 1\ngrading:\n mode: custom_only\n")+ original = {path.relative_to(skill): path.read_bytes() for path in skill.rglob("*") if path.is_file()}+ monkeypatch.setattr(+ EvaluationService, "create_autopilot_dataset", lambda *_args, **_kwargs: pytest.fail("must reuse native tasks")+ )+ result = CliRunner().invoke(_command(), [str(skill), "--progress", "off"])+ assert result.exit_code == 0, result.output+ assert {path.relative_to(skill): path.read_bytes() for path in skill.rglob("*") if path.is_file()} == original+ assert len(configured) == 1+++def test_multiple_datasets_are_rejected_unchanged(skill, configured):+ first = _dataset(skill)+ second = _dataset(skill, suffix=".yaml")+ original = (first.read_bytes(), second.read_bytes())+ result = CliRunner().invoke(_command(), [str(skill), "--progress", "off"])+ assert result.exit_code != 0+ assert "multiple eval datasets" in result.output+ assert (first.read_bytes(), second.read_bytes()) == original+ assert not configured+++def test_invalid_generated_dataset_is_not_evaluated(skill, configured, monkeypatch):+ def generate(_self, path, **_kwargs):+ _dataset(path).write_text('{"evals": []}')++ monkeypatch.setattr(EvaluationService, "create_autopilot_dataset", generate)+ result = CliRunner().invoke(_command(), [str(skill), "--progress", "off"])+ assert result.exit_code != 0+ assert "empty" in result.output+ assert not configured+++def test_generation_uses_existing_deterministic_fallback_on_model_failure(skill, configured, monkeypatch):+ from skillevaluator.tier3 import generate_dataset++ async def unavailable(*_args, **_kwargs):+ raise RuntimeError("model is unavailable")++ monkeypatch.setattr(generate_dataset, "_generate_with_llm", unavailable)+ result = CliRunner().invoke(_command(), [str(skill), "--progress", "off"])+ assert result.exit_code == 0, result.output+ dataset = json.loads((skill / "evals" / "evals.json").read_text())+ assert len(dataset["evals"]) == 1+ assert "falling back" in result.output.lower()+ assert len(configured) == 1+++def test_symlinked_evals_directory_is_rejected_without_writes(skill, configured, tmp_path):+ target = tmp_path / "outside-evals"+ target.mkdir()+ (skill / "evals").symlink_to(target, target_is_directory=True)+ result = CliRunner().invoke(_command(), [str(skill), "--progress", "off"])+ assert result.exit_code != 0+ assert "real directory" in result.output+ assert list(target.iterdir()) == []+ assert not configured+++def test_runtime_credential_failure_precedes_dataset_generation(skill, configured, monkeypatch):+ monkeypatch.setenv("SKILL_EVAL_LLM_PROVIDER", "anthropic")+ monkeypatch.setenv("ANTHROPIC_API_KEY", "test-key-never-sent")+ monkeypatch.delenv("OPENAI_API_KEY", raising=False)+ monkeypatch.setattr(+ EvaluationService, "create_autopilot_dataset", lambda *_args, **_kwargs: pytest.fail("must preflight agent")+ )+ result = CliRunner().invoke(_command(), [str(skill), "--agents", "codex", "--progress", "off"])+ assert result.exit_code != 0+ assert not (skill / "evals").exists()+ assert not configured+++def test_invalid_resource_override_does_not_generate(skill, configured, monkeypatch):+ monkeypatch.setattr(+ EvaluationService, "create_autopilot_dataset", lambda *_args, **_kwargs: pytest.fail("must preflight resources")+ )+ result = CliRunner().invoke(_command(), [str(skill), "--override-cpus", "-1", "--progress", "off"])+ assert result.exit_code != 0+ assert "Error:" in result.output+ assert not (skill / "evals").exists()+ assert not configured+++def test_file_target_fails_before_dataset_preparation(skill, configured, monkeypatch):+ monkeypatch.setattr(+ EvaluationService, "create_autopilot_dataset", lambda *_args, **_kwargs: pytest.fail("must reject file")+ )+ result = CliRunner().invoke(_command(), [str(skill / "SKILL.md"), "--progress", "off"])+ assert result.exit_code != 0+ assert "Error:" in result.output+ assert not configured++[email protected]("configured_include", [False, True])+def test_included_skills_need_group_mode_before_preparation(skill, configured, monkeypatch, configured_include):+ from skillevaluator.tier3 import workflow++ options = ["--include-skills", str(skill)]+ if configured_include:+ (skill / "evals").mkdir()+ (skill / "evals" / "config.yml").write_text(f"schema_version: 1\nskill_workspace:\n include:\n - {skill}\n")+ options = []+ monkeypatch.setattr(workflow, "_prepare_dataset", lambda *_args, **_kwargs: pytest.fail("must preflight include"))+ result = CliRunner().invoke(_command(), [str(skill), *options, "--progress", "off"])+ assert result.exit_code != 0+ assert "include_skills requires" in result.output+ assert not configured+++def test_unavailable_environment_fails_before_generation(skill, configured, monkeypatch):+ from skillevaluator.tier3.harbor import runner++ monkeypatch.setattr(runner, "_check_prerequisites", lambda **_kwargs: ["Docker Compose v2 is required"])+ monkeypatch.setattr(+ EvaluationService,+ "create_autopilot_dataset",+ lambda *_args, **_kwargs: pytest.fail("must preflight environment"),+ )+ result = CliRunner().invoke(_command(), [str(skill), "--progress", "off"])+ assert result.exit_code != 0+ assert "Docker Compose" in result.output+ assert not (skill / "evals").exists()+ assert not configured++[email protected]("relative", ["evals.json", "config.yml", "harbor/case/task.toml"])+def test_linked_evaluator_inputs_are_rejected_without_reading(skill, configured, monkeypatch, tmp_path, relative):+ outside = tmp_path / "private-file"+ outside.write_text("private contents must never be parsed")+ linked = skill / "evals" / relative+ linked.parent.mkdir(parents=True)+ linked.symlink_to(outside)+ monkeypatch.setattr(+ EvaluationService, "create_autopilot_dataset", lambda *_args, **_kwargs: pytest.fail("must reject unsafe input")+ )+ result = CliRunner().invoke(_command(), [str(skill), "--progress", "off"])+ assert result.exit_code != 0+ assert "symlink" in result.output.lower() or "non-linked" in result.output.lower()+ assert "private contents" not in result.output+ assert not configured+++def test_fifo_dataset_is_rejected_without_blocking(skill, configured):+ import os+ import subprocess+ import sys++ (skill / "evals").mkdir()+ os.mkfifo(skill / "evals" / "evals.json")+ command = (+ "from skillevaluator.cli import evaluate; "+ "from skillevaluator.tier3.workflow import build_tier3_workflow; "+ "build_tier3_workflow(evaluate).main()"+ )+ result = subprocess.run(+ [sys.executable, "-c", command, str(skill)], capture_output=True, text=True, timeout=5, check=False+ )+ assert result.returncode != 0+ assert "regular non-linked file" in result.stderr.lower()+ assert not configured+++def test_hardlinked_dataset_is_rejected(skill, configured, tmp_path):+ import os++ dataset = _dataset(skill)+ os.link(dataset, tmp_path / "second-link")+ result = CliRunner().invoke(_command(), [str(skill), "--progress", "off"])+ assert result.exit_code != 0+ assert "non-linked" in result.output.lower() or "hard-linked" in result.output.lower()+ assert not configured+++def test_included_skill_with_group_mode_is_preserved(skill, configured, monkeypatch):+ _dataset(skill)+ result = CliRunner().invoke(+ _command(),+ [+ str(skill),+ "--include-skills",+ str(skill),+ "--skill-workspace-mode",+ "group",+ "--progress",+ "off",+ ],+ )+ assert result.exit_code == 0, result.output+ assert configured[0].include_skills == (skill,)+ assert configured[0].skill_workspace_mode == "group"++[email protected]("include_source", ["cli", "config", "both"])+def test_relative_included_skills_keep_cli_and_config_path_bases(skill, configured, monkeypatch, include_source):+ _dataset(skill)+ caller = skill.parent / "caller"+ caller.mkdir()+ cli_helper = caller / "cli-helper"+ config_helper = skill.parent / "config-helper"+ for helper in (cli_helper, config_helper):+ helper.mkdir()+ (helper / "SKILL.md").write_text("# Helper\n")+ config = skill / "evals" / "config.yml"+ config_body = "schema_version: 1\nskill_workspace:\n mode: group\n"+ if include_source in {"config", "both"}:+ config_body += " include:\n - config-helper\n"+ config.write_text(config_body)+ monkeypatch.chdir(caller)+ options = ["--include-skills", "./cli-helper"] if include_source in {"cli", "both"} else []++ result = CliRunner().invoke(_command(), [str(skill), *options, "--progress", "off"])++ assert result.exit_code == 0, result.output+ assert len(configured) == 1+ assert configured[0].include_skills == ((Path("cli-helper"),) if options else ())+ assert config.read_text() == config_body+++def test_remote_authentication_preflight_is_deferred(skill, configured, monkeypatch):+ from skillevaluator.tier3 import workflow+ from skillevaluator.tier3.harbor import runner++ monkeypatch.setattr(runner, "_check_prerequisites", lambda **_kwargs: pytest.fail("must not make remote RPC"))+ for mode in ("cwsandbox", "wandb", "langsmith"):+ workflow._preflight_environment({"env_mode": mode, "agents": "codex"})+ assert not configured++[email protected]("with_evals", [False, True])+def test_legacy_dataset_requires_migration_before_any_read(skill, configured, monkeypatch, with_evals):+ from skillevaluator.tier3 import workflow++ legacy = skill / "eval"+ legacy.mkdir()+ (legacy / "dataset.json").write_text("legacy marker must not be parsed")+ if with_evals:+ (skill / "evals").mkdir()+ monkeypatch.setattr(workflow, "_preflight_options", lambda *_args: pytest.fail("legacy source must be rejected"))+ result = CliRunner().invoke(_command(), [str(skill), "--progress", "off"])+ assert result.exit_code != 0+ assert "eval/dataset" in result.output+ assert "evals/evals" in result.output+ assert not configured++[email protected]("relative", ["SKILL.md", "evals/EVAL.md"])[email protected]("kind", ["symlink", "hardlink", "fifo"])+def test_unsafe_generation_inputs_are_rejected(skill, configured, monkeypatch, tmp_path, relative, kind):+ import os++ outside = tmp_path / "outside-guidance"+ outside.write_text("private marker must never reach the generator")+ target = skill / relative+ target.parent.mkdir(exist_ok=True)+ target.unlink(missing_ok=True)+ if kind == "symlink":+ target.symlink_to(outside)+ elif kind == "hardlink":+ os.link(outside, target)+ else:+ os.mkfifo(target)+ monkeypatch.setattr(+ EvaluationService,+ "create_autopilot_dataset",+ lambda *_args, **_kwargs: pytest.fail("must reject generation input"),+ )+ result = CliRunner().invoke(_command(), [str(skill), "--progress", "off"])+ assert result.exit_code != 0+ assert "regular non-linked file" in result.output+ assert "private marker" not in result.output+ assert not configured+++def test_linked_skill_root_is_rejected(skill, configured, tmp_path):+ alias = tmp_path / "linked-skill"+ alias.symlink_to(skill, target_is_directory=True)+ _dataset(skill)+ result = CliRunner().invoke(_command(), [str(alias), "--progress", "off"])+ assert result.exit_code != 0+ assert "real directory" in result.output+ assert not configured+++def test_legacy_fifo_is_rejected_without_blocking(skill, configured):+ import os+ import subprocess+ import sys++ (skill / "eval").mkdir()+ os.mkfifo(skill / "eval" / "dataset.json")+ command = (+ "from skillevaluator.cli import evaluate; "+ "from skillevaluator.tier3.workflow import build_tier3_workflow; "+ "build_tier3_workflow(evaluate).main()"+ )+ result = subprocess.run(+ [sys.executable, "-c", command, str(skill)], capture_output=True, text=True, timeout=5, check=False+ )+ assert result.returncode != 0+ assert "eval/dataset" in result.stderr+ assert "evals/evals" in result.stderr+++def test_missing_optional_runtime_has_install_guidance(skill, configured, monkeypatch):+ from skillevaluator.tier3 import workflow++ def missing_runtime(*_args):+ raise ModuleNotFoundError("No module named 'harbor'")++ monkeypatch.setattr(workflow, "_preflight_options", missing_runtime)+ result = CliRunner().invoke(_command(), [str(skill), "--progress", "off"])+ assert result.exit_code != 0+ assert "Install skillevaluator[tier3]" in result.output+ assert "Traceback" not in result.output+ assert not (skill / "evals").exists()+ assert not configured+++def test_duplicate_agent_model_aliases_fail_before_generation(skill, configured, monkeypatch):+ monkeypatch.setattr(+ EvaluationService,+ "create_autopilot_dataset",+ lambda *_args, **_kwargs: pytest.fail("must preflight all overrides"),+ )+ result = CliRunner().invoke(+ _command(),+ [+ str(skill),+ "--agents",+ "claude-code",+ "--agent-model",+ "claude-code=nvidia/valid-model",+ "--agent-model",+ "claude=invalid-later-model",+ "--progress",+ "off",+ ],+ )+ assert result.exit_code != 0+ assert "same agent" in result.output+ assert not (skill / "evals").exists()+ assert not configureddiff --git a/tests/validators/test_security.py b/tests/validators/test_security.pyindex 91127392..3cb6dbec 100644--- a/tests/validators/test_security.py+++ b/tests/validators/test_security.py@@ -3859,7 +3859,7 @@ Call us at 555-123-4567 or +1-555-987-6543assert child_env["OPENAI_API_KEY"] == public_keyassert child_env["OPENAI_BASE_URL"] == "https://integrate.api.nvidia.com/v1"assert child_env["SKILLSPECTOR_PROVIDER"] == "openai"- assert child_env["SKILLSPECTOR_MODEL"] == "nvidia/nemotron-3-nano-30b-a3b"+ assert child_env["SKILLSPECTOR_MODEL"] == "nvidia/nemotron-3-super-120b-a12b"assert "NVIDIA_API_KEY" not in child_envassert "ANTHROPIC_API_KEY" not in child_envassert retired_name not in child_envdiff --git a/tests/validators/test_similarity.py b/tests/validators/test_similarity.pyindex 028fd488..d738f549 100644--- a/tests/validators/test_similarity.py+++ b/tests/validators/test_similarity.py@@ -233,6 +233,24 @@ class TestValidateConfigError:assert not result.passedassert any("API key" in e for e in result.errors)+ assert result.status == "incomplete"+ assert result.incomplete_scans == ["embedding-provider"]+ assert result.findings == []++ @patch("skillevaluator.validators.similarity.EmbeddingRegistry")+ @patch("skillevaluator.validators.similarity.EmbeddingClient")+ def test_invalid_catalog_is_not_reclassified_as_provider_failure(+ self, _mock_client_cls, mock_registry_cls, tmp_path: Path+ ) -> None:+ catalog = tmp_path / "catalog.json"+ catalog.write_text("{}")+ mock_registry_cls.return_value.load_catalog.side_effect = ValueError("Catalog model mismatch")++ result = SimilarityValidator(content_type="skill", catalog_path=catalog).validate(tmp_path)++ assert result.status == "failed"+ assert result.incomplete_scans == []+ assert result.errors == ["Catalog model mismatch"]class TestValidateCacheWorkflow: