feat(intake): page the pending list and say when a capture is settled #120

Merged
sharang merged 1 commits from feat/r1-intake-cursor into main 2026-11-10 09:57:01 +00:00
Owner

Follow-up to #119 (docgen#6 slice 3). Fixes the first of the two weaknesses I named after #119.

  • Cursor. GET /v1/internal/intake/pending takes after=<entry id>. The list spans all workspaces, oldest first. Without a cursor, entries that keep waiting in one workspace (no receiving workflow, Werkmeister not booked) could fill every page, and those of all other workspaces would never be read. The reader now pages on with the last id it got.
  • capture_settled on every item. A reader that pages on can hold a supplement back until its capture is handed over, even when the capture was on an earlier page.
  • Compatible. Without after the route answers as before, so werkmeister#70 on stage keeps working until its own follow-up uses the cursor.

Tests: the store contract on memory and Postgres (paging, capture_settled for open and settled captures), plus HTTP validation of after.

🤖 Generated with Claude Code

https://claude.ai/code/session_014aRnCGqELxoix5TfpX8Ejf

Follow-up to #119 (docgen#6 slice 3). Fixes the first of the two weaknesses I named after #119. - **Cursor.** `GET /v1/internal/intake/pending` takes `after=<entry id>`. The list spans all workspaces, oldest first. Without a cursor, entries that keep waiting in one workspace (no receiving workflow, Werkmeister not booked) could fill every page, and those of all other workspaces would never be read. The reader now pages on with the last id it got. - **`capture_settled` on every item.** A reader that pages on can hold a supplement back until its capture is handed over, even when the capture was on an earlier page. - **Compatible.** Without `after` the route answers as before, so werkmeister#70 on stage keeps working until its own follow-up uses the cursor. Tests: the store contract on memory and Postgres (paging, capture_settled for open and settled captures), plus HTTP validation of `after`. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_014aRnCGqELxoix5TfpX8Ejf
sharang added 1 commit 2026-11-10 09:50:56 +00:00
feat(intake): page the pending list and say when a capture is settled
ci / shared (pull_request) Successful in 10s
ci / test (pull_request) Successful in 5m9s
ci / image (pull_request) Skipped
4c17affc1f
The pending list is across workspaces, oldest first; entries that keep
waiting in one workspace (no receiving workflow, not booked) could fill
every page and hide those of all others. GET /v1/internal/intake/pending
takes after=<entry id>, so the reader pages on with the last id it got.

Each item says whether its report's capture is settled
(capture_settled), so a reader paging on can hold a supplement back
until its capture is handed over, also when the capture was on an
earlier page. Without after the route answers as before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014aRnCGqELxoix5TfpX8Ejf
sharang merged commit 9ded1abf31 into main 2026-11-10 09:57:01 +00:00
sharang deleted branch feat/r1-intake-cursor 2026-11-10 09:57:02 +00:00
Sign in to join this conversation.