File Search worker finds no work when the database user has neither superuser nor BYPASSRLS
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 38/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- postgresql, typescript
調査の方向性
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.
索引モデルが issue の本文から書いたものです。
説明
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.
- 主要言語
- TypeScript
- スター
- 856
- フォーク
- 82
- 平均マージ
- 6時間 34分
- マージ済み PR(30日)
- 362
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
HelpCode-ai/anythingmcp のほかの issue
-
Adapter: Pixabayオープンadapter-request good first issue help wanted
難易度 2/5 半日 初心者へのやさしさ 82/100
HelpCode-ai/anythingmcp#1409 ·
メンテナーはふだん 1 日以内に返信
-
adapter-request good first issue help wanted
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
HelpCode-ai/anythingmcp#1405 ·
メンテナーはふだん 1 日以内に返信
-
Adapter: TGStatオープンadapter-request good first issue help wanted
難易度 3/5 1〜2日 初心者へのやさしさ 75/100
HelpCode-ai/anythingmcp#1413 ·
メンテナーはふだん 1 日以内に返信
-
adapter-request good first issue help wanted
難易度 3/5 1〜2日 初心者へのやさしさ 72/100
HelpCode-ai/anythingmcp#1412 ·
メンテナーはふだん 1 日以内に返信
-
Adapter: YCLIENTSオープンadapter-request good first issue help wanted
難易度 3/5 1〜2日 初心者へのやさしさ 70/100
HelpCode-ai/anythingmcp#1411 ·
メンテナーはふだん 1 日以内に返信
HelpCode-ai/anythingmcp の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 82/100
unocss/unocss#5421 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
needs-area
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
Azure/typespec-azure#5936 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 半日 初心者へのやさしさ 72/100
vercel-labs/scriptc#2910 ·
メンテナーはふだん 1 日以内に返信
-
automation missing-model model-sync provider:fireworks-ai
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
anomalyco/models.dev#12458 ·
メンテナーはふだん 1 日以内に返信