Skip to content

fix(dotprompt-go): paginate directory store listings - #628

Open
rksharma-owg wants to merge 1 commit into
google:mainfrom
rksharma-owg:codex/fix-go-dirstore-pagination
Open

rksharma-owg wants to merge 1 commit into
google:mainfrom
rksharma-owg:codex/fix-go-dirstore-pagination

Conversation

@rksharma-owg

Copy link
Copy Markdown

Go DirStore.List and ListPartials ignore the returned cursor and repeat the first page. Honor cursor offsets after the existing filtering and sorting, return an empty cursor on the final page, and reject invalid cursors.

Add filesystem regression tests for prompts and partials covering page progression, variants, nested names, terminal pages, invalid cursors, and limit boundaries. Document cursor usage and the absence of snapshot guarantees when files change between calls.

Fixes #500.

Validation

Tested commit: a83a2163369b37b1bcc293a5b433f761378e75d0; baseline: 964b3a83c49a357d4a1b215bd307d513f2a38aef.

  • Regression tests fail against unchanged production baseline and pass with this patch.
  • Local Go tests, race/coverage, vet, build, lint, formatting, module hygiene, license and TODO checks pass.
  • Cloud Go 1.25.14/1.26.8 builds and tests pass. Bazel Java 17/21 builds and all 68 test targets pass for both patch and baseline.
  • Cloud compatible-Go lint, license and TODO checks pass.

Patch/baseline preflight · Toolchain diagnostics

Existing CI failures

Preflight is not fully green. These failures also occur on unchanged baseline:

  • Go 1.26 vulnerability scanning reports GO-2026-5970 in the existing golang.org/x/text 0.36.0 dependency.
  • Go 1.25 cannot install latest govulncheck: x/vuln 1.8.0 requires Go 1.26.
  • Stable Go resolves to 1.27.1, while pinned golangci-lint 2.10.1 was built with Go 1.26 and panics. The same linter passes for this patch with Go 1.26.8.

Dependency and CI configuration changes are excluded from this focused pagination fix.

Honor cursors for sorted prompt and partial listings, return terminal pages correctly, and cover pagination boundaries with regression tests.
@github-actions github-actions Bot added documentation Improvements or additions to documentation fix go labels Oct 4, 2026

This branch has not been deployed

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

Labels

documentation Improvements or additions to documentation fix go

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement meaningful cursor/limit pagination in Go DirStore

1 participant