Skip to content

fix(tier3): report missing tools as environment problems, not skill defects - #379

Merged
chrisknvidia merged 4 commits into
mainfrom
feat/christopherk/missing-tool-env
Nov 10, 2026
Merged

chrisknvidia merged 4 commits into
mainfrom
feat/christopherk/missing-tool-env

Conversation

@chrisknvidia

Copy link
Copy Markdown
Collaborator

Summary

A missing tool or Python module during a Tier 3 run was attributed to the skill by error-message keywords (not found, missing, config, ModuleNotFoundError, ...), so an evaluation-environment problem lowered the skill's score as a "skill defect". This change classifies each failed command from its structured diagnostic and the skill's declared dependencies:

fault_kind fault When
declared_dependency_unavailable environment The missing executable/module is listed in the skill's scripts/apt-packages.txt or scripts/requirements.txt but is not installed
undeclared_dependency environment The skill uses it (SKILL.md/scripts mention it, or the command runs the skill's script) but no dependency file declares it
agent_tool_choice agent The agent reached for a tool the skill doesn't use
missing_skill_file skill A path inside the skill's own directory (or the expected script) does not exist — still a real skill defect
command_error agent Any other failure

Missing names are parsed from shell/Python diagnostics (bash: line 1: jq: command not found, sh: 1: jq: not found, zsh: command not found: X, env: 'X': No such file or directory, exec: "X": executable file not found in $PATH, ModuleNotFoundError: No module named 'X'). The keyword-only skill attribution is removed.

Scoring:

  • Environment failures never count as skill or agent faults (environment_faults / environment_issues are reported separately, each with missing, missing_kind, and guidance).
  • A recovered environment failure (the agent installed the tool and retried) carries no deduction.
  • An unrecovered environment failure marks error_recovery as status: "environment_invalid". score_skill_execution then returns no score, the packaged verifier writes an unscored diagnostic (evaluation_status: "failed", evaluation_errors.environment), skips the LLM judges and exits nonzero, and the collector records the trial as UNSCORED with an Evaluation environment invalid: [environment] ... reason naming the tool and where to declare or install it. The case is excluded from skill score averages instead of scored zero.
  • Real unrecovered skill/agent failures still score zero; recovered skill-file defects keep the 0.25 deduction.

The verifier reads the staged skill's dependency files and SKILL.md/scripts text with bounded reads (1 MiB total, 128 KiB per file, 4,096 entries, no symlinks). Host checks and the packaged verifier share the same implementation (dependency_context keyword on check_error_recovery / score_skill_execution). Report fail reasons and improvement suggestions label these [environment] and point to dependency files or evals/environment/Dockerfile instead of skill changes. Docs explain where to declare dependencies and that a custom Dockerfile disables auto-install of the dependency files.

Verification

  • I am familiar with the Contributing Guidelines
  • Added or updated focused tests
  • Updated documentation for user-visible changes
  • Ran make lint
  • Ran make test
  • Ran make build
  • Did not add credentials, private datasets, or proprietary benchmark content

Details:

  • tests/tier3/test_error_recovery.py (host/verifier parity fixture) covers each fault kind, declared vs undeclared vs agent choice vs skill file, recovered vs unrecovered environment failures, and existing real-failure behavior. Verifier main() and collector tests cover the unscored sidecar and the reported reason.
  • Tier 3/Harbor tests: 13002 passed, 57 skipped. Full suite: the same 47 failures as a clean origin/main run on the same machine (git remote/proxy-sensitive and same-inode tests), no new failures.
  • Real container check in python:3.12-slim with jq absent: captured bash: line 1: jq: command not found (exit 127) and sh: 1: jq: not found; fed through the shared check they give declared_dependency_unavailable when jq is in apt-packages.txt, undeclared_dependency when only the skill text uses it, and agent_tool_choice otherwise. Provisioned control (after installing jq): the command succeeds and nothing is flagged (score 1.0, no environment issues). Also captured ModuleNotFoundError: No module named '...' for a missing module.
  • No full live Tier 3 agent run was done for this change.

Release Impact

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

…efects

Classify declared and skill-used missing dependencies as environment issues. Leave unrecovered environment-invalid trials unscored, preserve real failure penalties, and document dependency installation guidance.

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

@rng1995 rng1995 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

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

Checked the new failure classification in checks.py (diagnostic parsing, the declared/used rules, the environment_invalid early return), the verifier and collector unscored path, and the docs and CHANGELOG claims against real bash, dash and Python subprocess diagnostics.
Tests at the PR head: test_error_recovery.py, test_judge_failure_artifacts.py and test_harbor_unscored_grading_policy.py (834 passed), plus the existing tests of the changed checks code (codex tool-call normalization, skill activation scoring, failed skill reads, script invocation evidence, log converters, negative-control invocation evidence: 2647 passed). The findings were reproduced with unit probes against check_error_recovery/score_skill_execution and with end-to-end verifier main() probes on a copy of the PR tree.
Merge with main: no conflicts.
Other open PRs: CHANGELOG.md only (#376, #380). #380 also edits the suggestions prompt in harbor/report.py _generate_suggestions_structured; the two instructions are compatible. The overlaps in templates/eval.py (#382), checks.py (#225) and collector.py (#384, #385) are in different hunks with no behaviour clash.

@github-actions

github-actions Bot commented Nov 10, 2026 •

Copy link
Copy Markdown

Evaluation run

SkillEvaluator CI results

Required gate: Skipped

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

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

Commit: f67a0bd7b886cb357cde558ba5eb33a74870a7c4 · Environment: docker

…sing-tool-env

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

# Conflicts:
#	CHANGELOG.md
@chrisknvidia
chrisknvidia merged commit a41d5a7 into main Nov 10, 2026
26 checks passed
@chrisknvidia
chrisknvidia deleted the feat/christopherk/missing-tool-env branch November 10, 2026 04:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants