learning_ai_common_plat/services/platform-service/src
saravanakumardb1 bcd806c6ff feat(fleet): complete budget enforcement — per-engine ceilings + overspend projection
Builds on the existing product-level hard claim gate + idempotent accrual.

- Per-engine sub-ceilings (engineCeilingsUsd) with per-engine accrual
  (spentByEngineUsd). An engine at its sub-ceiling is routed around at claim
  time via the same per-engine availability gate as the circuit breaker — it
  never pauses the whole product, so other engines keep flowing. Gated by
  FLEET_BUDGETS (defaults off).
- /fleet/metrics now surfaces a budget summary (ceiling/spend/status/projection
  + per-engine breakdown) and derives guardrail alerts: budget_overspend_projected
  (burn-rate extrapolation, guarded against early-window false alarms),
  budget_exhausted, and engine_budget_exhausted. Surfaced whenever a budget exists,
  independent of the enforcement flag, so operators see the burn in dry-run.

projectBudgetSpend is pure + unit-tested; per-engine spend follows the same
idempotent accrual path as the total, so spentUsd and spentByEngineUsd agree.

Generated with [Devin](https://cli.devin.ai/docs)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-06-01 13:23:44 -07:00
..
lib feat(fleet): reaper/GC telemetry in /fleet/metrics + lease TTL backstop 2026-06-01 12:18:22 -07:00
migrations refactor(platform-service): migrate webhooks/routes and migrations/runner from cosmos.js to datastore 2026-03-02 02:02:47 -08:00
modules feat(fleet): complete budget enforcement — per-engine ceilings + overspend projection 2026-06-01 13:23:44 -07:00
nodemailer.d.ts feat(platform-service): add smtp email delivery and postal setup 2026-03-14 05:52:28 +00:00
server.test.ts feat(runtime): add platform runtime projection api 2026-04-04 01:14:37 -07:00
server.ts fix(fleet): schedule the lease reaper so dead-factory jobs are recovered 2026-06-01 11:11:14 -07:00