Skip to content

refactor(store): absorb TransitionIssue string-action dispatch into typed ActionName#213

Merged
brandon-fryslie merged 1 commit into
masterfrom
links-va-001-trans-action-kzr.1
Jun 11, 2026
Merged

refactor(store): absorb TransitionIssue string-action dispatch into typed ActionName#213
brandon-fryslie merged 1 commit into
masterfrom
links-va-001-trans-action-kzr.1

Conversation

@brandon-fryslie

Copy link
Copy Markdown
Collaborator

Summary

  • Extends lifecycle.ActionName with four new constants (ActionArchive, ActionUnarchive, ActionDelete, ActionRestore), completing the sealed set to all eight transition actions
  • ParseAction now covers all eight as the single enforcement gate ([LAW:single-enforcer])
  • TransitionIssueInput.Action changes from string to model.ActionName; TransitionIssue dispatches directly on typed constants, eliminating the try-parse fallback pattern
  • CLI dispatch sources (transitionCmd, runBulkTransition, runTransition and its helpers) carry model.ActionName through to the store boundary

Closes ticket: links-va-001-trans-action-kzr.1

Test plan

  • go test ./... is clean (verified locally — all packages pass)
  • Lifecycle test updated: TestParseActionRejectsNonLifecycle → split into TestParseActionRoundTrips (all 8 constants parse correctly) and TestParseActionRejectsUnknown (truly invalid inputs are rejected)
  • No behavioral change — the sealed set is the same values; only the type at the seam changed

…yped ActionName (links-va-001-trans-action-kzr.1)

Extends ActionName in the lifecycle package with the four lifecycle
constants (archive, unarchive, delete, restore) so all eight legal
transition actions are named constants. ParseAction now covers the full
sealed set as the single enforcement gate.

TransitionIssueInput.Action changes from string to model.ActionName;
TransitionIssue dispatches directly on typed constants — the try-parse
fallback pattern is removed. CLI dispatch sources (transitionCmd,
runBulkTransition, runTransition and its helpers) are updated to carry
model.ActionName through to the store boundary without re-stringifying.
@brandon-fryslie brandon-fryslie merged commit 5266087 into master Jun 11, 2026
5 of 7 checks passed
@brandon-fryslie brandon-fryslie deleted the links-va-001-trans-action-kzr.1 branch June 11, 2026 08:34
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