fix(server): stop counting disabled conventions as completed work - #1152
Merged
xarmian merged 1 commit intoAug 18, 2026
Merged
Conversation
Standup, changelog, and project report treated a disabled convention as completed work because they used the global DefaultTerminalStatuses union (or counted every schema terminal as throughput). Honor per-collection terminal_options and skip negative terminals, including disabled.
Collaborator
|
Thanks @asjdf for this contribution — and a well-built one: honoring per-collection terminal_options on both the CLI and server paths, keeping the KEEP-IN-SYNC contract between the two copies, and pinning each facet of the fix with its own test made this straightforward to review and merge. The review surfaced two narrow pre-existing edges (guest item-grant scoping in the grouped query, and the display layer hardcoding |
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
Fixes #1049. I checked open PRs on 2026-08-18 (dependabot, #1125 / #1066, #1034 web) — none of them touch
listTerminalItemsSinceor this contract. Upstreammainstill loopsmodels.DefaultTerminalStatusesand ignores per-collectionterminal_options.Standup, changelog, and
project reporttreated a disabled convention as completed work:listTerminalItemsSince(and the CLI standup/changelog loops) iterated the globalDefaultTerminalStatusesunion instead ofTerminalValuesForDoneField(). A collection that only declaresshippedwas still scanned fordone; setting Conventionsterminal_options: []changed nothing.terminal_options: ["disabled"]. Even after honoring the schema,disabledis a non-shipping close, not completed work. Report already had this distinction asnegativeTerminals(rejected/cancelled/…). I moved that list tomodels(shared with standup/changelog) and addeddisabled. No newcounts_as_workproduct flag — that's the issue's part 2, a maintainer call.What changed:
listTerminalItemsSinceresolves positive terminals per collection and keeps the existing CollectionIDs OR ItemIDs visibility filter (guest item-grant changelog still works).pad project standup/changeloguse the same helper (listCompletedWorkSince) so the KEEP IN SYNC contract holds. MCP already proxies the server handlers.GetReportusesmodels.IsNegativeTerminal, so a disabled convention no longer increments the day's completed count.Test plan
main(disabled CONVE in standup/changelog/report; customterminal_options: ["shipped"]still counteddone).go test ./internal/models/ ./internal/store/ ./internal/server/— passTestProjectStandupEndpoint_DisabledConventionNotCompleted,TestProjectStandupEndpoint_HonorsCollectionTerminalOptions,TestProjectChangelogEndpoint_DisabledConventionNotCompleted,TestGetReport_DisabledConventionNotCompleted,TestGetReport_NegativeTerminalNotCompleted, existing standup/changelog/ACL testsgo veton the changed packagesgo build ./cmd/padwith a stubweb/build; fullmake buildnot run — web embed is out of scope)pad workspace create/item update CONVE-2 --status disabled/project standup --format json) not run end-to-end here; the HTTP standup/changelog/report tests encode that contract.