Repository navigation
Description
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;
PUBLICdoes not haveEXECUTE;- 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
PUBLICmust not haveEXECUTE. - 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
EXECUTEfails during construction/schema validation rather than on the first write. PUBLIC EXECUTEremains rejected.- Push-only / external-authority configurations remain unaffected.
- No additional catalog queries or privilege checks are added to create/get/list hot paths.
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
[-]Validate PostgreSQL task-lock helper EXECUTE privilege at startup[/-][+][Task]: Validate PostgreSQL task-lock helper EXECUTE privilege at startup[/+]