Skip to content

Create roadmap for keyset pagination#195

Open
leynos wants to merge 3 commits into
mainfrom
codex/create-roadmap-for-keyset-pagination
Open

Create roadmap for keyset pagination#195
leynos wants to merge 3 commits into
mainfrom
codex/create-roadmap-for-keyset-pagination

Conversation

@leynos
Copy link
Copy Markdown
Owner

@leynos leynos commented Oct 11, 2025

Summary

Documentation

  • Added a roadmap detailing a multi‑phase plan for keyset pagination in the backend, covering core primitives, request/response handling, query adapters, HTTP framework integration, a reference endpoint, and future quality/tooling/docs work.
  • Includes phased milestones, dependencies, and expected outcomes to guide implementation and review.

Testing

  • make fmt

https://chatgpt.com/codex/tasks/task_e_68e9968f6ffc8322acaa2bee162cfa37

Summary by Sourcery

Documentation:

  • Introduce docs/keyset-pagination-roadmap.md containing a phased markdown checklist of tasks, outcomes, and dependencies for keyset pagination

@sourcery-ai
Copy link
Copy Markdown

sourcery-ai Bot commented Oct 11, 2025

Reviewer's Guide

This PR updates the keyset pagination roadmap documentation by converting all task lists into markdown checkboxes, enhancing visibility of completion states.

File-Level Changes

Change Details Files
Transform task bullet points into markdown checklists
  • Prefix every task line under ‘Tasks’ sections with ‘- [ ]’
  • Ensure consistent checkbox formatting across all phases and steps
  • Retain existing task text and indentation while adding checkbox syntax
docs/keyset-pagination-roadmap.md

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copy link
Copy Markdown

@sourcery-ai sourcery-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey there - I've reviewed your changes and they look great!

Prompt for AI Agents
Please address the comments from this code review:

## Individual Comments

### Comment 1
<location> `docs/keyset-pagination-roadmap.md:2` </location>
<code_context>
+# Roadmap: keyset pagination crate for Wildside backend
+
+## Phase 1 – Establish pagination core
+
</code_context>

<issue_to_address>
**issue (review_instructions):** Add explicit test plans or references for all new features; roadmap steps must specify both behavioural and unit tests for each deliverable.

Several roadmap steps mention unit tests (e.g., round-trip tests for cursor encoding, exhaustive unit tests for parameter parsing, deterministic unit tests for boundary evaluation), but not all new features or changes explicitly require both behavioural and unit tests. Ensure every feature or change in the roadmap includes a clear plan for both behavioural and unit tests, not just unit tests or integration tests.

<details>
<summary>Review instructions:</summary>

**Path patterns:** `**/*`

**Instructions:**
For any new feature or change to an existing feature, both behavioural *and* unit tests are required.

</details>
</issue_to_address>

### Comment 2
<location> `docs/keyset-pagination-roadmap.md:2` </location>
<code_context>
+# Roadmap: keyset pagination crate for Wildside backend
+
+## Phase 1 – Establish pagination core
+
</code_context>

<issue_to_address>
**issue (review_instructions):** Require explicit test demonstration for any bug fix steps; roadmap must specify test coverage for bug fixes.

If any roadmap step involves a bug fix (e.g., hardening error handling, fixing edge cases), it must explicitly mention that the fix will be demonstrated by a test. Review and update relevant steps to ensure this requirement is met.

<details>
<summary>Review instructions:</summary>

**Path patterns:** `**/*`

**Instructions:**
Bug fixes *must* be demonstrated by a test.

</details>
</issue_to_address>

### Comment 3
<location> `docs/keyset-pagination-roadmap.md:126` </location>
<code_context>
+
+## Phase 5 – Quality, tooling, and documentation
+
+### Step 5.1 – Harden error handling and observability
+- **Tasks**
+  - [ ] Standardise error types returned by the crate, mapping decoding, validation,
</code_context>

<issue_to_address>
**issue (review_instructions):** Several bullet points and paragraphs exceed the 80 column wrap limit.

For example, the bullet under 'Step 5.1' and others in the document are not wrapped to 80 columns, which may impact readability and maintain consistency with documentation standards. Please reformat these lines so that paragraphs and bullet points do not exceed 80 columns.

<details>
<summary>Review instructions:</summary>

**Path patterns:** `**/*.md`

**Instructions:**
Paragraphs and bullets must be wrapped to 80 columns

</details>
</issue_to_address>

### Comment 4
<location> `docs/keyset-pagination-roadmap.md:140` </location>
<code_context>
+
+### Step 5.2 – Author documentation and migration guidance
+- **Tasks**
+  - [ ] Produce crate-level README and API docs summarising configuration, usage
+        examples, and extension points for other models (POIs, routes, etc.).
+  - [ ] Draft migration checklist for future endpoints, covering index requirements
</code_context>

<issue_to_address>
**nitpick (review_instructions):** The word 'summarising' uses en-gb spelling; en-oxendic spelling is 'summarizing'.

Please use en-oxendic spelling conventions throughout the document. For example, 'summarising' should be 'summarizing'.

<details>
<summary>Review instructions:</summary>

**Path patterns:** `**/*.md`

**Instructions:**
Use en-oxendic (-ize / -yse / -our) spelling and grammar.

</details>
</issue_to_address>

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Comment thread docs/keyset-pagination-roadmap.md Outdated
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Oct 11, 2025

Note

Other AI code review bot(s) detected

CodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review.

Summary by CodeRabbit

  • Documentation
    • Added a comprehensive roadmap for implementing keyset pagination in the backend, outlining phased milestones, tasks, expected outcomes, and dependencies.
    • Covers concepts such as cursors, pagination keys and traits, response envelopes, request parameter handling, helper utilities, database query adapters, cursor/boundary generation, web framework integration, and an example endpoint.
    • Includes future plans for error handling, observability, tooling, migration guidance, and release readiness.
    • No functional changes to the application.

Walkthrough

Add a new documentation file detailing a five‑phase roadmap for a keyset pagination crate, outlining tasks, components, and interdependencies. Do not include source code changes.

Changes

Cohort / File(s) Summary
Documentation roadmap
docs/keyset-pagination-roadmap.md
Add a multi‑phase roadmap describing cursor primitives and encoding, model pagination keys and traits, response envelope types, request parameter extraction and context helpers, Diesel query adapters, boundary and cursor generation utilities, Actix‑web integration for composed HTTP responses, a reference /api/users handler, and future quality/tooling/docs tasks.

Sequence Diagram(s)

sequenceDiagram
  participant Client
  participant HTTP as Actix-web handler
  participant Pager as Pagination crate
  participant Adapter as Diesel adapter
  participant DB

  rect rgb(240,248,255)
    Client->>HTTP: GET /api/users?page_params
    HTTP->>Pager: extract PageParams, create PaginationContext
    Pager->>Adapter: build query with cursor/bounds
    Adapter->>DB: execute SQL with keyset predicates
    DB-->>Adapter: rows
    Adapter-->>Pager: mapped results + next/prev cursors
    Pager-->>HTTP: Paginated\<T\> + PaginationLinks
    HTTP-->>Client: HTTP response with envelope and links
  end
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

Keys in pockets, pages fall in line,
Cursors hum the path, encoded fine.
Five steps sketched on parchment bright,
Routes and bounds to steer the night.
Docs lay tracks for code to climb.

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Title Check ✅ Passed Acknowledge that the title succinctly conveys the addition of a keyset pagination roadmap and aligns precisely with the changeset by focusing on documentation. Ensure the phrasing remains concise and free of generic or unrelated terms. Confirm that the title effectively communicates the primary intent for team members scanning history.
Description Check ✅ Passed Recognise that the description clearly outlines the addition of a phased roadmap for keyset pagination and aligns with the documented changes and testing steps. Ensure the content remains on-topic by focusing on documentation milestones and dependencies. Confirm that the description provides meaningful context rather than generic statements.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch codex/create-roadmap-for-keyset-pagination

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

♻️ Duplicate comments (1)
docs/keyset-pagination-roadmap.md (1)

128-152: Replace -ise spellings with Oxford -ize forms.

Use Oxford spellings such as “standardize”, “summarizing”, and “finalize” throughout the document, including Lines 128, 140, and 151.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 3b5cd32 and 1d8d54e.

📒 Files selected for processing (1)
  • docs/keyset-pagination-roadmap.md (1 hunks)
🧰 Additional context used
📓 Path-based instructions (3)
docs/**/*.md

📄 CodeRabbit inference engine (docs/documentation-style-guide.md)

docs/**/*.md: Use British English based on the Oxford English Dictionary (en-oxendict) in documentation
The word “outwith” is acceptable in documentation
Use the Oxford comma
Treat company names as collective nouns (e.g., “Lille Industries are…”)
Write headings in sentence case
Use Markdown headings (#, ##, ###, …) in order without skipping levels
Follow markdownlint recommendations
Provide code blocks and lists using standard Markdown syntax
Always provide a language identifier for fenced code blocks; use plaintext for non-code text
Use '-' as the first-level bullet and renumber lists when items change
Prefer inline links using text or angle-bracketed URLs
Ensure blank lines before and after bulleted lists and fenced code blocks
Ensure tables have a delimiter line below the header row
Expand any uncommon acronym on first use (e.g., Continuous Integration (CI))
Wrap paragraphs at 80 columns
Wrap code at 120 columns (within documentation)
Do not wrap tables
Use footnotes referenced with [^label]
Include Mermaid diagrams where they add clarity
When embedding figures, use Markdown image syntax alt text and provide brief, descriptive alt text
Add a short description before each Mermaid diagram for screen readers

docs/**/*.md: Use docs/ as the source of truth for requirements, dependencies, and architectural decisions, and proactively update it when things change
Documentation in docs/ must use en-GB-oxendict spelling and grammar (LICENSE naming is exempt)
Keep TypeScript examples in docs small and compilable (typecheck during builds); mirror production patterns

Files:

  • docs/keyset-pagination-roadmap.md
**/*.md

📄 CodeRabbit inference engine (AGENTS.md)

**/*.md: Validate Markdown with make markdownlint; wrap paragraphs/bullets at 80 columns, code blocks at 120, do not wrap tables/headings; use dashes for bullets and GFM footnotes
Run make fmt after documentation changes to format Markdown and fix table markup; validate Mermaid diagrams with make nixie

Files:

  • docs/keyset-pagination-roadmap.md

⚙️ CodeRabbit configuration file

**/*.md: * Avoid 2nd person or 1st person pronouns ("I", "you", "we")

  • Use en-GB-oxendict (-ize / -yse / -our) spelling and grammar
  • Headings must not be wrapped.
  • Documents must start with a level 1 heading
  • Headings must correctly increase or decrease by no more than one level at a time
  • Use GitHub-flavoured Markdown style for footnotes and endnotes.
  • Numbered footnotes must be numbered by order of appearance in the document.

Files:

  • docs/keyset-pagination-roadmap.md
docs/**/*.{md,mdx}

📄 CodeRabbit inference engine (docs/contents.md)

Follow the Documentation style guide for all Markdown-based documentation

Files:

  • docs/keyset-pagination-roadmap.md
⏰ Context from checks skipped due to timeout of 120000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Sourcery review

Comment thread docs/keyset-pagination-roadmap.md
@leynos leynos changed the title Add checkboxes to keyset pagination roadmap tasks Create roadmap for keyset pagination Oct 11, 2025
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

📜 Review details

Configuration used: CodeRabbit UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 1d8d54e and f40967a.

📒 Files selected for processing (1)
  • docs/keyset-pagination-roadmap.md (1 hunks)
🧰 Additional context used
📓 Path-based instructions (3)
docs/**/*.md

📄 CodeRabbit inference engine (docs/documentation-style-guide.md)

docs/**/*.md: Use British English based on the Oxford English Dictionary (en-oxendict) in documentation
The word “outwith” is acceptable in documentation
Use the Oxford comma
Treat company names as collective nouns (e.g., “Lille Industries are…”)
Write headings in sentence case
Use Markdown headings (#, ##, ###, …) in order without skipping levels
Follow markdownlint recommendations
Provide code blocks and lists using standard Markdown syntax
Always provide a language identifier for fenced code blocks; use plaintext for non-code text
Use '-' as the first-level bullet and renumber lists when items change
Prefer inline links using text or angle-bracketed URLs
Ensure blank lines before and after bulleted lists and fenced code blocks
Ensure tables have a delimiter line below the header row
Expand any uncommon acronym on first use (e.g., Continuous Integration (CI))
Wrap paragraphs at 80 columns
Wrap code at 120 columns (within documentation)
Do not wrap tables
Use footnotes referenced with [^label]
Include Mermaid diagrams where they add clarity
When embedding figures, use Markdown image syntax alt text and provide brief, descriptive alt text
Add a short description before each Mermaid diagram for screen readers

docs/**/*.md: Use docs/ as the source of truth for requirements, dependencies, and architectural decisions, and proactively update it when things change
Documentation in docs/ must use en-GB-oxendict spelling and grammar (LICENSE naming is exempt)
Keep TypeScript examples in docs small and compilable (typecheck during builds); mirror production patterns

Files:

  • docs/keyset-pagination-roadmap.md
**/*.md

📄 CodeRabbit inference engine (AGENTS.md)

**/*.md: Validate Markdown with make markdownlint; wrap paragraphs/bullets at 80 columns, code blocks at 120, do not wrap tables/headings; use dashes for bullets and GFM footnotes
Run make fmt after documentation changes to format Markdown and fix table markup; validate Mermaid diagrams with make nixie

Files:

  • docs/keyset-pagination-roadmap.md

⚙️ CodeRabbit configuration file

**/*.md: * Avoid 2nd person or 1st person pronouns ("I", "you", "we")

  • Use en-GB-oxendict (-ize / -yse / -our) spelling and grammar
  • Headings must not be wrapped.
  • Documents must start with a level 1 heading
  • Headings must correctly increase or decrease by no more than one level at a time
  • Use GitHub-flavoured Markdown style for footnotes and endnotes.
  • Numbered footnotes must be numbered by order of appearance in the document.

Files:

  • docs/keyset-pagination-roadmap.md
docs/**/*.{md,mdx}

📄 CodeRabbit inference engine (docs/contents.md)

Follow the Documentation style guide for all Markdown-based documentation

Files:

  • docs/keyset-pagination-roadmap.md
⏰ Context from checks skipped due to timeout of 120000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Sourcery review

Comment on lines +137 to +139
- [ ] Provide utility functions that assemble `Paginated<T>` responses,
including URL construction for `self`, `next`, and `prev` links while
explicit `limit` selections.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Repair Step 4.1 task grammar

Replace the fragment “while explicit limit selections” with a complete clause so the instruction reads coherently. Apply this change.

-  - [ ] Provide utility functions that assemble `Paginated<T>` responses,
-        including URL construction for `self`, `next`, and `prev` links while
-        explicit `limit` selections.
+  - [ ] Provide utility functions that assemble `Paginated<T>` responses,
+        including URL construction for `self`, `next`, and `prev` links while
+        honouring explicit `limit` selections.

As per coding guidelines

🤖 Prompt for AI Agents
In docs/keyset-pagination-roadmap.md around lines 137 to 139, the checklist item
ends with an incomplete clause "while explicit `limit` selections"; replace that
fragment with a complete clause so the sentence reads coherently — update the
line to: include URL construction for `self`, `next`, and `prev` links while
honouring explicit `limit` selections (i.e., replace "while explicit `limit`
selections." with "while honouring explicit `limit` selections.").

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant