gsxdsm
d7a02c4d5b
FN-7151: free scoped project concurrency slots
Free stopped or paused project engines' leaked slots without disturbing other projects.
- Add scoped semaphore accounting around the shared global agent pool.
- Return residual per-project slots after runtime stop drains aborted agents.
- Keep idle leak reconciliation scoped to the owning project so active projects retain their slots.
- Cover scoped release, reconciliation, project pause, and in-process runtime behavior with tests.
Files changed:
.../fn-7151-free-concurrency-slots-on-stop.md | 7 ++
docs/architecture.md | 2 +-
packages/engine/src/__tests__/concurrency.test.ts | 126 +++++++++++++++++++++
.../src/__tests__/project-engine-manager.test.ts | 60 ++++++++++
packages/engine/src/concurrency.ts | 123 +++++++++++++++++++-
packages/engine/src/project-engine.ts | 2 +-
.../runtimes/__tests__/in-process-runtime.test.ts | 51 +++++++++
packages/engine/src/runtimes/in-process-runtime.ts | 22 +++-
8 files changed, 385 insertions(+), 8 deletions(-)
Fusion-Task-Id: FN-7151
Fusion-Task-Lineage: e59e5e0c-67e8-4f80-a6b9-1ea4febaeb97
Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-06-27 20:55:59 -07:00
..
2026-06-27 20:55:59 -07:00
2026-04-24 19:39:20 -07:00
2026-06-27 18:10:19 -07:00
2026-04-13 16:35:06 -07:00
2026-06-27 18:10:19 -07:00
2026-06-08 15:19:27 -07:00
2026-06-27 10:50:33 -07:00