Files
William Gill fa0df451d5
Some checks failed
Test / Build & Unit Tests (push) Successful in 4m58s
Test / Lint (push) Successful in 27s
Test / Integration Tests (push) Failing after 2m19s
Security / Vulnerability Check (push) Failing after 1m22s
fix: coerce nil Origins to empty slice at pg store boundary
Two bugs exposed by the integration suite:

1. (production) pins.origins is NOT NULL DEFAULT '{}', but pgx
   serialises a Go nil []string as SQL NULL — so every Create/Replace
   whose caller omitted origins (an optional field per the IPFS
   Pinning Service spec) was 500ing on the NOT NULL constraint. The
   openapi/pin-service paths pass origins through verbatim, so any
   client POST without "origins" hit this. Normalise nil -> []string{}
   at the store boundary in both pinStore.Create and pinStore.Replace.

2. (test I introduced last commit) SET LOCAL does not accept bound
   parameters; the RLS integration test was getting a 42601 syntax
   error. Switch to SELECT set_config('anchorage.org_id', $1, true),
   which is parameterisable and keeps the value out of the SQL string.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-17 09:45:37 -05:00
..
2026-04-16 18:13:36 -05:00
2026-04-16 18:13:36 -05:00
2026-04-16 18:13:36 -05:00
2026-04-16 18:13:36 -05:00
2026-04-16 18:13:36 -05:00
2026-04-16 18:13:36 -05:00
2026-04-16 18:13:36 -05:00
2026-04-16 18:13:36 -05:00
2026-04-16 18:13:36 -05:00
2026-04-16 18:13:36 -05:00
2026-04-16 18:13:36 -05:00
2026-04-16 18:13:36 -05:00