Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

chore(gateway): emit INFO budget reserved/settled logs for proactivity v2 (chip task_2855f4ec)

Open Beginner friendly
#20,940 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

@ahmedcompk is already working on this.

Since Oct 8, 2026.

  • #20947 by @india3Eth — closed without merging
  • #20955 by @ahmedcompk — open

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
68/100
Issue type
Feature
Clarity
Clearly specified
Activity status
Active
Tech stack
firebase, python

Research direction

Find the LLM gateway's proactivity budget path and the existing settlement log named in the issue. Read the reserve and _settle(...) flows, then run the relevant tests through BACKEND_UNIT_TEST_FILE_LIST and backend/test.sh. Done means successful reservations and settlements emit the specified INFO logs, while the invariant and held-result logs remain unchanged and no identifying or content fields are logged.

Written by the indexing model from the issue text.

Description

backend

Context

Proactivity v2's Budget Authority reserves a worst-case hold before every model call and settles to actual cost afterward (server-side, per user per UTC day). Today the only cost signal is the Firestore ledger (llm_gateway_attempts) and a rate-limited warning path — there are no INFO log lines for reservation and settlement lifecycle, which makes ramp-gate reads and incident triage slower than they need to be.

This is a follow-up chip from the proactivity-v2 program (run data/run-2026-10-03-proactivity-v2/, handoff item task_2855f4ec). It was flagged as "worth landing early" because it makes every later ramp gate easier to read.

Ask

Emit INFO-level structured log lines from the LLM gateway's proactivity budget path:

  • proactivity_v2_budget_reserved — on successful BudgetAuthority.reserve(...): producer, day, worst-case micro-USD reserved (no uid, no item content).
  • proactivity_v2_budget_settled — on _settle(...) success: producer, priced micro-USD, result flag (the existing proactivity_v2_budget_settled producer=%s priced_micro_usd=%s result=%s policy_version=1 line already exists at WARNING-adjacent level — normalize it to INFO and keep the shape).
  • Keep the existing proactivity_v2_budget_invariant_failed (critical) and proactivity_v2_budget_settled ... result=held (warning) lines unchanged.

Constraints:

  • Aggregate-only fields: producer, micro-USD integers, result booleans. Never uid, item_id, call_id, prompt text, or provider response bodies (log-leak rules: [[gcloud-logs-leak-prod-secrets]]).
  • A dedicated read of cost stays on Firestore llm_gateway_attempts (feature proactivity_v2_conversation_mentor_v2, payer omi) — these logs are an operational aid, not the billing source of truth.
  • Backend PR: register nothing new (no env vars), no flag changes, tests via BACKEND_UNIT_TEST_FILE_LIST + backend/test.sh.

Failure-Class

Failure-Class: none

🤖 Generated with Claude Code

Dominant language
Python
Stars
13.8k
Forks
2.6k
Avg merge
5h 16m
Merged PRs (30d)
616

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from BasedHardware/omi

All issues in BasedHardware/omi

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.