feat(cli): add deterministic task preflight checks - #590
Open
ChinmayK0607 wants to merge 6 commits into
Open
Conversation
Embed environment, task, grader, and reward validation in existing task and sync commands so broken definitions fail before rollout or upload. Co-authored-by: Cursor <cursoragent@cursor.com>
Apply the documented task/ prefix consistently across local, attached, and deployed task commands.
…d-deterministic-checks
Run full source checks before task sync and reject invalid grader results in the normal task lifecycle, so deterministic failures surface in their owning commands.
Normalize deployed environment references consistently, gate HUD runtime commands on authentication, and simplify task validation without exposing internal tracebacks.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit a6e021f. Configure here.
Only normalize environment names during task sync so uppercase and brace-wrapped registry UUIDs keep resolving through the ID path.
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 changed
hud task list,start, andgrade, including deployed environments, canonical environment names, and consistenttask/references.hud task grade --dry-runfor environment, task, grader, and reward checks. Normal grading also rejects malformed or out-of-range rewards.hud sync tasks, including verifier task IDs.hud eval, documentedhud deployas the build-and-publish path, and added regression coverage. There are no UI changes.Why
Deterministic lifecycle failures were discovered only after task upload or rollout. The previous standalone checker duplicated execution lifecycle code and included nondeterministic agent behavior beyond this requirement. These checks now live in the existing commands that own each lifecycle stage.
Impact
Environment and task authors can catch invalid build sources, missing deployed tasks, startup failures, broken graders, and malformed rewards before syncing or running agent evaluations. CI can use existing command exit statuses without adopting a separate QA protocol.
Validation
uv --no-config run pytest -q(1122 passed, 17 deselected)uv --no-config run ruff check .uv --no-config run ruff format . --checkuv --no-config run --extra dev --extra train --extra modal --extra daytona ty checkNote
Medium Risk
Touches CLI task execution, platform env lookup, and sync/deploy gates. Failures now block uploads and grading, so false positives could stall CI, but this is not auth or data-path logic.
Overview
Adds deterministic preflight to existing CLI commands so authors catch missing tasks, broken graders, and junk sources before sync or agent evals.
hud task start/grade/listcan attach to a deployed env (--env) or a live control channel, and they verify the live environment actually exposes the requested task.hud task grade --dry-runwalks env → task → grader → reward (empty answer); a low but in-range score still passes. Normal grading now rejects non-finite or out-of-range rewards.hud sync tasksvalidates local source and deployed manifests (including verifier task ids) before upload. Source validation also rejects.DS_Store,__MACOSX, and broken symlinks, whichhud deployalready runs viaEnvironmentSource.validate(). Shared spawn/resolution lives intask_runtime.py.Reviewed by Cursor Bugbot for commit 72480b9. Bugbot is set up for automated code reviews on this repo. Configure here.