connect: page_token adapter as the first nested module #10

Open
opened 2026-10-26 22:17:08 -07:00 by end · 0 comments
Owner

Nested module go.auvem.com/corestack/connect, following the module-boundary ADR. Releases use prefixed tags, starting at connect/v0.1.0. Blocked by #6.

Timing. Build this alongside Lark Relay's first paginated Connect endpoint, and let that endpoint shape the API. Don't design it in the abstract. Lark Relay can depend on it with a replace directive or a pseudo-version until it's tagged.

Requirements

  • Request mapping. Map the AIP-158-style page_size and page_token from a request onto page options.
  • Response mapping. Map a page.Page[T] result back to next_page_token. Backward paging isn't needed, unless the first consumer needs it.
  • Errors. Typed cursor errors from page map to connect.CodeInvalidArgument.
  • No generated protobuf types in this module. It works on plain values, so any service's messages can use it.
  • First-nested-module setup. This is the first nested module, so this PR also handles:
    • CI: tests, vet and lint run for every module (a go.work or a loop over modules).
    • Releases: goreleaser and the release workflow keep publishing binaries only from root v* tags. A connect/v* tag must not trigger a binary release.
    • Docs: add a short release note to AGENTS.md on how to tag a nested module.

Done when

  • Tests cover the token round-trip, size clamping, and mapping invalid tokens to the right error code.
  • CI shows the nested module being built and tested.
  • A dry run (goreleaser check or reasoning in the PR) shows a connect/v0.1.0 tag won't publish binaries.
Kickoff prompt
Use the feature-delivery skill to resolve corestack/go#10 (the issue body is the spec).
Repo ~/Projects/corestack/go, base main (page from #6 must be merged), branch
feat/connect. Read AGENTS.md and the module-boundary ADR first; this is the first nested
module, so the CI and release changes are part of the PR. Shape the API from this first
consumer: <describe the Lark Relay endpoint and its request/response messages here>.
Independent review before the PR.
Nested module `go.auvem.com/corestack/connect`, following the module-boundary ADR. Releases use prefixed tags, starting at `connect/v0.1.0`. Blocked by #6. **Timing.** Build this alongside Lark Relay's first paginated Connect endpoint, and let that endpoint shape the API. Don't design it in the abstract. Lark Relay can depend on it with a `replace` directive or a pseudo-version until it's tagged. ## Requirements - **Request mapping.** Map the AIP-158-style `page_size` and `page_token` from a request onto `page` options. - **Response mapping.** Map a `page.Page[T]` result back to `next_page_token`. Backward paging isn't needed, unless the first consumer needs it. - **Errors.** Typed cursor errors from `page` map to `connect.CodeInvalidArgument`. - **No generated protobuf types in this module.** It works on plain values, so any service's messages can use it. - **First-nested-module setup.** This is the first nested module, so this PR also handles: - **CI:** tests, vet and lint run for every module (a `go.work` or a loop over modules). - **Releases:** goreleaser and the release workflow keep publishing binaries only from root `v*` tags. A `connect/v*` tag must not trigger a binary release. - **Docs:** add a short release note to AGENTS.md on how to tag a nested module. ## Done when - Tests cover the token round-trip, size clamping, and mapping invalid tokens to the right error code. - CI shows the nested module being built and tested. - A dry run (`goreleaser check` or reasoning in the PR) shows a `connect/v0.1.0` tag won't publish binaries. <details> <summary>Kickoff prompt</summary> ```text Use the feature-delivery skill to resolve corestack/go#10 (the issue body is the spec). Repo ~/Projects/corestack/go, base main (page from #6 must be merged), branch feat/connect. Read AGENTS.md and the module-boundary ADR first; this is the first nested module, so the CI and release changes are part of the PR. Shape the API from this first consumer: <describe the Lark Relay endpoint and its request/response messages here>. Independent review before the PR. ``` </details>
end added a new dependency 2026-10-26 22:17:23 -07:00
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Reference: corestack/go#10