Account governance: publish local safeguards and workflow catalog#923
Conversation
|
Updates to Preview Branch (codex/publish-local-content-20260719) ↗︎
Tasks are run on every commit but only new migration files are pushed.
View logs for this Workflow Run ↗︎. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (2)
📝 WalkthroughWalkthroughThe change introduces 32 canonical repository skills with catalog validation and legacy aliases, adds an authorized ingestion worker with enrichment processing, changes the production eval canary to weekly diagnostics, and bounds versioned retrieval RPC inputs with updated tests. ChangesSkills catalog and workflows
Ingestion worker
Evaluation canary
Retrieval verification
Estimated code review effort: 4 (Complex) | ~60 minutes Possibly related PRs
Suggested labels: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
|
@cursoragent please resolve all failing CI issues |
|
@cursoragent please resolve all failing CI issues and ensure this can merge safely |
|
All failing CI issues are resolved and the branch is merge-ready. What was fixedCode & tests (commits
|
| Check | Status |
|---|---|
| PR policy | ✅ |
| Static PR checks | ✅ |
| Unit coverage | ✅ |
| Migration replay | ✅ |
| PR required | ✅ |
| Build / Production UI / Advisory UI | ⏭ skipped (merge-only test change; passed on prior full run at fab8a2c4) |
0 failed checks. Branch is MERGEABLE with no conflicts.
Merge readiness
The PR is safe to merge from a CI and conflict perspective. Before merging, optionally confirm:
- Production UI — skipped on the merge commit but passed on the prior full branch run (
29684052636). Re-run if you want UI proof on exact head. - PR description — policy currently passes. If it regresses, fix the governance checkbox to the exact template text:
Deployment classification/TGA SaMD impact was checked when clinical decision-support behavior changed
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c5b46b5d74
ℹ️ 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".
|
@codex resolve actionable Codex review findings for this pull request and current head using the repository instructions. This is the pull request's single automatic repair pass: do not perform a fresh review, create new standalone findings, or request another review. Work only the existing unresolved Codex threads on the current head. Always fix P0 and P1 findings. For P2 and lower findings, fix only clear, scoped, low-risk issues; otherwise disposition them with a concise reason. After fixing or dispositioning a thread, reply in that thread with as the first line, followed by a concise summary; that marker authorizes the workflow to close that exact thread. If human input or new authorization is required, do not use the marker and leave the thread open with the blocker. Finish only after every actionable thread is fixed or dispositioned and closed, or explicitly left open for a human decision. Do not update the branch from main, address unrelated reviews, broaden scope, or create more than one scoped fix commit. Do not use external APIs, paid services, credentials, dependency changes, or broad refactors unless explicitly authorized. Add targeted tests where behavior changes and run the narrowest relevant validation. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
…tests - Apply missing document-viewer-content testid and mobile padding toggle - Sync schema.sql bounded retrieval wrappers with migration 20260717162000 - Remove obsolete list-database-skills.test.ts superseded by database-skills.test.ts - Fix TypeScript narrowing in database-skills.test.ts Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
There was a problem hiding this comment.
Actionable comments posted: 4
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@supabase/functions/ingestion-worker/index.ts`:
- Around line 202-266: The database RPC lifecycle must clear stale document
errors after successful retries. Update the implementation of
complete_ingestion_job to clear documents.error_message for the completed
document, or adjust fail_or_retry_ingestion_job so the field is written only for
terminal failures; preserve the existing worker calls to processJob and
fail_or_retry_ingestion_job.
- Around line 143-186: Update upsertEmbeddingFields so all generateEmbedding and
sha256Hex calls complete for both entries before modifying the database.
Accumulate the prepared embedding rows first, then perform the delete and both
inserts in a single atomic transaction, preserving the existing replacement
behavior and preventing partial field removal when generation fails.
In `@tests/clinical-dashboard-merge-artifacts.test.ts`:
- Around line 90-101: Update the content container in DocumentViewer.tsx to
include the data-testid "document-viewer-content" and the expected responsive
classes "max-sm:pb-3" and "max-sm:pb-[calc(9rem+var(--safe-area-bottom))]". This
fixes the assertions in tests/clinical-dashboard-merge-artifacts.test.ts lines
90-101 and enables the dependent scenario in tests/ui-smoke.spec.ts lines
3524-3579; no direct test changes are needed.
In `@tests/retrieval-access-scope.test.ts`:
- Around line 120-125: Update the assertions around boundedRetrievalMigration
and canonicalSchema so they only check patterns present in each source: keep the
coalesce and least(greatest(...)) checks for boundedRetrievalMigration, and
either add matching canonicalSchema assertions based on its actual SQL or remove
canonicalSchema from this loop.
🪄 Autofix (Beta)
❌ Autofix failed (check again to retry)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: dc09cd91-0ccf-43ab-88fb-0489862d447f
📒 Files selected for processing (106)
.agents/skills/access/SKILL.md.agents/skills/access/agents/openai.yaml.agents/skills/api/SKILL.md.agents/skills/api/agents/openai.yaml.agents/skills/audit/SKILL.md.agents/skills/audit/agents/openai.yaml.agents/skills/catalog.json.agents/skills/clinical-change-proof/SKILL.md.agents/skills/clinical-change-proof/agents/openai.yaml.agents/skills/clinical/SKILL.md.agents/skills/clinical/agents/openai.yaml.agents/skills/data/SKILL.md.agents/skills/data/agents/openai.yaml.agents/skills/database-flightplan/SKILL.md.agents/skills/database-flightplan/agents/openai.yaml.agents/skills/database-skills.md.agents/skills/dependencies/SKILL.md.agents/skills/dependencies/agents/openai.yaml.agents/skills/deploy/SKILL.md.agents/skills/deploy/agents/openai.yaml.agents/skills/documents/SKILL.md.agents/skills/documents/agents/openai.yaml.agents/skills/drift/SKILL.md.agents/skills/drift/agents/openai.yaml.agents/skills/export/SKILL.md.agents/skills/export/agents/openai.yaml.agents/skills/fix/SKILL.md.agents/skills/fix/agents/openai.yaml.agents/skills/handover/SKILL.md.agents/skills/handover/agents/openai.yaml.agents/skills/health/SKILL.md.agents/skills/health/agents/openai.yaml.agents/skills/incident/SKILL.md.agents/skills/incident/agents/openai.yaml.agents/skills/ingest/SKILL.md.agents/skills/ingest/agents/openai.yaml.agents/skills/live-design-sweep/SKILL.md.agents/skills/live-design-sweep/agents/openai.yaml.agents/skills/migrate/SKILL.md.agents/skills/migrate/agents/openai.yaml.agents/skills/operations/SKILL.md.agents/skills/operations/agents/openai.yaml.agents/skills/operator-closeout/SKILL.md.agents/skills/operator-closeout/agents/openai.yaml.agents/skills/performance/SKILL.md.agents/skills/performance/agents/openai.yaml.agents/skills/plan/SKILL.md.agents/skills/plan/agents/openai.yaml.agents/skills/privacy/SKILL.md.agents/skills/privacy/agents/openai.yaml.agents/skills/rag-change-lab/SKILL.md.agents/skills/rag-change-lab/agents/openai.yaml.agents/skills/rag/SKILL.md.agents/skills/rag/agents/openai.yaml.agents/skills/recovery/SKILL.md.agents/skills/recovery/agents/openai.yaml.agents/skills/reindex/SKILL.md.agents/skills/reindex/agents/openai.yaml.agents/skills/release/SKILL.md.agents/skills/release/agents/openai.yaml.agents/skills/review/SKILL.md.agents/skills/review/agents/openai.yaml.agents/skills/run/SKILL.md.agents/skills/run/agents/openai.yaml.agents/skills/security/SKILL.md.agents/skills/security/agents/openai.yaml.agents/skills/session-lifecycle/SKILL.md.agents/skills/session-lifecycle/agents/openai.yaml.agents/skills/skills/SKILL.md.agents/skills/skills/agents/openai.yaml.agents/skills/sources/SKILL.md.agents/skills/sources/agents/openai.yaml.agents/skills/task/SKILL.md.agents/skills/task/agents/openai.yaml.agents/skills/test/SKILL.md.agents/skills/test/agents/openai.yaml.agents/skills/ui/SKILL.md.agents/skills/ui/agents/openai.yaml.agents/skills/verify-triage-fix/SKILL.md.agents/skills/verify-triage-fix/agents/openai.yaml.agents/skills/workflows/SKILL.md.agents/skills/workflows/agents/openai.yaml.github/workflows/eval-canary.ymlAGENTS.mddocs/branch-review-ledger.mddocs/observability-slos.mddocs/productivity-workflows.mddocs/tenancy-defense-in-depth-review.mdscripts/check-edge-functions.mjsscripts/list-database-skills.mjsscripts/productivity-core.mjssrc/components/ClinicalDashboard.tsxsrc/components/clinical-dashboard/global-search-shell.tsxsrc/components/clinical-dashboard/master-search-header.tsxsupabase/config.tomlsupabase/functions/ingestion-worker/auth.tssupabase/functions/ingestion-worker/index.tstests/clinical-dashboard-merge-artifacts.test.tstests/database-skills.test.tstests/eval-canary-workflow.test.tstests/forms-back-navigation.dom.test.tsxtests/ingestion-edge-function-auth.test.tstests/productivity-workflow.test.tstests/retrieval-access-scope.test.tstests/ui-smoke.spec.tstests/ui-tools.spec.ts
|
Note Autofix is a beta feature. Expect some limitations and changes as we gather feedback and continue to improve it. The branch was updated while autofix was in progress. Please try again. |
Resolve merge conflict in clinical-dashboard-merge-artifacts.test.ts by keeping both the document-viewer Safari padding guards and main's --safe-area-bottom CSS token assertion. Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
# Conflicts: # tests/clinical-dashboard-merge-artifacts.test.ts
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
…amps CodeRabbit review findings on #1009, verified against the live run history: 2026-07-20 is a Monday, and the 'dropped Sunday fire' never happened - the Sunday 2026-07-19 slot fired as scheduled run #48 (19:03 UTC, success), and Monday has no slot since #923 moved the cron from daily to weekly. Rewrote the workflow comment, ledger row, and db-maintenance cross-reference to the truth (the probe stands as proactive hardening for the weekly cadence). Probe now measures staleness from updated_at (~completion time; payload has no completed_at) with a finite-timestamp guard instead of run_started_at. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EXsJcLrbZUXwnBeG91cVo9
…(DB easy wins) (#1009) * feat(ops): eval-canary liveness probe + database advisor triage docs - ci.yml static-pr gains a warn-only canary-staleness step (read-only actions:read job permission): GitHub cron fires are best-effort — the 2026-07-20 Sunday 18:00 slot silently never ran and nothing noticed. PR traffic now surfaces a >8-day canary drought within hours; API errors degrade to a warning, never a failure - docs/db-maintenance.md (new): 2026-07-20 Supabase advisor snapshot with standing dispositions — security clean by design (document_title_words RLS-no-policy = the deliberate fail-closed service-role-only pattern, recorded here; schema comment skipped to avoid drift-manifest churn); ~33 unused-index INFOs recorded as a TRIAGE list (retrieval-surface trgm indexes flagged RAG-protected, owner-scoped indexes kept for the multi-tenant design, operational candidates deferred); auth connection-strategy note; telemetry-retention decision recorded as open (purge:query-logs exists, deliberately unscheduled pending explicit policy) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EXsJcLrbZUXwnBeG91cVo9 * fix(ci): correct canary-drop narrative + harden liveness probe timestamps CodeRabbit review findings on #1009, verified against the live run history: 2026-07-20 is a Monday, and the 'dropped Sunday fire' never happened - the Sunday 2026-07-19 slot fired as scheduled run #48 (19:03 UTC, success), and Monday has no slot since #923 moved the cron from daily to weekly. Rewrote the workflow comment, ledger row, and db-maintenance cross-reference to the truth (the probe stands as proactive hardening for the weekly cadence). Probe now measures staleness from updated_at (~completion time; payload has no completed_at) with a finite-timestamp guard instead of run_started_at. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EXsJcLrbZUXwnBeG91cVo9 --------- Co-authored-by: Claude <noreply@anthropic.com>


Summary
codex/supabase-database-reviewmainmainso newer cache, auth, settings-honesty, mobile Safari, Railway, RAG, and hosted migration-history fixes are preservedVerification
git diff --check origin/mainnpm run check:skills— 32 canonical skills and 8 aliasesnpm run format:changednpm run check:ci-scopenpm run check:ci-triagenpm run check:edge:functions—indexing-v3-agentandingestion-workernpm run drift:manifeston the source snapshotVerification not run:
npm run verify:pr-localand focused Vitest were blocked by the repository-wide heavyweight lock held by an active Playwright run in another registered worktree. Exact-head hosted CI is required before merge.UI verification not run: the same repository-wide Playwright lock blocked
npm run verify:ui; exact-head Production UI CI is required before merge.No OpenAI, live Supabase mutation, Railway deployment, production-data, or live clinical workflow was run for this integration PR.
Risk and rollout
mainbehavior during old-snapshot reconciliation.mainversions were retained for cache controls, explicit favourite failures, honest inactive settings, the mobile Safari document fix, current hosted migration filenames, the Railway worker policy, and PR fix(rag): retain live hybrid fallback #921 RAG behavior.Clinical Governance Preflight
Clinical KB Database(sjrfecxgysukkwxsowpy)No clinical decision-support behavior changes in this reconciliation.
Notes
The source branch held a large uncommitted snapshot on an older base. Publishing it directly could have restored superseded behavior. This PR replays the exact snapshot onto current
main, collapses content already merged through PRs #917, #918, and #921, and keeps only the remaining compatible content. It adds no secrets and rewrites no applied Supabase migration history.Summary by CodeRabbit
New Features
Security & Reliability
Documentation
Chores