Documentation Index
Fetch the complete documentation index at: https://docs.tuturuuu.com/llms.txt
Use this file to discover all available pages before exploring further.
Symptoms
When creating a Hive world event, the API can return:hive_event_failed in the client with a 400 error.
Cause
apply_hive_world_event returns a table signature that includes server_id.
In PL/pgSQL, output columns are variables. Unqualified references to
server_id inside the function can become ambiguous and fail at runtime.
Fix
Use a constraint-based conflict target in the insert that bootstrapshive_world_states so the SQL does not rely on a bare server_id identifier:
Actor Authorization
The actor-acceptingapply_hive_world_event(uuid, uuid, bigint, text, jsonb, jsonb) overload should not be exposed to browser roles. Keep direct execution
revoked from public, anon, and authenticated; server-side API and realtime
paths call it with service_role after validating the user session or signed
Hive realtime token. If a non-service role ever reaches the function, it must
derive the actor from auth.uid() and reject mismatched p_actor_user_id
values with hive_actor_mismatch.