Skip to content

feat: enforce worker cost budgets - #123

Merged
fazpu merged 2 commits into
mainfrom
impl/wp-7.3-budget-enforcement
Jul 21, 2026
Merged

feat: enforce worker cost budgets#123
fazpu merged 2 commits into
mainfrom
impl/wp-7.3-budget-enforcement

Conversation

@fazpu

@fazpu fazpu commented Jul 21, 2026

Copy link
Copy Markdown
Member

Summary

  • add typed per-route cost budgets with aligned Postgres-window preflight and durable park/resume semantics
  • carry required provider usage through worker model and embedding calls into cost_ledger
  • add budget inspection CLI and focused acceptance coverage

Scope

OSS mechanism only: no hosted billing policy, dashboard, HA topology, or control plane.

Validation

  • Grok final review: PASS, merge-ready
  • eval-banana ops_metering_budgets_enforced: 1/1
  • ruff check/format: pass
  • targeted pyright: 0 errors
  • provider boundary tests: 16 passed
  • E2 worker metering database proof: 1 passed
  • WP7.3 ledger module before provider instrumentation: 11 passed
  • compatibility slice: 18 passed
  • docs typecheck/build: pass
  • prior frozen full-suite baseline: 746 passed in 2h19m

@github-actions

Copy link
Copy Markdown

Coverage report

Click to see where and how coverage changed

FileStatementsMissingCoverageCoverage
(new stmts)
Lines missing
  src/ultimate_memory/adapters
  openrouter.py 56-57, 72-84, 88-104, 114
  src/ultimate_memory/adapters/testing
  __init__.py
  cost_meter.py
  model_provider.py 48
  src/ultimate_memory/eval
  consumption.py
  src/ultimate_memory/model
  __init__.py
  model_provider.py
  processing.py
  src/ultimate_memory/ports
  cost_meter.py
  model_provider.py
  src/ultimate_memory/spine
  entity_registry.py
  lifecycle.py
  observation_adjudication.py 248, 256, 493, 510, 518-528, 545
  resolver.py 232-236, 310, 391, 403
  supersession.py 219, 235
  work_ledger.py 63, 161
  src/ultimate_memory/surfaces
  cli.py 99-104
  src/ultimate_memory/workers
  base.py
  e0.py 480
  e1.py
  e2.py
  e3.py
  knowledge_authored.py
  p1.py
  reconcile.py
Project Total  

The report is truncated to 25 files out of 29. To see the full report, please visit the workflow summary page.

This report was generated by python-coverage-comment-action

@fazpu
fazpu merged commit 81f4ae3 into main Jul 21, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant