The PR added build_context_set_payload / render_context_set_plain /
render_context_set_rich in cleveragents.cli.rendering.project_context_set
but context_set never called them: rich output rendered a single
"Context Policy Updated" panel and json/yaml/plain went through
format_output(data, output_format) with no envelope kwargs. The five
BDD scenarios validating the spec envelope therefore failed.
Replace the tail of context_set so rich emits the four spec panels
(Context Policy / Limits / Summarization / Other Views) plus the
"checkmark Context policy updated" line, plain calls
render_context_set_plain directly, and json/yaml flow through
format_output with command="project context set", status="ok",
exit_code=0, and messages=[{level: ok, text: "Context policy updated"}].
ISSUES CLOSED: #6319
render_context_set_plain (~49 lines) was completely uncovered because no
existing test exercised the plain output path for context_set. Add a
coverage-boost scenario that uses format "plain" to cover those lines.
Also add a scenario with max_file_size=100 (not divisible by any binary
unit) to cover the _format_size bytes-fallback path (line 36 of
project_context_set.py).
ISSUES CLOSED: #6319
- Fix E501 line-length violations (lines 154, 184, 188, 194, 196) by
extracting ternary expressions into local variables in
render_context_set_plain and render_context_set_rich
- Fix I001 import block formatting in project_context_set.py
- Fix ruff format issue in project_context_cli_steps.py
ISSUES CLOSED: #6319
Implemented spec-compliant JSON, YAML, plain, and rich outputs for `agents project context set`. Added BDD coverage verifying the new output structure across formats.\n\nISSUES CLOSED: #6319