feat(cli): add JSON task validation output - #253
Open
steven-ji wants to merge 1 commit into
Open
Conversation
|
@steven-ji is attempting to deploy a commit to the Compounding Intelligence Team on Vercel. A member of the Team first needs to authorize it. |
steven-ji
marked this pull request as ready for review
August 25, 2026 06:22
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.
Motivation
Issue #242 proposes frontend-independent task validation that CLI, TUI, and
future web clients can share. PRs #249 and #250 added structured diagnostics
and a reusable validation runner, but scripts still have to parse the
human-oriented
coral validateoutput.This PR exposes the existing structured result through an additive
--jsonflag so tools and future frontends can consume validation results directly.
Refs #242.
Changes
coral validate <path> --jsonand document it in CLI help.ValidationRunResultcontaining diagnostics, progressevents, the baseline score, and any structured failure.
the existing text output when the flag is absent.
0for successful validation and1for validationfailures in both output modes.
output, and legacy text-output compatibility.
Migration: this is an additive optional flag. Existing
coral validatecommands and their text output are unchanged, so no migration is required.
This PR does not add a TUI framework, change the validation result schema, or
modify the validation runner.
Authored with assistance from Codex. The submitting human reviewed the changed
files and confirmed the behavior before publication.
Test plan
uv run pytest tests/test_validation.py -v— 26 passed.uv run pytest tests/ -v— 715 passed, 1 skipped.uv run ruff check .— passed.uv run ruff format --check .— 139 files already formatted.uv run mypy --follow-imports=skip coral/cli/author.py— passed.git diff --check upstream/dev...HEAD— passed.Affected areas
coral/agent/(runtime, manager, heartbeat, warmstart)coral/grader/(daemon, TaskGrader, subprocess grader, loader)coral/hub/(attempts, notes, skills, checkpoint)coral/workspace/(project setup, worktrees, grader env)coral/cli/(commands, helpers)coral/hooks/(post_commit / submit_eval)coral/template/(CORAL.md, bundled skills/agents)coral/gateway/(LiteLLM gateway)coral/web/(dashboard)examples/(new or modified task)docs/(docs site)Checklist
devbranch (notmain).feat:,fix:,docs:,refactor:, ...).uv run pytest tests/ -vpasses locally.uv run ruff check .anduv run ruff format --check .pass.tests/for any behavior change.docs/content/, README, or relevant skill under.claude/skills/) for any user-visible or contract change.examples/<task>/:coral validate <task>succeeds and a smoke run produces at least one finalized score. No hidden answer keys committed underseed/. (Not applicable; no new example.)