Repository navigation
fix: keep distilled sentences in the source language - #74
Merged
Merged
Conversation
The distill prompt only said a Russian source stays Russian, and nothing checked the reply. A German default was stored and copied into the weekly journal. Name the source language, honor CONTEXT_DISTILL_LANGUAGE, and retry a mismatch once before leaving the source pending. Co-authored-by: Nick Kosarev <nick@kosarev.space>
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.
The distilled fact and the project
contextjournal for 2026-W46 came out in German because the model was never told to keep English, and nothing checked the reply.The distill prompt only said “a Russian source yields a Russian sentence.” The OpenAI and Codex wrappers only said “Return only JSON.” Codex ignores local user config, but a ChatGPT account language is not local config, so a German account language still applies. The weekly journal does not call a model. It copies the distilled sentences, so the week paragraph was German too.
memory:processuses the extractor insrc/llm.ts; that prompt also had no language line.src/processor.tsstores whatever the extractor returns.This change:
CONTEXT_DISTILL_LANGUAGE(ru,en,de,fr, ores) overrides both. Anything else is ignored. Compose forwards it. Documented in the README env list,docs/llm-providers.md, and the deployment notes.pnpm exec vp check --fixpassed.pnpm run checkpassed: lint, typecheck, and 302 tests, including a fake model that returns German for English and Russian input.A source that already has a distilled sentence is not rewritten. The existing German fact and journal stay until that item is removed and tidy runs again.
Friction
fix/distill-language. The cloud agent branch template iscursor/<name>-816a. This PR uses the named branch.vpis not onPATH.pnpm exec vpworks.