Skip to content

fix(OMN-13666): runtime entrypoint — secondary-DB schema-fingerprint stamp failure is non-fatal - #2124

Merged
jonahgabriel merged 1 commit into
devfrom
jonah/omn-13666-entrypoint-stamp-tolerance
Jun 27, 2026
Merged

jonahgabriel merged 1 commit into
devfrom
jonah/omn-13666-entrypoint-stamp-tolerance

Conversation

@jonahgabriel

@jonahgabriel jonahgabriel commented Jun 27, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

The runtime image entrypoint (docker/entrypoint-runtime.sh) 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. The runtime's OWN database (omnibase_infra) stamps fine.

This introduces a principled required-vs-best-effort stamp policy:

  • PRIMARY/owned DB (omnibase_infra) stays REQUIRED — a failed stamp after
    retries aborts boot (exit 1) loudly, so a NULL/stale-fingerprint kernel
    never starts with a worse downstream symptom.
  • SECONDARY/non-owned DB (omniintelligence) is BEST-EFFORT — a failed stamp
    logs a clear WARNING and boot proceeds (exit 0).

The mechanism is a third required argument to stamp_fingerprint (required
| optional); the owned DB is passed required, others optional.

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.py executes the
real entrypoint with a stubbed python whose per-manifest exit code is
env-driven:

  • primary-DB stamp failure -> entrypoint aborts boot (exit 1), kernel never starts
  • secondary-DB stamp failure -> WARNING, boot proceeds (exit 0)
  • clean run -> both stamped, exit 0
  • secondary skipped when its DB URL is unset
  • static source guards + shellcheck-clean

Full unit suite: 20840 passed, 20 skipped. shellcheck clean. pre-commit clean.

Evidence

Evidence-Source: OCC#3216
Evidence-Ticket: OMN-13666

Closes OMN-13666.

…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
@coderabbitai

coderabbitai Bot commented Jun 27, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@jonahgabriel, we couldn't start this review because you've reached your PR review rate limit.

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 @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: aa9472e9-9a72-4f7e-ae73-96dad4b9e87f

📥 Commits

Reviewing files that changed from the base of the PR and between d740e0e and 4fd654f.

📒 Files selected for processing (3)
  • contracts/OMN-13666.yaml
  • docker/entrypoint-runtime.sh
  • tests/unit/docker/test_runtime_entrypoint_stamp_tolerance.py
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch jonah/omn-13666-entrypoint-stamp-tolerance

Comment @coderabbitai help to get the list of available commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant