Skip to content

feat: KEEP-1053 add kh workflow enable and disable - #80

Merged
suisuss merged 1 commit into
mainfrom
feat/KEEP-1053-enable-disable-workflow-commands
Jul 28, 2026
Merged

feat: KEEP-1053 add kh workflow enable and disable#80
suisuss merged 1 commit into
mainfrom
feat/KEEP-1053-enable-disable-workflow-commands

Conversation

@suisuss

@suisuss suisuss commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Summary

There was no discoverable way to turn a workflow on. Scanning kh workflow --help you see pause (turns off), go-live (publishes a template) and
update (no enable flag). Nothing says enable, so a tutorial ending "now turn it
on" had to send readers to the web UI or a raw PATCH /api/workflows/<id>.

The capability existed as resume - named for the inverse of pause rather
than for the action - so searching for "enable" found nothing.

enable and disable become the primary names.

Backwards compatibility

resume, activate and pause are kept as aliases and stay working
indefinitely. Scripts, tutorials and already-published doc links depend on them.

Tests pin each alias to its command, so a later rename cannot quietly drop one.
The pre-existing pause/resume tests were kept invoking the old names, which
means they now double as alias coverage.

One visible behaviour change

Runtime output follows the new vocabulary:

Workflow abc123 disabled     (was: paused)
Workflow abc123 enabled      (was: resumed)

Worth calling out for anyone matching on those strings. I changed it deliberately
rather than leaving it: the command and its own output would otherwise disagree,
which is exactly the confusion this PR exists to remove.

Help text now cross-references

Each command points at its opposite, so landing on one leads to the other:

Enable a workflow so it runs on its trigger.

Turns on a workflow that is currently disabled. This is the last step after
creating one - a workflow does nothing until it is enabled.

See also: kh workflow disable

A test asserts the cross-reference in both directions, since it is the part most
likely to rot.

This is the first real exercise of #78's pruning

Regenerating deletes kh_workflow_pause.md and kh_workflow_resume.md and adds
kh_workflow_enable.md and kh_workflow_disable.md.

Before #78 the two old pages would have survived as orphans - published, indexed
in _meta.ts, and documenting commands whose primary names no longer existed.
That is precisely the failure #78 was built to prevent, now demonstrated on a
real rename rather than a planted canary.

Test plan

  • Aliases resolve: enable/resume/activate -> enable;
    disable/pause -> disable
  • Existing pause/resume tests still pass while invoking the old names
  • Cross-references asserted in both directions
  • go build, go vet, golangci-lint run ./... (0 issues), full
    go test -race ./... - no failures
  • Regeneration replaces the pages rather than orphaning them

Nothing in the CLI was called enable, so turning a workflow on looked
impossible: pause turns off, go-live publishes a template, update has no
flag. The capability existed as resume - named for the inverse of pause
rather than for the action - so a reader scanning the verb list, or
searching for enable, concluded it was missing and reached for the API or
the web UI.

enable and disable become the primary names. resume, activate and pause
are kept as aliases and stay working indefinitely; scripts, tutorials and
published doc links depend on them, and tests pin each alias to its
command so a later rename cannot quietly drop one. Their help text now
cross-references, so finding one leads to the other.

Runtime output follows the new vocabulary: 'Workflow <id> disabled'
rather than 'paused'. This is a visible change for anyone matching on
that string, and leaving it would have kept the confusion the rename
exists to remove - the command and its own output would disagree.

Regenerating replaces the pause and resume pages with enable and disable,
which is the first real exercise of the pruning added in #78: the old
pages are deleted rather than left behind as orphans.
@suisuss
suisuss merged commit d5d3681 into main Jul 28, 2026
4 checks passed
@suisuss
suisuss deleted the feat/KEEP-1053-enable-disable-workflow-commands branch July 28, 2026 03:37
@eskp eskp mentioned this pull request Jul 28, 2026
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.

1 participant