beads/internal/workapi
CI Bot 1108af95ee refactor(workapi): one execution epilogue for every list and ready read
Both surfaces already shared CONSTRUCTION — one BuildListFilter, one
BuildReadyFilter, both over the same issueops request types, both pinned
by the builders' golden files. They executed separately: the two Reader
implementations applied the over-fetch/sort/trim/HasMore tail, and each
CLI route applied its own copy. That tail had already drifted twice, and
both times it was the same bug in the same three lines written in two
places — a --ready page under a sort the database cannot express came
back untrimmed from one implementation, and the proxied route answered
`--sort id --limit 5` with every row while the direct route answered
with five.

workapi.FinishPage is now that tail, once. It is called by both
issueops.Reader implementations, by both of `bd list`'s routes, and by
the proxied `bd ready` listing. Nothing about the contract widened: the
epilogue takes rows, an order, a page limit and the seam's own has-more,
and answers with the page and the verdict. A seam that reports has-more
natively seeds it; a seam that does not passes false and lets the
over-fetched row speak.

`bd ready`'s DIRECT route keeps its own epilogue, and the comment in
ready_input.go now says so instead of claiming otherwise: it answers the
strictly larger question "how many rows were hidden" with a second
counting query and publishes the total in its pagination meta, which the
role has no way to express and the CLI cannot stop printing.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-07-31 22:27:01 +00:00
..
storereader refactor(workapi): one execution epilogue for every list and ready read 2026-07-31 22:27:01 +00:00
testdata feat(issueops): add the Reader role and wire both front doors through it 2026-07-31 18:37:25 +00:00
detail.go feat(issueops): add the Reader role and wire both front doors through it 2026-07-31 18:37:25 +00:00
detail_test.go test(workapi): make the hard-error test pin the short-circuit, unexport isNotFound (bd-hc1) 2026-07-31 08:21:06 +00:00
doc.go refactor(show): share issue-detail assembly and normalize not-found (bd-hc1) 2026-07-31 07:58:46 +00:00
list.go fix(workapi): refuse an invalid metadata key where the builders can name it 2026-07-31 18:37:25 +00:00
list_golden_test.go feat(issueops): add the Reader role and wire both front doors through it 2026-07-31 18:37:25 +00:00
list_status_test.go refactor(list): route both bd list paths through internal/workapi and delete list_filter.go (bd-fv4) 2026-07-31 06:01:48 +00:00
metadata.go fix(workapi): refuse an invalid metadata key where the builders can name it 2026-07-31 18:37:25 +00:00
page.go refactor(workapi): one execution epilogue for every list and ready read 2026-07-31 22:27:01 +00:00
page_test.go refactor(workapi): one execution epilogue for every list and ready read 2026-07-31 22:27:01 +00:00
ready.go fix(workapi): refuse an invalid metadata key where the builders can name it 2026-07-31 18:37:25 +00:00
ready_golden_test.go feat(issueops): add the Reader role and wire both front doors through it 2026-07-31 18:37:25 +00:00
ready_test.go feat(issueops): add the Reader role and wire both front doors through it 2026-07-31 18:37:25 +00:00
sort.go refactor(workapi): one execution epilogue for every list and ready read 2026-07-31 22:27:01 +00:00