Skip to content

Report the Postgres skill's row-level-security and constraint defects upstream, then re-evaluate it #674

Open

Description

@devantler

🤖 Generated by the Agentic Engineer (interactive Claude Code session)

Problem

PostgreSQL guidance is still a high-importance gap (#653). The one vendor-maintained candidate, supabase-postgres-best-practices, was not adopted at v0.1.9 because the review of #673 found defects in its own examples. Three of them were verified against the files:

  • row-level security that takes the tenant's identity from a session setting any querying role can change, and that carries over between pooled connections;
  • a helper function whose execute right is revoked from the role that must call it, and a lookup described as not per-row that is per-row;
  • "add a constraint only if missing" checks that match by name on any table, and a unique-constraint example that takes a blocking lock under a heading that calls it safe.

Nothing tells the upstream, so the candidate stays unusable for us however long we wait.

Proposed direction

  1. Decide whether reporting upstream is worth it under the portfolio's rules for third-party contributions (necessity, no portfolio alternative, the project's contribution and AI policies). Record that on this issue before any external write.
  2. If it is: report the verified defects to the upstream, minimal and reproducible. The 29 review threads on docs(coverage): record why the Supabase Postgres skill is not adopted #673 are the source material.
  3. Re-evaluate the skill when a release corrects them, this time reading the examples for correctness before recording a decision. Compare any better-maintained candidate that has appeared.

Acceptance criteria

  • The decision to report or not is recorded here with its reasons.
  • If reported: the upstream issue or pull request is linked, and it contains no portfolio-private detail.
  • A re-evaluation is recorded here when the upstream ships a correction, or this issue is closed with the reason no re-evaluation will happen.

Size

Small.

Follows from #653 and #673.

🤖 Generated with Claude Code

Activity

  1. added theissue type on Nov 10, 2026
  2. moved this to 📥 Backlog in 🌊 Project Boardon Nov 10, 2026
  3. devantler commented on Nov 11, 2026

    @devantler
    ContributorAuthor

    🤖 Generated by the Agentic Engineer (interactive Claude Code session)

    Status, 2026-11-11. I checked the upstream's issue list before writing anything there.

    • One of the defects is already reported upstream and still open: supabase/agent-skills#499 (the helper function whose execute right is taken from the role that needs it). No second report is needed for it.
    • I found no upstream report for the others: tenant identity read from a session setting that the querying role can change and that carries over between pooled connections, the constraint checks that match by name on any table, and the unique-constraint example that takes a blocking lock. These still have to be re-checked against the upstream's current text and then reported, as one minimal issue.

    So this issue stays open and is not blocked: the next step is ours. The decision the first acceptance criterion asks for is "report": the gap is rated high, the candidate is the only vendor-maintained one, and a local copy cannot be edited.

    🤖 Generated with Claude Code

  4. devantler commented on Nov 11, 2026

    @devantler
    ContributorAuthor

    🤖 Generated by the Agentic Engineer (interactive Claude Code session)

    Decision: report the remaining defects upstream. Recorded here before anything is written there.

    • Why it is needed. The candidate is the only vendor-maintained PostgreSQL skill, and it stays unusable for us while its examples are wrong. Nobody has told the upstream about these two points: I searched its issues again today and found only user-feedback: RLS helper example revokes EXECUTE from the role that evaluates the policy supabase/agent-skills#499, which covers the helper-function defect.
    • Why nothing inside the portfolio can do it. The skill would be a synced copy. A local correction is overwritten by the next update, and the standing direction for a defect in a third-party skill is to fix it at its source.
    • Their rules. The upstream's contribution guide asks for an issue for any improvement to an existing reference and provides a "User feedback" template. It has no rule against AI-assisted reports and asks for no attribution, so the reports carry none. The repository is a public vendor project with no connection to the maintainer's employment.
    • What I re-checked first. At upstream main (c9be0e9, last changed 2 October) both defects are still in the text: security-rls-basics.md sets the tenant identity with a session-level set, and two of the three "add only if missing" examples in schema-constraints.md look the constraint up by name alone.

    The reports are two short issues, one per reference file, in the upstream's template. Links follow in the next comment. This issue then waits for an upstream correction, as its third criterion says.

    🤖 Generated with Claude Code

  5. devantler commented on Nov 11, 2026

    @devantler
    ContributorAuthor

    🤖 Generated by the Agentic Engineer (interactive Claude Code session)

    Reported upstream. Both reports are in the upstream's own "User feedback" template and contain nothing about this portfolio.

    Each claim was reproduced on PostgreSQL 17.11 before filing: the second request on one connection still saw the first user's rows, and a negative age was accepted after the name-only check skipped the constraint.

    Two of the three criteria here are met. The issue stays open for the third: re-evaluate the skill when the upstream ships a correction.

    Blocker: supabase/agent-skills#646 | upstream | last-verified 2026-11-11: open, filed today; upstream main (c9be0e9) still has both defects (also supabase/agent-skills#647 and #499).

    🤖 Generated with Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Fields

    Priority

    None yet

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions