Skip to content

test: drop no-op resolve_json monkeypatching#155

Merged
alexkroman merged 1 commit into
mainfrom
claude/monkey-patching-tests-cpxowe
Jun 13, 2026
Merged

test: drop no-op resolve_json monkeypatching#155
alexkroman merged 1 commit into
mainfrom
claude/monkey-patching-tests-cpxowe

Conversation

@alexkroman

Copy link
Copy Markdown
Collaborator

resolve_json is now just return explicit (it no longer auto-enables JSON
off a tty), so the monkeypatches of aai_cli.output.resolve_json across the
suite were either dead no-ops (passthrough / forced-False on invocations that
never pass --json) or stood in for the real flag.

  • Delete the redundant patches and the _human() helpers that only wrapped them.
  • Convert test_setup / test_setup_install's _force_json fixtures to pass the
    real --json flag on the structured-output invocations, exercising the genuine
    argscan -> json_option -> resolve_json path instead of patching the resolver.
  • Remove the now-unused monkeypatch fixture params left behind.
  • Record the convention in tests/AGENTS.md.

Test-only; full gate green.

resolve_json is now just `return explicit` (it no longer auto-enables JSON
off a tty), so the monkeypatches of aai_cli.output.resolve_json across the
suite were either dead no-ops (passthrough / forced-False on invocations that
never pass --json) or stood in for the real flag.

- Delete the redundant patches and the _human() helpers that only wrapped them.
- Convert test_setup / test_setup_install's _force_json fixtures to pass the
  real --json flag on the structured-output invocations, exercising the genuine
  argscan -> json_option -> resolve_json path instead of patching the resolver.
- Remove the now-unused monkeypatch fixture params left behind.
- Record the convention in tests/AGENTS.md.

Test-only; full gate green.
@alexkroman alexkroman enabled auto-merge June 13, 2026 17:39
@alexkroman alexkroman added this pull request to the merge queue Jun 13, 2026
Merged via the queue into main with commit f7dd4d5 Jun 13, 2026
16 checks passed
@alexkroman alexkroman deleted the claude/monkey-patching-tests-cpxowe branch June 13, 2026 17:47
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.

2 participants