Repository navigation
fix(tier3): report missing tools as environment problems, not skill defects - #379
Conversation
…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
left a comment
There was a problem hiding this comment.
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.
Signed-off-by: Christopher Kevin <[email protected]>
Signed-off-by: Christopher Kevin <[email protected]>
SkillEvaluator CI resultsRequired gate: Skipped Only Tier 1 blocks CI; Tier 2 and Tier 3 are advisory.
Commit: |
…sing-tool-env Signed-off-by: Christopher Kevin <[email protected]> # Conflicts: # CHANGELOG.md
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_kindfaultdeclared_dependency_unavailablescripts/apt-packages.txtorscripts/requirements.txtbut is not installedundeclared_dependencyagent_tool_choicemissing_skill_filecommand_errorMissing 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_faults/environment_issuesare reported separately, each withmissing,missing_kind, andguidance).error_recoveryasstatus: "environment_invalid".score_skill_executionthen 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 anEvaluation 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.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_contextkeyword oncheck_error_recovery/score_skill_execution). Report fail reasons and improvement suggestions label these[environment]and point to dependency files orevals/environment/Dockerfileinstead of skill changes. Docs explain where to declare dependencies and that a custom Dockerfile disables auto-install of the dependency files.Verification
make lintmake testmake buildDetails:
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. Verifiermain()and collector tests cover the unscored sidecar and the reported reason.13002 passed, 57 skipped. Full suite: the same 47 failures as a cleanorigin/mainrun on the same machine (git remote/proxy-sensitive and same-inode tests), no new failures.python:3.12-slimwithjqabsent: capturedbash: line 1: jq: command not found(exit 127) andsh: 1: jq: not found; fed through the shared check they givedeclared_dependency_unavailablewhenjqis inapt-packages.txt,undeclared_dependencywhen only the skill text uses it, andagent_tool_choiceotherwise. Provisioned control (after installingjq): the command succeeds and nothing is flagged (score 1.0, no environment issues). Also capturedModuleNotFoundError: No module named '...'for a missing module.Release Impact
CHANGELOG.md