[api] owner-scoping regression test (deferred from !8 review) #23
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Deferred from the !8 api review and still open; now in your lane per #20.
Gap: the automata CRUD is owner-scoped (queries filter by the identity from
Remote-User), but there is no regression test proving user A cannot read/modify/list user B's documents. All api tests run without a database today.Suggested shape: a
#[tokio::test]gated onTEST_DATABASE_URL(skip with an eprintln when unset, so CI and local runs stay green without postgres) that spins the router against a real pool, creates docs as two identities, and asserts cross-user reads/writes/lists/deletes 404 (per the contract error envelope).Compose already provides a throwaway postgres:
docker compose -f deploy/docker-compose.yml up postgres -d→postgres://rgxr:rgxr@localhost:5432/rgxr.