File Search worker finds no work when the database user has neither superuser nor BYPASSRLS
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 38/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- postgresql, typescript
Hướng nghiên cứu
Start with FileSearchRepository.withTenant and the worker's cross-workspace queries: scheduler lease claim, extend and release, the share sweep, and closing interrupted runs (#1417), none of which set app.current_org. Check the existing org_isolation policies on the file_* tables, then add a migration with a maintenance switch such as app.files_maintenance. Done means the worker finds work and sweeps shares under a non-superuser role without BYPASSRLS, covered by an integration test modeled on the #1395 CREATEROLE check.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Problem
The file_* tables use FORCE ROW LEVEL SECURITY; tenant queries go through FileSearchRepository.withTenant (app.current_org, optionally SET LOCAL ROLE amcp_files). The worker's cross-workspace maintenance queries do not set app.current_org:
- scheduler lease claim, extend and release;
- share sweep;
- closing interrupted runs (#1417).
They rely on the application user bypassing RLS: superuser, which is the case on AnythingMCP Cloud and in the default Docker Compose setup.
On a self-hosted install whose application user is neither superuser nor BYPASSRLS (some managed PostgreSQL offerings), those queries see no rows. Syncs then never start, and expired share files are not swept. Nothing errors.
Proposal
- A new migration extends the
org_isolationpolicies with an explicit maintenance switch, for exampleOR current_setting('app.files_maintenance', true) = 'on'. - The worker's cross-workspace queries run inside a transaction with
set_config('app.files_maintenance', 'on', true). - Add an integration test as a non-superuser role, like the one used for #1395's CREATEROLE check.
Found while hardening File Search on 2026-11-01. Relates to #1379, #1380, #1383.
- Ngôn ngữ chính
- TypeScript
- Star
- 856
- Fork
- 82
- Merge trung bình
- 6 giờ 34 phút
- Pull request đã merge (30 ngày)
- 362
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của HelpCode-ai/anythingmcp
-
Adapter: PixabayĐang mởadapter-request good first issue help wanted
Độ khó 2/5 Nửa ngày Mức phù hợp với người mới 82/100
HelpCode-ai/anythingmcp#1409 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
adapter-request good first issue help wanted
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
HelpCode-ai/anythingmcp#1405 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Adapter: TGStatĐang mởadapter-request good first issue help wanted
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 75/100
HelpCode-ai/anythingmcp#1413 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Adapter: Hepsiburada MarketplaceĐang mởadapter-request good first issue help wanted
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 72/100
HelpCode-ai/anythingmcp#1412 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Adapter: YCLIENTSĐang mởadapter-request good first issue help wanted
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 70/100
HelpCode-ai/anythingmcp#1411 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của HelpCode-ai/anythingmcp
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 82/100
unocss/unocss#5421 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
needs-area
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Azure/typespec-azure#5936 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 Nửa ngày Mức phù hợp với người mới 72/100
vercel-labs/scriptc#2910 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
automation missing-model model-sync provider:fireworks-ai
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
anomalyco/models.dev#12458 ·
Maintainer thường phản hồi trong vòng 1 ngày