Op interpreter: enforce budgets incrementally

t-406·WorkTask·
·
·
Created3 months ago·Updated3 months ago·pipeline runs →

Description

Edit

Enforce budget limits incrementally in Op interpreter.

Problem

Limit checks are applied only after the whole Op finishes, so a run can exceed cost/token budget before failing.

Requirements

  • Track cost/tokens incrementally (per infer_end)
  • Stop execution once budget is exceeded
  • Emit exhausted event with accurate resource type

Acceptance

  • Runs stop close to budget threshold, not after full completion
  • Trace includes exhausted event with correct reason

Timeline (4)

🔄[human]Open → InProgress3 months ago
🔄[human]InProgress → Done3 months ago
💬[human]3 months ago

Sequential interpreter now enforces budget during infer calls (incremental), returns partial trace on exhaustion, and propagates exhaustion through Op.limit.