Add deterministic token counting route (#20) - #170
Open
kiki830621 wants to merge 6 commits into
Open
Conversation
9 tasks
Member
Author
Verify: #20 — Round 3 PASSCandidate
Round 2 blocker closure
Additional Round 3 findings resolved
Test evidence
Requirement coverage
Independent review
The available reviewer harness was Codex-family only, so this run does not claim true cross-model diversity. Residue / prerequisite
Verdict: PASS — verified-gated, ready for human review; not merged and issue remains open. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refs #20
Summary
macdoc convert --to tokensfor exact offline GPT-4o and provider-reported Claude input-token countsTokenCounterpackage with typed models/results/errors and public injectable Anthropic transporto200k_basevocabulary; no runtime download/cache/HOME writes--allow-networkand a non-emptyANTHROPIC_API_KEYbefore sending the complete admitted file to AnthropicBoundary hardening
O_NOFOLLOW+fstat+ same-descriptor capped read; maximum 1,000,000 valid UTF-8 bytesDatais independently size boundedVerification
tiktokenvectors)spectra validate macdoc-token-counting --strictswift package describe --type json446a9538cb6c348e3516120d7c08b09f57c36495e2acfffe59a5bf8b0cfb1a2dgit diff --check origin/main...HEADNo live Anthropic request was made. Test credentials and source markers are synthetic and verified not to escape errors.
Depends on PR #165 for clean-clone root dependency resolution; that prerequisite is not included in this branch.