Skip to content

fix(db): grant service_role on core.construction_projects (#732 follow-up) - #749

Merged
thinkclay merged 1 commit into
mainfrom
claude/fix-construction-projects-grant
Sep 11, 2026
Merged

thinkclay merged 1 commit into
mainfrom
claude/fix-construction-projects-grant

Conversation

@thinkclay

Copy link
Copy Markdown
Contributor

GET /v1/work-logs/public-feed answered 500 in production:

permission denied for table construction_projects

The handler reads with the service client and joins the work log's project. It returned 401 to anonymous callers until #732 opened it to the public page it was built for — and that 401 was hiding the grant gap, because the request never reached the query. Local carries the grant, production does not, so no amount of local testing would have found it.

Same defect as #481 and migration 352, which granted eight tables but not this one.

The wider finding

A sweep of production found 29 core tables service_role cannot read. 352 covers eight. This covers the one actively breaking a public page; the remaining twenty are filed separately rather than swept into an incident fix, so each is a decision rather than a side effect.

🤖 Generated with Claude Code

…w-up)

GET /v1/work-logs/public-feed answered 500 in production:

    permission denied for table construction_projects

The handler reads with the service client and joins the work log's project. It
had returned 401 to anonymous callers until #732 opened it to the public page it
was built for, and that 401 was hiding the grant gap — the request never reached
the query. Local carries the grant, production does not, so local testing could
not have found it.

Same defect as #481 and migration 352, which granted eight tables but not this
one. A sweep of production found 29 core tables service_role cannot read. 352
covers eight; this covers the one actively breaking a public page. The remaining
twenty are filed separately rather than swept into an incident fix.

Co-Authored-By: Claude Opus 5 <[email protected]>
@thinkclay
thinkclay merged commit ce4709c into main Sep 11, 2026
8 checks passed
@thinkclay
thinkclay deleted the claude/fix-construction-projects-grant branch September 11, 2026 21:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant