Skip to content

fix(cli): emit json for profile mutations#308

Merged
upsetbit merged 1 commit into
masterfrom
codex/fix-profiles-mutator-json
Jun 27, 2026
Merged

fix(cli): emit json for profile mutations#308
upsetbit merged 1 commit into
masterfrom
codex/fix-profiles-mutator-json

Conversation

@upsetbit

Copy link
Copy Markdown
Contributor

Summary

Fixes #295.

profiles add, profiles set-path, and profiles remove now emit JSON when the inherited --json flag is present.

What changed

  • Added a machine-readable mutation payload for profile changes.
  • add emits action, agent, profile, path, and replaced when applicable.
  • set-path emits action, agent, profile, and path.
  • remove emits action, agent, and profile.
  • Added command-level tests with temporary profile config.

Validation

  • go test ./internal/cli -run 'TestProfilesMutatorsEmitJSON' -count=1
  • go test ./internal/cli/... -race
  • go build -o ./bin/prosa ./cmd/prosa
  • Manual checks for add/set-path/remove with --json piped through python3 -m json.tool

@upsetbit upsetbit added bug Something isn't working area:cli prosa CLI scope:cli prosa CLI commands, flags, rendering, setup, and scheduled sync severity:medium Latent bug, inconsistent contract, brittle pattern priority:P2 Lower-priority cleanup, coverage, polish, or follow-up source:audit Created from an audit report or validation pass labels Jun 27, 2026
@upsetbit upsetbit merged commit fd4ba80 into master Jun 27, 2026
4 checks passed
@upsetbit upsetbit deleted the codex/fix-profiles-mutator-json branch June 27, 2026 16:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:cli prosa CLI bug Something isn't working priority:P2 Lower-priority cleanup, coverage, polish, or follow-up scope:cli prosa CLI commands, flags, rendering, setup, and scheduled sync severity:medium Latent bug, inconsistent contract, brittle pattern source:audit Created from an audit report or validation pass

Projects

None yet

Development

Successfully merging this pull request may close these issues.

profiles mutators accept --json but emit human text

1 participant