`bos db doctor` checks expected tables only in `public` — misreports plugin_schema (v2) and v1 topologies
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 52/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- typescript
- 領域
- database
調査の方向性
Read services/db/doctor.ts and compare its missing-tables query with the schemaName handling in runMigrations and detectDrift. Trace how workspace topology determines the data schema for plugins versus api/auth or dedicated databases. Done means the doctor checks expected tables in the schema used by each topology and reports healthy and drift states consistently.
索引モデルが issue の本文から書いたものです。
説明
Environment
everything-dev 2.0.0-rc.27
Where
services/db/doctor.ts — the missing-tables query hard-codes the schema:
```ts
// dist/services/db/doctor.mjs:60
SELECT table_name FROM information_schema.tables
WHERE table_schema = 'public'
AND table_name = ANY($1)
```
Context
v2 scopes plugin data tables into a `plugin_` schema on the shared database: the driver sets `search_path="plugin_,public"` per pooled connection, and `runMigrations` / `detectDrift` take a `schemaName` parameter they use for the same table-existence query. The migration journal is the shared `drizzle.__drizzle_migrations`. The doctor never learned about the namespace.
Failure modes (both observed on nearbuilders.org during a v1→v2 consolidation)
- v1 per-plugin database (tables in `public`, journal present): doctor reports `healthy` while boot fails with `drift-safe-repair` — because the runtime checks `plugin_`, not `public`.
- Consolidated shared database (tables in `plugin_`): doctor reports `drift-safe-repair` for completely healthy databases. Combined with `bos db repair` (see my related issue on repair) this invites destroying a working state.
Suggested fix
Resolve the workspace's data schema per topology — `plugin_` for plugins, `public` for api/auth/dedicated-DB — and query the expected tables there, mirroring `detectDrift`'s `schemaName` handling.
- 主要言語
- TypeScript
- スター
- 5
- フォーク
- 3
- 平均マージ
- 9時間 37分
- マージ済み PR(30日)
- 157
環境構築
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
NEARBuilders/everything-dev のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 77/100
NEARBuilders/everything-dev#628 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
NEARBuilders/everything-dev#400 ·
メンテナーはふだん 1 日以内に返信
-
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
NEARBuilders/everything-dev#664 ·
メンテナーはふだん 1 日以内に返信
-
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
NEARBuilders/everything-dev#661 ·
メンテナーはふだん 1 日以内に返信
-
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
NEARBuilders/everything-dev#660 ·
メンテナーはふだん 1 日以内に返信
NEARBuilders/everything-dev の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
CopilotKit/openmuse#215 ·
メンテナーはふだん 3 日以内に返信
-
b:minor bug
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
software-mansion/argent#1698 ·
メンテナーはふだん 1 日以内に返信
-
e2e-failure ready-to-code
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
redhat-developer/rhdh-plugin-export-overlays#4624 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信