Skip to content

Bound repository dependency API results - #770

Merged
andrew merged 1 commit into
alpha-omega-security:mainfrom
snowyukitty:feat/bounded-dependency-results
Jul 29, 2026
Merged

andrew merged 1 commit into
alpha-omega-security:mainfrom
snowyukitty:feat/bounded-dependency-results

Conversation

@snowyukitty

Copy link
Copy Markdown
Contributor

Summary

  • add a shared parseLimit helper for repository dependency reads, defaulting to 200 rows and capping requests at 1000
  • apply the bound to the dependents and dependencies queries, returning 400 Bad Request for empty, non-numeric, or negative values
  • document the query parameter and cover default, explicit, capped, zero, and invalid limits

Testing

The Linux-target checks below ran against an LF snapshot of the exact candidate tree:

  • go mod tidy -diff
  • GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go vet ./...
  • GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go vet -tags podman ./...
  • GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go test -c ./internal/web
  • GOOS=linux GOARCH=amd64 CGO_ENABLED=0 golangci-lint run ./... (0 issues)

The three targeted runtime tests also passed locally on Windows with a temporary process-control compatibility shim for upstream's Unix-only worker code; the shim is not part of this patch.

Closes #713.

Disclosure: Prepared with OpenAI Codex assistance; the resulting patch and validation evidence were reviewed before submission.

@andrew andrew left a comment

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.

Matches the rescoped #713 exactly — helper, two endpoints, default/cap, tests, OpenAPI. Thanks for the thorough test coverage.

@andrew
andrew merged commit ec4480f into alpha-omega-security:main Jul 29, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add limit and offset pagination to repository read APIs

2 participants