Skip to content

Add wall-clock and currency ceilings to hard admission budgets #45

Description

@4nass

Context

This is the remaining limit type from #27. Token and call reservations are delivered in core/jobs/budget.py, but an unattended run can still consume unbounded wall-clock time and there is no currency ceiling when a provider reports a price.

Acceptance criteria

  • Projects or budget classes can declare max elapsed run time and max stage time.
  • The scheduler enforces the time ceiling before dispatch and while a provider call is running.
  • A time limit produces a deterministic interrupted or waiting_approval outcome and cleans up child processes/worktrees safely.
  • Currency limits are enforced when a provider reports cost, with an explicit fail-safe policy when cost is unknown.
  • Reservations and settlements include token, call, elapsed-time and currency dimensions.
  • Existing soft/strict/local_fallback semantics remain explicit and covered by regression tests.
  • Reports and telemetry show reserved, consumed, remaining and the policy decision for every dimension.
  • Concurrent jobs cannot each admit a call that exceeds the aggregate budget.

Relationship

Parent: #27. The token/call gate, heuristic token estimation and local_fallback wait behavior are already delivered. Do not duplicate or weaken that implementation.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestpriority:P0Must be completed before unattended remote mutation

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions