Skip to content

fix(roadmap): measure a group with one exact token counter - #3377

Merged
dan-petty merged 3 commits into
mainfrom
fix/3265-one-exact-token-counter
Nov 3, 2026
Merged

dan-petty merged 3 commits into
mainfrom
fix/3265-one-exact-token-counter

Conversation

@dan-petty

Copy link
Copy Markdown
Owner

Count a task group with the tiktoken encoding in the stage and in the implement Job, so the same group text measures the same in both. A missing cache now stops the step with TokenCountError and names the cache, instead of a character count.

Add creates_lines to the stage plan: each created path carries its estimated number of lines, and the group measure adds 32 tokens for each line. A creates path with no estimate is refused. Both staging prompts state the budget and the rule.

The test floor loads recorded o200k_base and cl100k_base encodings, so every host counts the same text exactly.

Closes #3265

Change: openspec/changes/archive/2026-11-03-3265-the-plan-group-size-measure-differs/

Use the tiktoken encoding in the stage and the implement Job, and fail with TokenCountError when the cache is missing. Add creates_lines to the plan and count 32 tokens for each estimated line of a created file. State the rule in the staging prompts. Record the BPE encoding files in the test fixtures so every host counts the same text.
@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 3, 2026
…ken-counter

# Conflicts:
#	openspec/specs/roadmap-stage/spec.md
…ken-counter

# Conflicts:
#	src/devops_cli/lang/en/messages.py
#	src/devops_cli/roadmap/stage_change.py
@dan-petty
dan-petty marked this pull request as ready for review November 3, 2026 21:47
@dan-petty
dan-petty merged commit 36943aa into main Nov 3, 2026
20 checks passed
@dan-petty
dan-petty deleted the fix/3265-one-exact-token-counter branch November 3, 2026 21:47
dan-petty pushed a commit that referenced this pull request Nov 3, 2026
🤖 I have created a release *beep* *boop*
---


##
[0.53.3](v0.53.2...v0.53.3)
(2026-11-03)


### Bug Fixes

* **roadmap:** measure a group with one exact token counter
([#3377](#3377))
([36943aa](36943aa))
* **roadmap:** refuse an overlong title summary at stage
([#3381](#3381))
([df40366](df40366))

---
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): the plan group size measure differs between the stage and the Job

1 participant