[recipes] Operational monitoring and brain health#13
[recipes] Operational monitoring and brain health#13alanshurafa wants to merge 7 commits intomainfrom
Conversation
Eight SQL views for monitoring source volumes, enrichment gaps, type/sensitivity distribution, ingestion pipeline status, entity extraction queue health, and graph coverage percentage. Views 1-5 work with base enhanced thoughts; views 6-8 require optional smart-ingest-tables and knowledge-graph schemas. Includes a runbook explaining what healthy looks like for fresh installs vs established brains. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 558b327661
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| GRANT SELECT ON public.ops_ingestion_summary TO service_role; | ||
| GRANT SELECT ON public.ops_stalled_entity_queue TO service_role; | ||
| GRANT SELECT ON public.ops_graph_coverage TO service_role; |
There was a problem hiding this comment.
Skip GRANTs when optional views are not created
The script instructs users without smart-ingest-tables/knowledge-graph to skip views 6–8, but these unconditional GRANT statements still reference those optional views. In that common setup, GRANT SELECT ON public.ops_ingestion_summary (and the next two grants) raises relation does not exist, so the run does not complete cleanly and later statements (including schema reload) may not execute depending on the SQL runner. Make these grants conditional or split optional views/grants into separate files so base installs can run the recipe without manual grant edits.
Useful? React with 👍 / 👎.
Add blank lines around headings (MD022), fenced code blocks (MD031), and between adjacent blockquotes (MD028). Fix broken link fragment (MD051) and remove extra blank line (MD012). No content changes. These errors were blocking CI on all open PRs since the lint check runs repo-wide. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Each section's numbered list now restarts at 1 instead of continuing the global count (3-14), satisfying markdownlint MD029/ol-prefix rule. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Views depending on ingestion_jobs and entity_extraction_queue are now wrapped in DO blocks that check for table existence before creating. GRANTs moved inside the conditionals so they can't fail when optional schemas aren't installed. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Summary
Views
ops_source_volume_24hops_recent_thoughtsops_enrichment_gapsops_type_distributionops_sensitivity_distributionops_ingestion_summaryops_stalled_entity_queueops_graph_coverageTest plan
🤖 Generated with Claude Code