Repository navigation
fix(OMN-13666): runtime entrypoint — secondary-DB schema-fingerprint stamp failure is non-fatal - #2124
Conversation
…fatal in runtime entrypoint The runtime image entrypoint stamps schema fingerprints into db_metadata per-DB before starting the kernel. In prod the runtime DB user lacks write permission on the omniintelligence (secondary, non-owned) database's db_metadata table, so its stamp failed with 'permission denied for table db_metadata'; after 5 attempts the entrypoint exited 1 and the container crash-looped, holding all 7 onex-prod runtime deployments at 0/1. Introduce a principled required-vs-best-effort stamp policy: - PRIMARY/owned DB (omnibase_infra) stays REQUIRED: a failed stamp aborts boot (exit 1) loudly so a NULL/stale-fingerprint kernel never starts. - SECONDARY/non-owned DB (omniintelligence) is BEST-EFFORT: a failed stamp logs a clear WARNING and boot proceeds (exit 0). No DB GRANT added (operator chose the entrypoint-policy route). No gate weakened. Adds behavioral tests that run the real entrypoint with a stubbed python (primary failure -> exit 1; secondary failure -> exit 0) plus static source guards and shellcheck. Evidence-Ticket: OMN-13666
|
Warning Review limit reached
More reviews will be available in 46 minutes and 27 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 (3)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Summary
The runtime image entrypoint (
docker/entrypoint-runtime.sh) stamps schemafingerprints into
db_metadataper-DB before starting the kernel. In prod theruntime DB user lacks write permission on the omniintelligence (secondary,
non-owned) database's
db_metadatatable, so its stamp failed withpermission denied for table db_metadata; after 5 attempts the entrypointexited 1 and the container crash-looped, holding all 7 onex-prod runtime
deployments at 0/1. The runtime's OWN database (omnibase_infra) stamps fine.
This introduces a principled required-vs-best-effort stamp policy:
retries aborts boot (
exit 1) loudly, so a NULL/stale-fingerprint kernelnever starts with a worse downstream symptom.
logs a clear
WARNINGand boot proceeds (exit 0).The mechanism is a third
requiredargument tostamp_fingerprint(required|
optional); the owned DB is passedrequired, othersoptional.No DB GRANT added (operator chose the entrypoint-policy route).
No gate weakened (no skip token, no
--no-verify, no continue-on-error).Tests
tests/unit/docker/test_runtime_entrypoint_stamp_tolerance.pyexecutes thereal entrypoint with a stubbed
pythonwhose per-manifest exit code isenv-driven:
exit 1), kernel never startsWARNING, boot proceeds (exit 0)exit 0Full unit suite: 20840 passed, 20 skipped. shellcheck clean. pre-commit clean.
Evidence
Evidence-Source: OCC#3216
Evidence-Ticket: OMN-13666
Closes OMN-13666.