hatch-surf/internal/store
SoftwareEngineer 5bbf995f32 Fix capture: endpoint ID/URL mismatch, routing, and extractID
- Use URL as endpoint ID so handler path-segment lookups resolve correctly.
  Previously CreateEndpoint generated a random UUID for the ID, but the
  handler always queries by the path segment — every GetEndpoint call
  missed, causing duplicate UNIQUE violations on subsequent requests
  and orphaned request records (endpoint_id mismatch).

- Register both /{endpoint} and /{endpoint}/ patterns so bare and
  nested capture paths both route to the handler (Go 1.22+ ServeMux).

- Strip query string in extractID for robustness, even though the
  library never sends ? in r.URL.Path.

- Remove unused net/http import from handler_test.go (caught by vet).

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-06-22 14:38:50 +02:00
..
db.go feat: mock endpoint — configure response per endpoint 2026-06-22 14:32:53 +02:00
doc.go feat: mock endpoint — configure response per endpoint 2026-06-22 14:32:53 +02:00
models.go feat: mock endpoint — configure response per endpoint 2026-06-22 14:32:53 +02:00
schema.sql feat: mock endpoint — configure response per endpoint 2026-06-22 14:32:53 +02:00
sqlite_repo_test.go feat: mock endpoint — configure response per endpoint 2026-06-22 14:32:53 +02:00
sqlite_repo.go Fix capture: endpoint ID/URL mismatch, routing, and extractID 2026-06-22 14:38:50 +02:00