fix(staging): publish voice benchmark Realtime - #506
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
📝 WalkthroughWalkthroughThis PR adds a protected staging-only repair for the ChangesVoice benchmark publication repair
Estimated code review effort: 5 (Critical) | ~120 minutes Sequence Diagram(s)sequenceDiagram
participant ReleaseCaptain
participant GitHubActions
participant PublicationRunner
participant StagingDatabase
ReleaseCaptain->>GitHubActions: dispatch with approved staging inputs
GitHubActions->>GitHubActions: validate actor, source SHA, project, and provider-mutation flags
GitHubActions->>PublicationRunner: run schema, contract, dry-run, and apply checks
PublicationRunner->>StagingDatabase: inspect migration and security posture
PublicationRunner->>StagingDatabase: apply the single publication repair when pending
StagingDatabase-->>PublicationRunner: return final publication and security posture
PublicationRunner-->>GitHubActions: write redacted success or failure receipt
GitHubActions-->>ReleaseCaptain: upload the seven-day result artifact
Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Note This review was completed with usage-based billing: files reviewed beyond your plan's included limits are billed at $0.25/file. Track spend and usage in your billing settings. Comment |
|
Caution CodeRabbit couldn't update its existing comment. The review summary may be out of date. Error details |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 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 `@docs/architecture/deployment.md`:
- Around line 75-76: Update the production-exclusion sentence in the deployment
documentation to say “All four migrations,” matching the four-entry Realtime
repair exclusion list and ADR 0039; keep the surrounding production-scope
wording unchanged.
In `@scripts/database/run-staging-realtime-voice-benchmark-runs-publication.mjs`:
- Around line 463-466: Update both select_policy_inventory predicates in the
benchmark publication query to use the canonical single authenticated policy
identity returned by the query, or remove the redundant predicates and rely on
policy_inventory. Ensure pending and applied checks accept the valid database
state represented by “workspace members can read voice benchmark runs.”
🪄 Autofix
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: ASSERTIVE
Plan: Pro Plus
Run ID: 9c64fce4-63e5-4955-8ad9-8f04e829a1b6
📒 Files selected for processing (37)
.github/workflows/schema-baseline.yml.github/workflows/staging-realtime-voice-benchmark-runs-publication.ymldocs/adr/0030-serialize-shared-staging-operations.mddocs/adr/0039-protected-staging-realtime-voice-benchmark-runs-publication.mddocs/adr/README.mddocs/architecture/deployment.mddocs/database/production-cutoff-readiness-contract.jsondocs/database/staging-realtime-messages-manifest-delta.jsondocs/runbooks/staging-realtime-voice-benchmark-runs-publication.mddocs/runbooks/staging-release-security-migration.mdscripts/database/build-schema-baseline.mjsscripts/database/build-schema-baseline.test.mjsscripts/database/normalize-staging-realtime-messages-manifest.mjsscripts/database/normalize-staging-realtime-messages-manifest.test.mjsscripts/database/product-proof-aggregate-capture.sqlscripts/database/production-cutoff-readiness.mjsscripts/database/production-cutoff-readiness.test.mjsscripts/database/production-forward-migrations.test.mjsscripts/database/realtime-pipeline-incidents-publication-blank-preflight.test.mjsscripts/database/realtime-voice-benchmark-runs-publication-blank-preflight.sqlscripts/database/realtime-voice-benchmark-runs-publication-blank-preflight.test.mjsscripts/database/realtime-voice-benchmark-runs-publication-contract.mjsscripts/database/run-product-proof-aggregate-capture.mjsscripts/database/run-product-proof-aggregate-capture.test.mjsscripts/database/run-staging-realtime-pipeline-incidents-publication.test.mjsscripts/database/run-staging-realtime-voice-benchmark-runs-publication.mjsscripts/database/run-staging-realtime-voice-benchmark-runs-publication.test.mjsscripts/database/run-staging-reconciliation-integration.mjsscripts/database/run-staging-reconciliation-integration.test.mjsscripts/database/staging-migration-ledger.mjsscripts/database/staging-reconciliation-disposable-fixture.sqlscripts/database/verify-schema-baseline.test.mjsscripts/product-proof-network-policy.test.mjsscripts/staging-shared-environment-concurrency.test.mjssupabase/baseline/forward-migrations.jsonsupabase/migrations/20260812062315_repair_product_proof_voice_benchmark_runs_realtime_publication.sqlsupabase/tests/database/realtime_voice_benchmark_runs_publication.pgtap.sql
Purpose
Repair the exact staging Realtime publication omission proven by governed product-proof run
31569365811:public.voice_benchmark_runsreturned the fixedsubscription-not-enabledserver-system classification on Channels desktop.Included scope
public.voice_benchmark_runsto existingsupabase_realtime;Explicit exclusions
Architecture placement
Current owner / directory: existing one-purpose staging migration controls under
scripts/database/,.github/workflows/,supabase/migrations/, and their ADR/runbook contracts.Dependencies and duplicate-system check: extends the separately trust-bound messages, workspace-channels and pipeline-incidents publication-repair pattern. The runner stays table-specific so a shared generic matcher cannot silently widen database mutation authority.
Security and tenancy impact
Data impact
Verification
Release safety
Documentation and generated files
Completion check
origin/main.Policy exceptions (leave blank when none apply)
PR-size exception rationale: 37 files and 3,956 insertions exceed the normal guideline because the one-purpose runner intentionally duplicates the independently reviewed trust boundary instead of creating generic database mutation authority; 1,556 lines are hostile/adversarial runner tests and the remainder includes the exact runner, blank preflight, pgTAP, workflow, migration, and mandatory repository-wide ledger/security pins. Runtime mutation remains one SQL statement.
Retained branch reason / owner / review date / maximum retention date:
Summary by CodeRabbit
New Features
voice_benchmark_runsthrough Supabase Realtime.Documentation
Tests