ci(validate-task): validate the claw-eval suite, which the job never saw - #334
Open
vaibhavdabas16 wants to merge 1 commit into
Open
ci(validate-task): validate the claw-eval suite, which the job never saw#334vaibhavdabas16 wants to merge 1 commit into
vaibhavdabas16 wants to merge 1 commit into
Conversation
The workflow's paths filter listed test-cases/**/task.json. claw-eval stores one flat file per task -- test-cases/claw-eval/ce-T046-cve-research.json and 18 siblings -- which that pattern never matches, so editing or adding a claw-eval task ran no schema validation at all. The suite is a first-class --cases-suite target and is offered in the TUI, so a malformed task there fails at run time instead of at review time. The issue supposes the gap is the trigger. It is not only the trigger: every selection rule inside the job was task.json-only as well, so broadening `paths:` alone would have made the workflow fire and still validate nothing. All four had to change: - the pull_request/push `paths:` filter - the workflow_dispatch fallback, `find test-cases -path "*/task.json"` - the schema-changed glob, `test-cases/**/task.json` - the per-changed-path test, `if path.name == "task.json"` Scope, stated plainly: claw-eval was not entirely unchecked. tests/ test_host_tasks.py parametrises over CASE_SUITES and does glob flat files, but it calls validate_task_data(), which only checks instruction, eval_schema. url_pattern, eval_schema.method and time_limit. The full task.schema.json validation and the extra_info path-existence check never reached claw-eval. The job's logic moves to scripts/ci/validate_tasks.py, beside the existing scripts/ci/check_markdown_links.py. It was a heredoc inside YAML, where nothing could exercise it -- which is why four copies of the same wrong rule went unnoticed. is_task_file() now names both layouts in one place and is tested directly. Two things fixed while extracting: - Paths are re-rooted at test-cases/ before matching, so an absolute path behaves like the repo-relative ones git reports. The previous rule tested parts[0] == "test-cases", so any absolute path silently matched nothing. - --all no longer lists every task as "changed JSON" too, which double-reported a broken file. All 19 claw-eval tasks validate cleanly against task.schema.json today, so this turns the job on without turning it red. tests/test_validate_tasks_script.py covers both layouts, the non-tasks that must not be validated as tasks (the schema itself, extra_info payloads), deleted paths, extra_info ownership, a schema change fanning out to the whole corpus, and the trigger. Six of its twenty fail against the previous rules, checked by restoring them and holding the tests constant. Fixes TIGER-AI-Lab#292.
Perry2004
requested changes
Sep 1, 2026
Perry2004
left a comment
Collaborator
There was a problem hiding this comment.
Thanks for the contribution. Though I'd suggest an alternative approach:
- Instead of changing the workflow it's better to use this chance to re-organize the claw-eval port's structure. It should go with the standard
test-cases/claw-eval/<task-identifier>/task.jsonstructure as native ClawBench tasks. - After the structure change we can then simplify the TUI and batch discovery logic to a standard
task.jsonsearch. - I believe there's no need for extracting the json schema validation logic to a separate script and add tests on it given the simplicity of the logic.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Fixes #292.
The workflow's
paths:filter listedtest-cases/**/task.json. claw-eval stores one flat file per task —test-cases/claw-eval/ce-T046-cve-research.jsonand 18 siblings — which that pattern never matches. Editing or adding a claw-eval task ran no schema validation at all.It is not only the trigger
The issue supposes "the gap is the trigger". It isn't only that — every selection rule inside the job was
task.json-only too, so broadeningpaths:alone would have made the workflow fire and still validate nothing. Four places had to change:pull_request/pushfiltertest-cases/**/task.jsonworkflow_dispatchfallbackfind test-cases -path "*/task.json"repo.glob("test-cases/**/task.json")if path.name == "task.json"Scope, stated plainly
claw-eval was not entirely unchecked, and the issue's impact line slightly overstates it.
tests/test_host_tasks.pyparametrises overCASE_SUITESand its_task_files_for_suitedoes glob flat files — but it callsvalidate_task_data(), which checks onlyinstruction,eval_schema.url_pattern,eval_schema.methodandtime_limit(run_support/task.py:246-265). The fulltask.schema.jsonvalidation and theextra_infopath-existence check never reached claw-eval. That is the actual gap, and it is narrower than "no validation".Why the logic moved to a script
The job's Python lived in a heredoc inside the YAML, where nothing could exercise it — which is precisely how four copies of the same wrong rule went unnoticed. It moves to
scripts/ci/validate_tasks.py, beside the existingscripts/ci/check_markdown_links.py, andis_task_file()now states both layouts in one place and is tested directly.Flagging this as a judgment call: it makes the diff bigger than a one-line filter change. I think it's warranted — an untestable rule is what let this survive — but say the word and I'll inline it back and keep only the four rule fixes.
Two things fixed while extracting:
test-cases/before matching, so an absolute path behaves like the repo-relative ones git reports. The old rule testedparts[0] == "test-cases", so any absolute path silently matched nothing — a live trap for the--allpath.--allno longer lists every task as "changed JSON" as well, which double-reported a broken file.All 19 claw-eval tasks validate cleanly against
task.schema.jsontoday, so this turns the job on without turning it red. Worth confirming explicitly — a trigger fix that surfaced 19 broken tasks would be a different PR.Corpus
CI and tooling only. No task data is modified — the point is that existing task data finally gets checked.
Test plan
tests/test_validate_tasks_script.py, 20 tests: both corpus layouts recognised; the non-tasks that must not be validated as tasks (the schema itself,extra_infopayloads, per-suite reports, non-JSON); deleted paths (agit difflists deletions, and validating a vanished path would fail the job on a legitimate task removal);extra_infoownership; a schema change fanning out to all four suites; absolute vs relative paths; a malformed task actually being reported; and the workflow trigger itself.*/task.json-only rules — in both the script and thepaths:filter — held the tests constant, and re-ran: 6 of the 20 fail, including the two that name the bug (test_the_flat_suite_is_actually_discovered,test_the_workflow_trigger_matches_flat_suite_files).python scripts/ci/validate_tasks.py --allrun locally: the 19 claw-eval tasks pass. The only errors reported are the 20 v1-litetask.jsonfiles, which are git symlinks (mode120000) that this Windows checkout materialises as text — the same known local artifact behind the deselection below, green on Linux.test_host_tasks.py::test_checked_task_json_files_parse_and_validate, the same Windows symlink artifact.ruff check/ruff format --checkclean, no new findings anywhere.pyright --pythonplatform Linuxclean onsrc/clawbench,tests, and the new script (which CI's pyright config does not cover, checked anyway).jsonschemais already a dev dependency and already imported bytests/test_harness_registry.py, so the new test adds no dependency to the pytest job.mainand against all six of my other open PRs.Not verified: GitHub evaluates
paths:filters server-side, so the trigger change is asserted against the workflow file rather than observed firing. The first push that touches only a claw-eval task will be the real proof.Related issues
Fixes #292.