Skip to content

Validate APB verse reference parameters - #144

Open
hepplerj wants to merge 2 commits into
mainfrom
codex/130-apb-ref-validation
Open

Validate APB verse reference parameters#144
hepplerj wants to merge 2 commits into
mainfrom
codex/130-apb-ref-validation

Conversation

@hepplerj

@hepplerj hepplerj commented Aug 6, 2026

Copy link
Copy Markdown
Member

Summary

  • require exactly one ref value before APB verse handlers access PostgreSQL
  • share the validation and existing 400 response across verse, verse quotations, and verse trend handlers
  • cover missing and repeated parameters for all three handlers with nil-database regression tests
  • update the license year range through 2026

Compatibility

Successful APB requests and JSON response shapes are unchanged. Missing or repeated ref values now return 400 Bad Request instead of reaching panic recovery and returning 500 Internal Server Error.

Validation

  • go test ./internal/datasets/apb -count=1
  • go test . ./internal/... -count=1
  • go test -race . ./internal/... -count=1
  • go build ./...
  • go vet ./...
  • go mod verify
  • go mod tidy -diff
  • go test -run "^$" ./db
  • go test ./cmd/apiary -count=1
  • go test ./db -count=1
  • local consumer smoke suite: 8,935 assertions passed

Closes #130

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.

Fix nil-slice panic on APB verse endpoints missing ref parameter

1 participant