Repository navigation
test(OMN-13593): pin delegation_events.context_pack_hash migration vendoring guard - #2110
Conversation
…ndoring guard The 0020_delegation_context_pack_hash.sql node-owned migration (OMN-13407) adds context_pack_hash to the canonical delegation_events table so the 4 delegation projection topics can read it. Without a vendoring guard, a future sync-node-migrations.sh re-vendor or renumber could silently drop the migration from the deployed forward tree — re-introducing the exact stability-lane drift this ticket reports (HandlerProjectionDelegation DLQs every event with 'column context_pack_hash of relation delegation_events does not exist', projection API returns HTTP 503 degraded on delegation/projection-delegation-events/ delegation.decisions/delegation.correlation-trace topics). Adds test_context_pack_hash_migration_vendored to TestVendoredViewMigrations, matching the existing 0017/0018/0019 vendoring-guard pattern: asserts the file is vendored, the column add is idempotent (ADD COLUMN IF NOT EXISTS ... DEFAULT '') so warm volumes reconcile, and the supporting index is present. Proven to FAIL when the migration is absent and PASS when vendored (TDD). Root cause is stability-lane-lag, not missing-migration-on-dev-HEAD: the migration is present on dev-HEAD (#2065) and verified applied on the dev lane — the omnidash_analytics.delegation_events table HAS the context_pack_hash text column and node:node_projection_delegation:0020_delegation_context_pack_hash.sql is tracked in schema_migrations.
|
Warning Review limit reached
More reviews will be available in 44 minutes and 44 seconds. Learn how PR review limits work. Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file). ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits. 🚦 How do rate limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
OMN-13593 — delegation_events projection 503: pin context_pack_hash migration vendoring guard
Closes the schema-drift class that DLQ'd 4 delegation projection topics on the stability lane with
column "context_pack_hash" of relation "delegation_events" does not existand returned HTTP 503 degraded.Root cause: stability-lane-lag, NOT missing-migration-on-dev-HEAD
The node-owned migration
0020_delegation_context_pack_hash.sql(OMN-13407, vendored under #2065) is present on dev-HEAD and verified applied on the dev lane (read-only psql probe ofomnibase-infra-postgres):omnidash_analytics.delegation_eventsHAS thecontext_pack_hashcolumn (text)node:node_projection_delegation:0020_delegation_context_pack_hash.sqlis tracked inpublic.schema_migrationsSo the migration applies correctly via the forward-migration runner; the stability-lane 503 is an image/warm-volume lag the redeploy workstream clears — not a source defect.
What this PR changes (source)
Unlike every prior delegation migration (0017/0018/0019),
0020had no vendoring regression guard. A futuresync-node-migrations.shre-vendor or renumber could silently drop it from the deployed forward tree and re-introduce this exact drift on the next fresh deploy. This PR addstest_context_pack_hash_migration_vendoredtoTestVendoredViewMigrations, pinning the migration permanently so a fresh deploy always materializes the column.0020_delegation_context_pack_hash.sql must be vendoredwhen the migration is moved aside (the exact fresh-deploy failure mode), PASSES when vendored.ADD COLUMN IF NOT EXISTS context_pack_hash TEXT NOT NULL DEFAULT ''— warm volumes reconcile), and the supporting index is present.tests/unit/migrations/green (41 passed, 1 skipped) in CI-equivalent env; mypy clean on the changed test file. Test-only diff.DoD note
DoD item 3 (4 topics return HTTP 200 on fresh redeploy) is a runtime redeploy owned by the redeploy workstream on a lane running the full projection API stack (stability/prod). This PR lands the source-side permanent guard + the dev-lane root-cause proof; no prod/stability/judge runtime mutation here.
Evidence-Source: OCC#3144
Evidence-Ticket: OMN-13593
Paired OCC receipt PR: OmniNode-ai/onex_change_control#3144 (contracts/OMN-13593.yaml + PASS dod_receipts).