fix(deployment): make reconciliation leases durable - #205
Merged
alongubkin merged 2 commits intoJul 25, 2026
Conversation
Persist delayed wakeups, keep eligible controller work under the active lease, renew ownership without rewriting deployment state, and stop execution promptly when ownership is lost.
Greptile SummaryThe PR makes deployment reconciliation leases durable and cancellable.
Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains; the lock-acquisition update now atomically rechecks the persisted wakeup predicate before claiming a deployment.
|
| Filename | Overview |
|---|---|
| crates/alien-manager/src/stores/sqlite/deployment.rs | Persists reconciliation wakeups and rechecks their eligibility in the atomic lock-acquisition update, resolving the previously reported race. |
| crates/alien-manager/src/loops/deployment.rs | Coordinates bounded lease ownership, renewal, cancellation, and deployment-loop execution. |
| crates/alien-deployment/src/runner.rs | Extends shared reconciliation-loop behavior for durable delays and prompt cancellation. |
| crates/alien-infra/src/core/executor.rs | Executes independent ready resource controllers concurrently within the configured bound. |
| crates/alien-manager/src/routes/sync.rs | Adds the authenticated lease-renewal API path and request handling. |
| crates/alien-manager/tests/sqlite_store_tests.rs | Expands SQLite store coverage for durable scheduling and lease behavior. |
Reviews (2): Last reviewed commit: "fix(manager): recheck delayed work durin..." | Re-trigger Greptile
Repeat wakeup eligibility in the atomic lock update so a concurrent checkpoint cannot schedule work after candidate selection and still be acquired early.
alongubkin
merged commit Jul 25, 2026
02acc4f
into
alon/alien-320-harden-aws-cloudformation-byoc-release-path
14 of 15 checks passed
alongubkin
deleted the
alon/alien-324-make-deployment-leases-cancellable-and-keep-short-controller
branch
July 25, 2026 19:27
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Why
A fresh multi-resource deployment exposed two framework failures: short controller waits were repeatedly yielded through the shared scheduler, and manager replicas could remain occupied retrying work after lease loss. This preserves durable checkpoints while avoiding unnecessary distributed scheduling between adjacent controller steps.
Validation
cargo check -p alien-infra -p alien-deployment -p alien-manager --all-featuresalien-infra,alien-deployment, andalien-managerpassed (1 skipped)Dependency
Stacked on #179.
Linear: https://linear.app/alienplatform/issue/ALIEN-324/make-deployment-leases-cancellable-and-keep-short-controller