Skip to content

impact --json answers in every form: no name answers the edits, a refusal is JSON (#1920) - #1921

Merged
swapnilpaliwal-sd merged 2 commits into
devfrom
fix/impact-json-edits
Oct 11, 2026
Merged

swapnilpaliwal-sd merged 2 commits into
devfrom
fix/impact-json-edits

Conversation

@swapnilpaliwal-sd

Copy link
Copy Markdown
Contributor

Fixes #1920 — found by the 0.1.9 cross-platform release check.

impact --json with no name printed the usage text; only the front door answered for the working tree's edits. It now answers with the impact document for the declarations the edits changed, plus "edits" (what changed) and a your edits: … line in prose — the machine form of what impact with no name shows at the front door. A flag's value is not taken for a name; --warm, --from-text and --delete keep the verb's own forms.

impact <unknown> --json printed the refusal as plain text. It is now {"targets": [], "refusal": …, "prose": […]} with exit code 2.

With #1912, --json now answers with a parseable document from every verb and form: path (known, unknown, '*'), impact (named, no name, unknown, with flags), tests / test-impact, context (match and no match), changed, link. The front door's text answers are unchanged.

Case impact-json-without-a-name-answers-the-edits (6 checks, all stdout_json); the no-name check fails on the base.
Suites: python 445/445, typescript 352/352, javascript 354/354, java 374/374, csharp 319/319.

…al, as a document (#1920)

impact --json with no name printed the usage text: only the front door answered for the
working tree's edits. The dispatcher now sends it to ax_blocks edits-json: the impact
document for the declarations the edits changed, with the edits under "edits" and a
'your edits:' line in its prose. A flag's value is not a name; --warm, --from-text and
--delete keep the verb's own forms.

impact <a name nothing declares> --json printed the refusal as plain text. In --json mode
main() runs inside a redirect, and a refusal is printed as {targets: [], refusal, prose}.

Case impact-json-without-a-name-answers-the-edits: --json parses for impact (named, no
name, unknown), path (unknown), tests and context (no match); the no-name check fails on
the base. Cases: python 445/445, typescript 352/352, javascript 354/354, java 374/374,
csharp 319/319.

Co-authored-by: axiomcode-bot[bot] <334110751+axiomcode-bot[bot]@users.noreply.github.com>
When no changed declaration can be named (an edit outside any declaration, a fresh
checkout), test-impact printed its prose even under --json, so stdout did not parse:
the CI run of impact-json-without-a-name-answers-the-edits caught it. In --json mode
main() runs inside a redirect and a non-JSON answer is printed as
{changed: [], tests: [], prose}, exit code kept.

Cases: python 445/445, typescript 352/352, javascript 354/354, java 374/374,
csharp 319/319.

Co-authored-by: axiomcode-bot[bot] <334110751+axiomcode-bot[bot]@users.noreply.github.com>
@swapnilpaliwal-sd
swapnilpaliwal-sd merged commit ce3907d into dev Oct 11, 2026
12 checks passed
@swapnilpaliwal-sd
swapnilpaliwal-sd deleted the fix/impact-json-edits branch October 11, 2026 02:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

impact --json: with no name it prints the usage text, and a refusal is not JSON

1 participant