v0.7.3 — the language check, measured and trimmed
Patch. Someone asked whether the "unset means your session's language" chain was too slow, so it got measured instead of defended.
Measured (no config, no env — when detection actually runs)
| Path | Before | After |
|---|---|---|
| wiki pages: 10 / 100 / 500 / 2000 | 0.40 / 0.63 / 1.77 / 7.4 ms | unchanged |
| transcripts: 0.2 / 2 / 8 MB (only when no page exists yet) | 2 / 16 / 55 ms | 2.0 / 2.4 / 5.1 ms |
For scale, llmwiki context takes about 90 ms end to end and overview --normalize about 30 ms, most of it process startup — the language check is 0.5–2 ms of that.
Changes
- A transcript is read from its last 256 KB. Identifying a language never needed a whole session, and the tail is the most recent part anyway. A truncated first line simply fails to parse and is skipped, which the extractor already did.
- The answer is memoized per repository, per process. One close-out normalizes the overview, refreshes the gap queue and appends the log; there is no reason to re-scan for each.
- Cold-start and the per-turn header now use the same answer as the writers. They consulted only the config before, so a Korean wiki with no config got Korean pages and English operating rules.
What a user sees
One rule: set nothing and it follows your language. Of the five resolution steps, three (environment, config, cache) are constant time, and the two that touch disk are bounded and cached.
Update
git pull && ./setup.sh548 tests passing via bun test, tsc --noEmit clean.