Skip to content

fix(roadmap): log tokens on refine and alternatives lines - #7711

Merged
dan-petty merged 2 commits into
mainfrom
fix/6360-attempt-context-tokens
Nov 29, 2026
Merged

dan-petty merged 2 commits into
mainfrom
fix/6360-attempt-context-tokens

Conversation

@dan-petty

Copy link
Copy Markdown
Owner

Opens attempt_context() around each attempt of refine, refine_judge, and alternatives so result lines carry tokens=:

  • Wrap per-item execution and settlement in refine (_refine_selected_candidates) and alternatives (_settled) with attempt_context().
  • Wrap refine_judge (judge) with its own nested attempt_context(), keeping nested refine_judge tokens separate from refine.
  • Record fake model call tokens from ModelFake.chat_structured and add tests for per-job tokens=, token isolation, and efficiency reporting in grade_report.

Closes #6360
Change: openspec/changes/archive/2026-11-29-6360-attempt-context-tokens/

@dan-petty dan-petty added type/bug Type bug: the code does not do what it must scope/roadmap The roadmap jobs: intake, refine, stage, implement and the Service that runs them labels Nov 29, 2026
@dan-petty
dan-petty marked this pull request as ready for review November 29, 2026 06:29
@dan-petty
dan-petty enabled auto-merge (squash) November 29, 2026 12:09
@devops-cli-service

Copy link
Copy Markdown
Contributor

Pull request #7711 has merge conflicts with main at commit 0ad09714a1e6. GitHub cannot merge it. Rebase the branch onto the current main, resolve the conflicts and push the branch.

@dan-petty
dan-petty force-pushed the fix/6360-attempt-context-tokens branch from 0ad0971 to 83ea83f Compare November 29, 2026 12:43
@dan-petty
dan-petty merged commit e35db67 into main Nov 29, 2026
28 checks passed
@dan-petty
dan-petty deleted the fix/6360-attempt-context-tokens branch November 29, 2026 13:53
dan-petty-release Bot added a commit that referenced this pull request Nov 29, 2026
🤖 I have created a release *beep* *boop*
---


##
[0.248.0](v0.247.0...v0.248.0)
(2026-11-29)


### Features

* **ai:** send per-run trace header to gateway
([#5437](#5437))
([#7735](#7735))
([f52522f](f52522f))
* **docs:** docs check refuses unknown settings, variables and flags
([#7765](#7765))
([1a78e55](1a78e55))
* **docs:** enable rumdl MD038 checks for docs and specs
([#7741](#7741))
([28e9e42](28e9e42))
* **monitoring:** align grafana and prometheus route names
([#7766](#7766))
([375b9ed](375b9ed))
* **monitoring:** require Do this steps for product alert rows
([#5471](#5471))
([#7748](#7748))
([e0510db](e0510db))
* **research:** read Renovate and endoflife.date releases
([#3907](#3907))
([#7753](#7753))
([4fad9c7](4fad9c7))
* **roadmap:** onboard a repository that lacks a project dependency
([#7761](#7761))
([9bf03d8](9bf03d8))
* **roadmap:** record run, step and path class on tool calls
([#5460](#5460))
([#7742](#7742))
([062895b](062895b))
* **roadmap:** render trusted hooks in implement prompt
([#4645](#4645))
([#7759](#7759))
([bdb264a](bdb264a))
* **roadmap:** the question resolver finds and classes open questions
([#7764](#7764))
([107944d](107944d))
* **service:** redeliver failed App webhook deliveries
([#4560](#4560))
([#7758](#7758))
([897b095](897b095))


### Bug Fixes

* **ai:** a hosted gateway call names its provider as backend
([#5546](#5546))
([#7714](#7714))
([06dabb7](06dabb7))
* **ci:** fail a gate module with no cases
([#7709](#7709))
([fb783cb](fb783cb))
* **cli:** use StrEnum choices for all --format options
([#7738](#7738))
([7fb0058](7fb0058)),
closes [#4943](#4943)
* **roadmap:** log tokens on refine and alternatives lines
([#7711](#7711))
([e35db67](e35db67))
* **roadmap:** stop Loki calls with no localhost fallback
([#7716](#7716))
([35f57e0](35f57e0))


### Performance Improvements

* **ci:** faster commit hooks and more fast pre-push checks
([#7762](#7762))
([b5f4cac](b5f4cac))
* **k8s:** count hosted_vllm TEI embeddings in local savings
([#4975](#4975))
([#7705](#7705))
([d8ef887](d8ef887))


### Code Refactoring

* **k8s:** remove unused Portkey gateway
([#5007](#5007))
([#7710](#7710))
([fb2fa2b](fb2fa2b))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: dan-petty-release[bot] <346998822+dan-petty-release[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scope/roadmap The roadmap jobs: intake, refine, stage, implement and the Service that runs them type/bug Type bug: the code does not do what it must

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(roadmap): log tokens on the result lines of five roadmap jobs

1 participant