Skip to content

fix(ci): Plan Check finds the tiktoken cache on the runner - #3875

Merged
dan-petty merged 3 commits into
mainfrom
fix/3828-plan-check-encoding-cache
Nov 7, 2026
Merged

dan-petty merged 3 commits into
mainfrom
fix/3828-plan-check-encoding-cache

Conversation

@dan-petty

Copy link
Copy Markdown
Owner

The Plan Check job failed for each plan pull request: the runner has no tiktoken encoding cache, and count_tokens raises TokenCountError for an empty cache. The job now copies the committed o200k_base and cl100k_base files into the cache directory before the command runs, and an invariant test fails if the step is removed. count_tokens still raises for a missing cache.

Closes #3828

Change: openspec/changes/archive/2026-11-07-3828-plan-check-tiktoken-cache/

@dan-petty dan-petty added type/bug Type bug: the code does not do what it must scope/ci GitHub Actions workflows, pre-commit hooks, CI gates, and runners labels Nov 7, 2026
@dan-petty

Copy link
Copy Markdown
Owner Author

Evidence for #3828.

  • fail-to-pass against origin/main: 2 tests of tests/invariants/test_workflow_contracts.py fail on the base and pass on the head (the new contract test and the changed env expectation of the existing Check the Plan test).
  • By hand: the script of the new step, run with bash, wrote two cache files. With TIKTOKEN_CACHE_DIR set to that directory, count_tokens returned a count. With an empty directory it raised TokenCountError.
  • Full devops ci (before the last test edit): lint, format, typecheck, security, docs, openspec, actionlint and zizmor passed. Test failures: my contract test (fixed, 109 pass in that file after the fix), six cases of tests/ai/rag/test_rag_qdrant_span.py (the branch name held "tiktoken", see fix(tests): a branch name with a secret word fails a span test #3638; the branch was renamed and the file passes), and the known host failures test_devcontainer_install_tools_dry_run.py and test_tool_executor_contract.py (fix(ci): host state fails four tests and one case #3585). The test row also ran over 5 minutes (fix(ci): the pytest step of devops ci exceeds the 5-minute budget #3593).
  • Not shown: a run of the Plan Check job on a plan pull request. It runs only for a plan pull request of the Service bot. The next plan pull request after the merge is the proof.

@dan-petty
dan-petty marked this pull request as ready for review November 7, 2026 00:46
@dan-petty
dan-petty merged commit 9783999 into main Nov 7, 2026
23 checks passed
@dan-petty
dan-petty deleted the fix/3828-plan-check-encoding-cache branch November 7, 2026 00:47
dan-petty pushed a commit that referenced this pull request Nov 7, 2026
🤖 I have created a release *beep* *boop*
---


##
[0.76.2](v0.76.1...v0.76.2)
(2026-11-07)


### Bug Fixes

* **ci:** Plan Check finds the tiktoken cache on the runner
([#3875](#3875))
([9783999](9783999))

---
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/ci GitHub Actions workflows, pre-commit hooks, CI gates, and runners 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(ci): Plan Check finds the tiktoken cache on the runner

1 participant