Skip to content

fix(help): mark mutating commands as read_only: false in schema output#535

Merged
platinummonkey merged 1 commit into
mainfrom
claude/issue-528-wAmWn
May 28, 2026
Merged

fix(help): mark mutating commands as read_only: false in schema output#535
platinummonkey merged 1 commit into
mainfrom
claude/issue-528-wAmWn

Conversation

@platinummonkey
Copy link
Copy Markdown
Collaborator

Summary

Several subcommands were reporting read_only: true in pup --help JSON output despite performing server-side mutations. The root cause was that is_write_command_name() in src/main.rs was missing the verbs used by those commands.

Changes

  • src/main.rs: Added 14 mutation verbs and one pattern to is_write_command_name() (src/main.rs:9883):
    • run, enable, disable, edit, upsert, upload, publish, unpublish, comment, start, stop, pause, resume, generate, unassign
    • name.ends_with("-create") pattern to cover batch-create
  • src/test_commands.rs: Added assertions for all newly added verbs in test_is_write_command_name_writes()

Commands fixed

Command Verb
pup cases comment comment
pup workflows run run
pup runbooks run run
pup synthetics tests run run
pup feature-flags enable enable
pup feature-flags disable disable
pup feature-flags exposure start start
pup feature-flags exposure stop stop
pup feature-flags exposure pause pause
pup feature-flags exposure resume resume
pup notebooks edit edit
pup software-catalog entities upsert upsert
pup software-catalog kinds upsert upsert
pup costs ccm budgets upsert upsert
pup costs ccm custom-costs upload upload
pup costs ccm tag-descriptions upsert upsert
pup costs ccm tag-descriptions generate generate
pup app-builder publish publish
pup app-builder unpublish unpublish
pup users seats users unassign unassign
pup scorecards outcomes batch-create batch-create (via ends_with("-create"))

Testing

  • Added 16 new assert! cases to test_is_write_command_name_writes() in src/test_commands.rs
  • All existing tests for read commands and the read-only guard integration tests remain unchanged

Related Issues

Closes #528


🤖 Generated with Claude Code


Generated by Claude Code

Several subcommands were reporting `read_only: true` in `pup --help` JSON
output despite performing server-side mutations. The root cause was that
`is_write_command_name()` was missing the verbs used by those commands.

Added the following mutation verbs:
- run (workflows run, runbooks run, synthetics tests run)
- enable / disable (feature-flags)
- edit (notebooks edit)
- upsert (software-catalog entities/kinds, costs ccm budgets/tag-descriptions)
- upload (costs ccm custom-costs upload)
- publish / unpublish (app-builder)
- comment (cases comment)
- start / stop / pause / resume (feature-flags exposure)
- generate (costs ccm tag-descriptions generate)
- unassign (users seats users unassign)
- ends_with("-create") pattern to cover batch-create (scorecards outcomes)

Fixes #528

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@platinummonkey platinummonkey requested a review from a team as a code owner May 28, 2026 08:59
@platinummonkey platinummonkey merged commit 8e253ea into main May 28, 2026
7 checks passed
@platinummonkey platinummonkey deleted the claude/issue-528-wAmWn branch May 28, 2026 09:15
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.

[BUG] Multiple subcommands report read_only: true despite mutating state

2 participants