You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@magpie.apache.org by "potiuk (via GitHub)" <gi...@apache.org> on 2026/09/15 20:45:06 UTC
[PR] chore: refresh the skill token measurements after the tiktoken bump [magpie]
potiuk opened a new pull request, #1240:
URL: https://github.com/apache/magpie/pull/1240
## Summary
- **`measure` is failing on `main`**, and therefore on every branch cut from it — including the bump workflow's own PR branch:
```text
Skill token measurements are stale.
Run: uv run --project tools/skill-token-count skill-token-count --write
```
- **Cause:** #1231 bumped tiktoken `0.12.0` -> `0.14.0` without regenerating `docs/mode-economics.md`. The generated block records the tokenizer version it measured with, so the check compares against a version that is no longer installed.
- **Regenerated with `--write`.** Every per-skill count is unchanged — all 75 files tokenize identically under the new version. What moves is the recorded tokenizer version, the measurement date, and the manifest hash.
## Type of change
- [ ] Skill change (`.claude/skills/<name>/`) — eval fixtures updated below
- [ ] Tool / bridge contract (`tools/<system>/*.md`)
- [ ] Python package (`tools/*/` with `pyproject.toml`)
- [ ] Groovy reference impl
- [ ] Cross-cutting (RFC, AGENTS.md, sandbox, privacy-LLM)
- [x] Documentation (`docs/`, `README.md`, `CONTRIBUTING.md`) — the generated block in `docs/mode-economics.md`
- [ ] Project template (`projects/_template/`)
- [x] CI / dev loop (`prek`, workflows, validators) — unblocks the `measure` job
- [ ] Other:
## Test plan
- [ ] `prek run --all-files` passes
- [ ] For Python packages touched: `uv run pytest` / `ruff check` / `mypy` passes
- [ ] For Groovy bridges touched: command-line invocation tested end-to-end
- [ ] For skill changes: eval suite passes for the affected skill
- [ ] For skill *behaviour* changes: a new or updated eval fixture is included in this PR
- [x] Other:
- Reproduced the failure locally (`--check` exits 1), regenerated, and confirmed `--check` then exits 0.
- `prek run --files docs/mode-economics.md` clean, including the `Check measured skill tokens` hook.
- Confirmed the regeneration is idempotent — see below.
## RFC-AI-0004 compliance
- [ ] **HITL** — any new mutation is gated on explicit user confirmation
- [ ] **Sandbox** — no new unrestricted host access; network reach declared in the adapter
- [ ] **Vendor neutrality** — placeholders used in all skill / tool prose
- [ ] **Conversational + correctable** — agentic-override path documented if behaviour is adopter-tunable
- [ ] **Write-access discipline** — no autonomous outbound messages; drafts only, sent on confirmation
- [ ] **Privacy LLM** — private content does not reach a non-approved LLM
## Linked issues
Fallout from #1231.
## Notes for reviewers
- **The diff is three lines and none of them is a token count**, which is the reassuring part: tiktoken 0.14.0 produces byte-identical results to 0.12.0 across all 75 skill files. If a count *had* moved, the published always-on figures in `docs/setup/marketplace.md` and `docs/quick-start.md` would have needed updating too — `check-doc-sync` enforces that, and it passes.
- **The date is not a source of churn**, in case that looks like a trap. `skill-token-count` reads the existing `Measured on (UTC)` value out of the file and renders the comparison block *with that value held constant* (`__init__.py:152-158`), so the date can never be the thing that differs. Today's date is substituted only on the `--write` path and only once something else has already been found stale — the code comments it as *"Stamp only regeneration, never a check or an unchanged write."* Verified: re-running `--write` immediately afterwards is a no-op and leaves the file untouched, and `--check` exits 0 on a later clock than the stamp it just wrote.
- **Worth a follow-up, not fixed here:** a dependency bump that changes a tokenizer can silently invalidate this block, and nothing connects the two. The dependabot group that moves tiktoken has no reason to know about `docs/mode-economics.md`.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@magpie.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] chore: refresh the skill token measurements after the tiktoken bump [magpie]
Posted by "potiuk (via GitHub)" <gi...@apache.org>.
potiuk merged PR #1240:
URL: https://github.com/apache/magpie/pull/1240
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@magpie.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org