Skip to content

[Task]: Validate PostgreSQL task-lock helper EXECUTE privilege at startup #197

Closed

Description

@MisterVVP

Goal

Fail fast when an externally managed PostgreSQL schema is configured for local task-aware push writes but the effective push-store role cannot execute the task-lock helper.

Problem

With auto_create_schema=false, managed-schema validation currently verifies that the task-aware migration is present and structurally valid, including:

  • the a2a_lock_task_for_push_config(TEXT) helper exists and matches the expected implementation;
  • the helper is safely owned;
  • the helper owner has the required schema/table privileges;
  • PUBLIC does not have EXECUTE;
  • the expected migration marker and related triggers/helpers are present.

However, validation still does not verify that the effective push-store role itself has EXECUTE on a2a_lock_task_for_push_config(TEXT).

A split-role deployment can therefore construct PostgresPushNotificationStore successfully and fail only on the first local CreateOrUpdateForTask call with a PostgreSQL permission error.

The current task-aware-push-config-v3 documentation already requires the invoking push-store role to have helper EXECUTE, so startup validation should enforce the same contract.

Scope

  • For the local PostgreSQL task-aware capability, validate at construction time that the effective push-store role can execute a2a_lock_task_for_push_config(TEXT).
  • Preserve the existing requirement that PUBLIC must not have EXECUTE.
  • Keep validation startup-only; do not add catalog queries to request hot paths.
  • Keep push-only / external-authority stores working without task-table access or helper execution privileges when task-aware objects are intentionally absent.
  • Return an actionable schema/startup validation error when the effective role lacks helper EXECUTE.
  • Add focused PostgreSQL conformance coverage for the missing-grant case.
  • Update storage documentation if necessary.

Acceptance criteria

  • A local task-aware store with the documented helper grant starts normally.
  • A local task-aware store without helper EXECUTE fails during construction/schema validation rather than on the first write.
  • PUBLIC EXECUTE remains rejected.
  • Push-only / external-authority configurations remain unaffected.
  • No additional catalog queries or privilege checks are added to create/get/list hot paths.

Activity

  1. changed the title [-]Validate PostgreSQL task-lock helper EXECUTE privilege at startup[/-] [+][Task]: Validate PostgreSQL task-lock helper EXECUTE privilege at startup[/+] on Aug 9, 2026
  2. self-assigned this
    on Sep 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions