refactor(store): absorb TransitionIssue string-action dispatch into typed ActionName#213
Merged
Merged
Conversation
…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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
lifecycle.ActionNamewith four new constants (ActionArchive,ActionUnarchive,ActionDelete,ActionRestore), completing the sealed set to all eight transition actionsParseActionnow covers all eight as the single enforcement gate ([LAW:single-enforcer])TransitionIssueInput.Actionchanges fromstringtomodel.ActionName;TransitionIssuedispatches directly on typed constants, eliminating the try-parse fallback patterntransitionCmd,runBulkTransition,runTransitionand its helpers) carrymodel.ActionNamethrough to the store boundaryCloses ticket:
links-va-001-trans-action-kzr.1Test plan
go test ./...is clean (verified locally — all packages pass)TestParseActionRejectsNonLifecycle→ split intoTestParseActionRoundTrips(all 8 constants parse correctly) andTestParseActionRejectsUnknown(truly invalid inputs are rejected)