fix(validate): respect output flags for runtime validation - #1187
Conversation
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default 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 5289f72. Configure here.
|
Hey @burtenshaw, could you take a look at this PR when you get a chance? Would appreciate a review. Thanks! |
There was a problem hiding this comment.
The runtime CLI behavior is now covered and the focused suite passes locally (16/16); changed-file usort, Ruff format/check, and git diff --check are clean. One contract issue remains before merge, and exact-head repository workflows are still awaiting maintainer approval.
Sent by Cursor Automation: Release
There was a problem hiding this comment.
Re-reviewed at head 98c9532e. My earlier change request is resolved — I am no longer blocking this.
The contract concern was that widening openenv.validation.write_report() to accept arbitrary legacy dictionaries would make the exported RFC 008 serializer's schema-versioned promise false. d07abd89 fixes that the right way: the diff now touches only src/openenv/cli/commands/validate.py and tests/test_cli/test_validate.py, the public serializer stays typed to ValidationReport, and the runtime-probe dictionary is serialized by the private _write_runtime_report helper inside the CLI. _render_report accepting a dict is additive and leaves the typed path unchanged.
Verified at this exact head on Python 3.12: tests/test_cli/test_validate.py 17 passed, tests/test_validation 103 passed, and usort / ruff format --check / ruff check clean on both changed files. Cursor Bugbot passes.
What still gates the merge is not code: repository CI (test on 3.11 and 3.12, lint, Package CI, docs) has never run on this PR because the workflows need a maintainer to approve the run for an external contributor. Once those are green this is merge-ready from my side.
This is not in the 0.5.0 candidate (#1190) since it has no repository CI yet, so it is not holding the release.
Sent by Cursor Automation: Release
|
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update. |



Summary
Fixes runtime
openenv validateto respect--jsonand--outputwhen validating a running server URL.Type of Change
Alignment Checklist
.claude/docs/PRINCIPLES.mdand this PR aligns with our principles.claude/docs/INVARIANTS.mdand no invariants are violated/pre-submit-pr(orbash .claude/hooks/lint.shand tests) and addressed all issuesRFC Status
Changes
write_report().--jsonfor runtime validation output.--jsonis not provided.--outputwrite failures consistently with local validation.Test Plan
PYTHONPATH=src:envs pytest tests/test_cli/test_validate.py -q— 15 passedruff check src/openenv/cli/commands/validate.py src/openenv/validation/report.py tests/test_cli/test_validate.pyruff format --check src/openenv/cli/commands/validate.py src/openenv/validation/report.py tests/test_cli/test_validate.pyusort check src/openenv/cli/commands/validate.py src/openenv/validation/report.py tests/test_cli/test_validate.pygit diff --checkClaude Code Review
N/A
Closes #1186
Note
Low Risk
CLI-only output behavior for URL runtime validation; no changes to validation logic or local package paths beyond shared report rendering.
Overview
Runtime
openenv validate(URL /--url) no longer always prints raw JSON. It now mirrors local validation:--jsonprints the report as JSON,--outputwrites that JSON to a file (still showing human-readable text on stdout when--jsonis off), and the default is a formatted text report._render_reportaccepts runtime report dicts and prints profile, standard version, per-criterion PASS/FAIL (with details, expected, and actual on failures)._write_runtime_reporthandles JSON serialization and optional file writes; write failures exit with code 3 like other internal errors.Tests cover human-readable output, failed criteria formatting,
--output/--output+--json, and output write failures; existing JSON runtime test now passes--jsonexplicitly.Reviewed by Cursor Bugbot for commit d34dce0. Bugbot is set up for automated code reviews on this repo. Configure here.