Skip to content

feat(cli): group notify workspace-* into a notify workspace subgroup (#305) - #334

Merged
scttfrdmn merged 1 commit into
mainfrom
audit/phase2b-notify-workspace
Jul 11, 2026
Merged

scttfrdmn merged 1 commit into
mainfrom
audit/phase2b-notify-workspace

Conversation

@scttfrdmn

Copy link
Copy Markdown
Contributor

Closes #305. Part of the audit tracker #328 (Phase 2 grouping). Back-compat preserved via hidden deprecated aliases.

Change

notify workspace-add|remove|list|destroy (flat, hyphenated) → notify workspace add|remove|list|destroy (subgroup). This was the top item in the original audit brief (flat-hyphenated vs subcommands) and also makes the destructive-verb gate cleaner (leaf Name() is now remove/destroy).

Back-compat

The four flat names remain as hidden, deprecated shim commands under notify. Each shim shares the canonical command's RunE and flag set (via AddFlagSet, so the same package vars back both), and prints use spawn notify workspace instead when invoked. Existing scripts keep working.

Safety gates preserved

Verification

  • spawn notify workspace --help lists add/remove/list/destroy; flat forms hidden from notify --help but still functional with a deprecation notice (confirmed: notify workspace-remove prompts, aborts on empty stdin, exits 1).
  • go build ./..., go vet ./cmd, gofmt, cmd tests green. Pre-existing unrelated TestCatalogValid (feat(plugin): permissions declaration block (#388) #392) still fails on main.

CHANGELOG under Changed.

@codecov

codecov Bot commented Jul 11, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

#305)

The four flat-hyphenated commands (notify workspace-add/remove/list/
destroy) are now `notify workspace <verb>`. The flat names remain as
hidden, deprecated shims that share the canonical commands' RunE and
flag sets (same package vars), so existing scripts keep working and
print a pointer to the new form.

- New `workspace` parent groups add/remove/list/destroy.
- registerWorkspaceAlias() builds each hidden shim via AddFlagSet so
  flag parsing is identical; MarkDeprecated-style Deprecated message.
- remove keeps -y/--yes prompt; destroy keeps --confirm dry-run gate
  (both verified against TestFlagConventions).

Part of the 2026-07-11 audit (#328, Phase 2). go build/vet/test green.
@scttfrdmn
scttfrdmn force-pushed the audit/phase2b-notify-workspace branch from 6496249 to 1e84045 Compare July 11, 2026 19:41
@scttfrdmn
scttfrdmn merged commit 8c97ece into main Jul 11, 2026
7 checks passed
@scttfrdmn
scttfrdmn deleted the audit/phase2b-notify-workspace branch July 11, 2026 19:42
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.

[audit] Grouping: notify workspace-* flat-hyphenated verbs should be a workspace subgroup

1 participant