feat: ticket groups for batch progress tracking#12
Merged
Conversation
Tickets can now be assigned to a named group via WithGroup(id). A group handle (kh.Group(id)) exposes PendingCount and AllTerminal so callers can asynchronously submit many tickets and later check whether all have left the pending state — without blocking or polling individual ticket IDs. Groups are persisted in the tickets table (group_id column, nullable), backed by a partial index on (group_id) WHERE pending, and support mid-lifecycle transitions to a different group the same way tube transfers work. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Owner
Author
|
@copilot Review |
Contributor
Reviewed the current PR state at commit |
golangci-lint latest (v1.64.8) was built with Go 1.24 and rejects go 1.25+ in go.mod. Pin to v2.7.1 which supports Go 1.25+. Also suppress errcheck on defer br.Close() and tx.Rollback() where ignoring the return is intentional. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
golangci-lint-action@v6 explicitly rejects v2.x version strings. v7 is required to run golangci-lint v2. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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
WithGroup(id)— works as aPutoption, a ticket builder method, or a lifecycle transition option (same pattern asWithTube)kh.Group(id)returns a lightweight handle withPendingCount(ctx)andAllTerminal(ctx)to query collective progress without blockinggroup_idcolumn, backed by a small partial indexWHERE group_id IS NOT NULL AND status = 'pending'that shrinks as work completesUpdateBatchnever applied status updates, and a postgres bug where the default update path queued an empty statementTest plan
go test ./...in root andtest/— all existing tests passStoreinterface🤖 Generated with Claude Code