Skip to content

The /v1/feedback router is unreachable — PostgREST does not expose the logs schema #665

Closed

Description

@thinkclay

routes/feedback.ts:138 and :238 query:

supabase.schema("logs").from("user_feedback")

Two things make that impossible:

  1. PostgREST does not serve the logs schema. packages/supabase/config.toml:7 lists ["auth","public","core","storage","data","onet","engagement","community"].
  2. logs.user_feedback grants only postgres — no authenticated, no service_role. Same class as fix(db): 8 core tables grant SELECT to authenticated but not service_role #481 and core.review_links grants only postgres — both review-link endpoints 500 #654.

So every feedback endpoint fails regardless of the client used. The table is currently empty, which is consistent with nothing ever having written to it successfully.

This also blocks the Communications category of the CCPA disclosure (#652): platform feedback cannot be counted, so #663 leaves it out of the label rather than reporting a silent zero.

Decision needed

Either:

  1. Expose and grant — add logs to config.toml schemas and a migration granting service_role (and authenticated for the user's own rows, with RLS). Affects all three environments' PostgREST config.
  2. Move the table to core.user_feedback, which is already exposed and already the convention for user-scoped data.

(2) is the smaller change and keeps the exposed-schema list stable; (1) is right if logs is meant to hold more than this.

Acceptance

  • POST and GET /v1/feedback work against a live stack
  • The CCPA Communications category counts platform feedback again, and its description says so
  • Whichever route is taken, logs.user_feedback is either reachable or gone — not left as an unreachable table the code still references

Found while fixing #652. Note that the schema guard in #651 cannot catch this class: it skips schemas absent from types.ts, and logs is absent precisely because it is not exposed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    agent-readybug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions