Skip to content

Commit d9d9405

Browse files
committed
[recipes] Fix REVIEW-HIGH-1 (README): correct companion schema paths
Why: the Prerequisites section and the "requires" labels in the views table pointed at schemas/smart-ingest-tables and schemas/knowledge-graph, neither of which exists under those names. The actual schema directories shipped by the Wave 3 PRs are schemas/smart-ingest (ships public.ingestion_jobs) and schemas/entity-extraction (ships public.entity_extraction_queue). Users following the README literally would hit broken paths and not know where to install the optional prerequisites. Replace every reference with the real directory names (incl. the Troubleshooting section and the Steps §1 review block), and reframe the "comment out views 6-8" guidance now that the SQL guards missing tables with to_regclass instead of erroring. Paired with the SQL guard commit, this closes HIGH-1 end-to-end.
1 parent 78cada7 commit d9d9405

1 file changed

Lines changed: 12 additions & 12 deletions

File tree

recipes/brain-health-monitoring/README.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -13,18 +13,18 @@ Adds 8 monitoring views to your Open Brain database that answer the most common
1313
| `ops_enrichment_gaps` | Thoughts that haven't been enriched yet |
1414
| `ops_type_distribution` | Type breakdown (all-time, 7-day, 24-hour windows) |
1515
| `ops_sensitivity_distribution` | Sensitivity tier breakdown |
16-
| `ops_ingestion_summary` | Ingestion job status and counts (requires smart-ingest-tables) |
17-
| `ops_stalled_entity_queue` | Queue items stuck or permanently failed (requires knowledge-graph) |
18-
| `ops_graph_coverage` | Entity extraction progress and coverage percentage (requires knowledge-graph) |
16+
| `ops_ingestion_summary` | Ingestion job status and counts (requires `schemas/smart-ingest`) |
17+
| `ops_stalled_entity_queue` | Queue items stuck or permanently failed (requires `schemas/entity-extraction`) |
18+
| `ops_graph_coverage` | Entity extraction progress and coverage percentage (requires `schemas/entity-extraction`) |
1919

20-
Views 1-5 work with the base enhanced thoughts schema. Views 6-8 require optional schemas and will error if those tables don't exist — run only the views that match your installed schemas.
20+
Views 1-5 work with the base enhanced thoughts schema. Views 6-8 are wrapped in `to_regclass` guards, so the SQL file runs cleanly on any shape of install — missing optional tables produce a `NOTICE` and the corresponding view is skipped rather than failing.
2121

2222
## Prerequisites
2323

2424
- Working Open Brain setup ([guide](../../docs/01-getting-started.md))
2525
- **Enhanced thoughts schema** applied — install `schemas/enhanced-thoughts` (required for all views)
26-
- Optional: `schemas/smart-ingest-tables` for the ingestion summary view
27-
- Optional: `schemas/knowledge-graph` for queue and graph coverage views
26+
- Optional: `schemas/smart-ingest` for the ingestion summary view (view 6)
27+
- Optional: `schemas/entity-extraction` for the stalled queue and graph coverage views (views 7-8)
2828

2929
## Steps
3030

@@ -38,10 +38,10 @@ Views 1-5 work with the base enhanced thoughts schema. Views 6-8 require optiona
3838
Open `ops-views.sql` and check which views apply to your setup:
3939

4040
- **Views 1-5** (source volume, recent thoughts, enrichment gaps, type/sensitivity distribution): Work with any Open Brain install that has the enhanced thoughts schema.
41-
- **View 6** (ingestion summary): Requires the `ingestion_jobs` table from `schemas/smart-ingest-tables`.
42-
- **Views 7-8** (stalled queue, graph coverage): Require the `entity_extraction_queue` table from `schemas/knowledge-graph`.
41+
- **View 6** (ingestion summary): Requires the `ingestion_jobs` table from `schemas/smart-ingest`.
42+
- **Views 7-8** (stalled queue, graph coverage): Require the `entity_extraction_queue` table from `schemas/entity-extraction`.
4343

44-
If you haven't installed the optional schemas, comment out views 6-8 before running.
44+
You do not need to comment anything out. Views 6-8 are wrapped in `to_regclass` guards; if the underlying tables are missing, the DO blocks emit a `NOTICE` and skip the view without aborting the file.
4545

4646
### 2. Run the SQL
4747

@@ -114,10 +114,10 @@ After running the SQL, you should be able to query any `ops_*` view from the Sup
114114
## Troubleshooting
115115

116116
**"relation ops_ingestion_summary does not exist"**
117-
The `ingestion_jobs` table hasn't been created. Install `schemas/smart-ingest-tables` first, or comment out view 6 in the SQL file.
117+
The `ingestion_jobs` table isn't installed, so the guarded DO block skipped view 6 and emitted a `NOTICE`. Install `schemas/smart-ingest` and re-run `ops-views.sql` to create the view.
118118

119-
**"relation entity_extraction_queue does not exist"**
120-
The knowledge graph schema hasn't been applied. Install `schemas/knowledge-graph` first, or comment out views 7-8.
119+
**"relation ops_stalled_entity_queue does not exist" or "relation ops_graph_coverage does not exist"**
120+
The `entity_extraction_queue` table isn't installed, so views 7-8 were skipped. Install `schemas/entity-extraction` and re-run `ops-views.sql`.
121121

122122
**Views return empty results**
123123
This is normal for a fresh install with no thoughts. Capture a few thoughts first, then query the views.

0 commit comments

Comments
 (0)