Share central runtime capacity across project routes #750

Open
toasterson wants to merge 2 commits from fix/shared-runtime-capacity-20260922 into main
Owner

Central review and implementation routes counted open owners per project, while their shared runtime accepts one provider job. Anima WI409 and Akh WI296 therefore occupied the same maat runtime; one progressed while the other repeatedly received busy and retired with unknown outcome.

Count retained owners across projects per executor, resolve the conservative shared limit, and serialize both admission paths under one transaction lock. Project/configuration locks precede the shared lock; unknown and retiring owners continue to consume capacity. Configured discovery capacity also deduplicates shared executors.

Validation: PostgreSQL staging/admission integration passes, including concurrent different-project admissions, retained ownership after terminal session state, release on owner closure, independent executors, and cross-project review refusal. Reverting the implementation admission to the old code makes the concurrency regression fail. cargo clippy -p anima-server --lib --test central_session_staging -- -D warnings passes.

Work item: 01a0c8bb-790d-7ab1-a6bd-08d82ca91faa. Exact head: 562cf690ee

Central review and implementation routes counted open owners per project, while their shared runtime accepts one provider job. Anima WI409 and Akh WI296 therefore occupied the same maat runtime; one progressed while the other repeatedly received busy and retired with unknown outcome. Count retained owners across projects per executor, resolve the conservative shared limit, and serialize both admission paths under one transaction lock. Project/configuration locks precede the shared lock; unknown and retiring owners continue to consume capacity. Configured discovery capacity also deduplicates shared executors. Validation: PostgreSQL staging/admission integration passes, including concurrent different-project admissions, retained ownership after terminal session state, release on owner closure, independent executors, and cross-project review refusal. Reverting the implementation admission to the old code makes the concurrency regression fail. cargo clippy -p anima-server --lib --test central_session_staging -- -D warnings passes. Work item: 01a0c8bb-790d-7ab1-a6bd-08d82ca91faa. Exact head: 562cf690ee27c9e7795560011fcfa6dd366520bf
fix: share central executor capacity across projects
Some checks failed
CI / conflict-check (push) Has been cancelled
CI / test (push) Has been cancelled
562cf690ee
Run shared-runtime admission regression in database CI
All checks were successful
CI / conflict-check (push) Successful in 2m13s
CI / test (push) Successful in 11m25s
bfa9909bf0
All checks were successful
CI / conflict-check (push) Successful in 2m13s
CI / test (push) Successful in 11m25s
This pull request has changes conflicting with the target branch.
  • .solstice/job.sh
  • crates/anima-server/tests/central_session_staging.rs
View command line instructions

Manual merge helper

Use this merge commit message when completing the merge manually.

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin fix/shared-runtime-capacity-20260922:fix/shared-runtime-capacity-20260922
git switch fix/shared-runtime-capacity-20260922

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch main
git merge --no-ff fix/shared-runtime-capacity-20260922
git switch fix/shared-runtime-capacity-20260922
git rebase main
git switch main
git merge --ff-only fix/shared-runtime-capacity-20260922
git switch fix/shared-runtime-capacity-20260922
git rebase main
git switch main
git merge --no-ff fix/shared-runtime-capacity-20260922
git switch main
git merge --squash fix/shared-runtime-capacity-20260922
git switch main
git merge --ff-only fix/shared-runtime-capacity-20260922
git switch main
git merge fix/shared-runtime-capacity-20260922
git push origin main
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
toasterson/Anima!750
No description provided.