Current API startup/shutdown owns execution, and provider stream replay lives in process memory. This first change in the non-disruptive deployment sequence introduces the SQL coordination boundary needed before separating those lifetimes.
Adds runtime identities and database-timed 30-second project leases, monotonic fencing, ordered actor-scoped idempotent command receipts, atomic command/state completion, and uncertain-command blocking. Stream batches reuse the existing append-only run ledger, durable sequence namespace, and owner-based retention. PostgreSQL CI starts when the new focused tests are selected. The design and validation documents record the remaining integration sequence.
Validation: 61 collected / 61 passed / 0 skipped on Python 3.12.14, with isolated SQLite databases and PostgreSQL 16 schemas. Changed-file Ruff lint/format, module Mypy, package metadata and diff checks pass. Independent review covered concurrency, leases, receipts, uncertainty, stream retention and migration/model alignment. Selection: .github/test-selection.json; evidence: docs/validation/non-disruptive-deployment-foundation.md. No full suite ran.
Draft / limitations: the repository diagnostic audit fails on an unchanged unclassified exception handler at src/nebula/v3/host_load.py:136. This is an internal foundation, not the complete deployment redesign: legacy execution does not yet use these fences, and overlapping Core processes remain unsafe. Pre-0031 launchers cannot resolve the new Alembic revision; supervisor-only migration and explicit worker compatibility are still required. API/execution extraction, handoff, desktop lifetime and reconnect, staged promotion/rollback, and production-LAN/browser/packaged-desktop acceptance remain outstanding. No Core was deployed, restarted or replaced.
Activity
2This pull request is a draft
Merging is unavailable until it is marked ready for review.