fix: refuse an over-long state before tokenizing every prompt; sturdier tests and release - #23
Merged
Merged
Conversation
…er tests and release Found in a review of the code, the tests and the docs. Server - A state longer than the context made every prompt too long, but each one was tokenized first, all holding the whole state: a 250 KB state with 1,024 questions, or 40 choices of 26 options, took every core and gigabytes, and an allocation failure on a tokenizing thread ended the process. The state is now measured first and the request refused with the same error the Python loop stopped at (the first question's prompt length): 0.22 s, memory unchanged. - Tokens no longer keep a buffer sized to their text (4 bytes per byte of each prompt). - An error on a tokenizing thread fails its request instead of calling std::terminate; an error while warming up when idle stops the warm-up instead of the server. - A score level's probability is never below 0 (pooled means could round to -1e-17). - Two requests read together with the same new state keep one snapshot of it, not two. Tests, CI, release - check.py refuses to run if its port already answers (it tested that server instead of the build), stops a server that did not start, waits by time rather than by tries, puts a timeout on every request, resolves paths from where it was started, does not pass JEV_API_KEY on, and has the choice and score checks resume from a snapshot so they do not depend on the order of steps. - score-test: 20,000 random threshold sequences, no level below 0 and levels summing to 1. - Workflows have timeouts; release.yml removes SHA256SUMS.txt before replacing the archives and attaches it again once all three are in, so a failed or partial run never leaves a stale one. Docs: about 40 README and wiki pages still said score is refused, that the 8,192-token context is per request (it is per question's prompt), that every response carries Server-Timing (successful ones do), or left out the build's pip install and network step; the options table gains --name, --ctx and --warmup. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Fixes from a review of the code, the tests and the docs (three parallel reviews, each finding checked against the code before fixing).
Server
std::terminate; an error during idle warm-up stops the warm-up instead of the server.Tests, CI, release
JEV_API_KEYon;release.ymlremovesSHA256SUMS.txtbefore replacing the archives and attaches it again once all three are in, so a failed or partial run never leaves a stale one.Docs: about 40 README and wiki pages were stale:
Server-Timing(only successful ones do);pip installand its network step.The options table gains
--name,--ctxand--warmup.Verified locally: full
check.py --exact --threads 8green, with zero-tolerance parity 215/215 identical (no numerical change).🤖 Generated with Claude Code