feat(workstation): require targets cardinality on workflow registry - #2135
Merged
gfargo-horizon-agent[bot] merged 1 commit intoAug 28, 2026
Conversation
Flip LogInkWorkflowAction.targets from optional to required so tsc enumerates every registry entry missing a single/multi tag, tag the remaining ~118 entries as targets: 'single', and gate the confirm overlay's plural branch on the declared contract instead of inferring cardinality from resolver output length. Closes OSS-674
Contributor
Author
There was a problem hiding this comment.
🔎 Agent review (sonnet) — LGTM
REVIEW: LGTM
RESOLVES: full
The PR correctly implements the completeness/enforcement contract: all 122 registry entries now carry an explicit targets field (verified mechanically), exactly the four batch-capable workflows are 'multi', and describeConfirmationTarget now gates the plural branch on the declared contract rather than resolver output length. Tests (55/55), lint (0 errors), and tsc --noEmit all pass, and the deliberate deviation from rewriting resolvePendingItemAction to return an array is well-justified and clearly documented in the PR body.
gfargo-horizon-agent
Bot
deleted the
agent/coco-674-add-cardinality-contract-single-multi-to
branch
August 28, 2026 22:14
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.
What
Makes workflow cardinality (
targets: 'single' | 'multi') a required, complete, load-bearing contract onLogInkWorkflowAction, and makes the confirm overlay branch on that declared contract instead of inferring cardinality from resolver output length.Why
Plane: OSS-674
Note: #1361's multi-select UX already shipped and introduced
targetsad-hoc as an optional field, a plural-shaped resolver (ids: string[]), and a pluralizing confirm overlay. What was still missing — and what this PR closes — is the completeness and enforcement half: every registry entry explicitly declaring its cardinality, the type system rejecting entries that don't, and the overlay reading the declared contract rather than guessing from output shape.How
inkWorkflows.ts:targets?:→targets:(required), forcingtscto flag every entry missing it; tagged all 118 previously-untagged entries astargets: 'single'(the existing 4 batch-capable workflows —cherry-pick-commit,delete-branch,force-delete-branch,drop-stash— were already'multi').overlays.ts:describeConfirmationTargetnow resolves the action viagetLogInkWorkflowActionByIdand only takes the plural branch whenaction.targets === 'multi', so a'single'workflow can never render a plural summary even if marks are active.targets), a closed-set test pinning the exact four'multi'ids, and a resolver-alignment test tying the contract to the batch-selector implementation.'single'workflow (checkout-branch) keeps its singular confirm line even with marks active on other branches.Deliberate deviation from the ticket text:
resolvePendingItemActionis not rewritten to returnLogInkPendingItemAction[]. It already satisfies the underlying need — it returnsids: string[], and the three batch-capable workflows already populate it with N ids via the existing batch selectors. Wrapping that in an outer array would be a no-op refactor touchingoverlays.ts,useWorkflowAction.ts,sidebar.ts, four surface files, andpendingItemAction.test.tsfor no new capability.Testing
npm run build)inkWorkflows.test.ts+overlays.test.ts(55/55), full suite run locallynpm run lint, 0 errors)🤖 Generated by the harbor agent loop. Reviewed by a human before merge.