Fixed Issues

Problems that used to exist and no longer do, with the test that now guards each one. This is the record behind the open lists, so that a regression can be recognized.

Scope: all subsystems Source: the maintainers’ pre-launch and EHNAS fix notes, plus changes visible in the commit history Last verified against: ad744e9 (2026-11-03)

I did not re-test these fixes. Test names are taken from the maintainers’ notes. Where a fix is a recent commit, the commit is named. If one of these returns, move it back to the matching page and mark it Open.

MCP server and security

Problem What users saw Fix Test
Critical: a repository could run code through its embedding model. A repository whose eulix.toml named engine = "torch" and a model containing “jina” had that Hugging Face repository’s Python executed on the first semantic question, automatically when an editor sent workspace roots. trust_remote_code was on for every “jina” name, and a local directory of that name was preferred. trusts_remote_code() grants remote code only to Jina’s own models (jinaai/…) and never to a name that resolves to a local path. A fine-tuned Jina model under another organization now needs the ONNX engine. Latest change: commit ad744e9. eulix-embed/tests/test_trust_remote_code.py (confirmed by reading the code path, not by running an exploit).
Usage queries could read any file on the machine. “Usage of X” printed a signature for each file:line the index listed, so a shipped kb_index.json could list /home/user/.ssh/id_rsa:1 and have it printed. Usage queries also failed under MCP because relative paths opened against the server’s working directory. Locations are read through a rooted file handle that blocks ../, absolute paths and escaping symlinks, and must pass the servable-file filter. TestE2EUsageQueryReadsOnlyInsideTheRepo, TestHandleUsage.
.euignore’d files leaked through the text-search fallback. Of 14 files the parser excluded in a test corpus, all 14 came back through MCP. The Go matcher now follows gitignore semantics: ** at the start, middle and end; parent-directory exclusion; nested .euignore files; the file read whole, including lines over 64 KiB and CRLF. Negation (!pattern) is not supported, which fails in the safe direction. TestLexicalSearchHonoursEuignoreLikeTheParser, TestLexicalSearchNeverShowsWhatTheParserExcludes (runs the real parser when built), TestIgnoreMatcherGitignoreSemantics, TestIgnoreFilesNestedLongLinesAndCRLF.
Hidden and ignored files were served from a stale or shipped knowledge base. A knowledge base listing .env (where API keys are stored) had that file read and returned by every tool. ServableMatcher allows a path only if it stays in the root, has no hidden component and is not excluded by the current rules. Applied when chunks load and when the full knowledge base loads. TestE2ENeverReturnsHiddenOrIgnoredFiles.
The request path could corrupt the protocol stream. The MCP client got a parse error and dropped the session, because two error cases printed to standard output. Both go to standard error or the debug log. TestE2ENothingIsWrittenToStdout.
Single-symbol queries got text-search output instead of the answer. An exact symbol such as payment_total returned lexical matches under a “low-confidence” note. The scorer removed the query from the result before scoring, which deleted the symbol from the retrieved code. Only the part before the router’s QUERY echo is scored, and only multi-word echoes are stripped. The same query now scores 0.93 at the multi-hop stage. TestCascadeSingleSymbolQueryKeepsItsSemanticAnswer.
A running MCP server locked chat history. While an editor ran eulix mcp in a project, eulix chat and eulix history failed after a 2-second timeout. MCP builds its routers without a history cache. TestE2EBindingDoesNotLockChatHistory.
Symlinked repository paths got no text-search fallback. The directory walker does not enter a symlinked root. The root is resolved first. TestLexicalSearchFollowsASymlinkedRoot.
Workspace roots never bound on Windows. file:///C:/repo became \C:\repo. The slash before a drive letter is dropped. TestURIPath.
Roots binding could overwrite an explicit set_repo_path. The check and the bind took the lock separately. They share one lock. TestRootsNeverOverrideAnExplicitChoice.

Setup, configuration and the model client

Problem What users saw Fix Test
Saving .env deleted comments and blank lines. The wizard rewrote .env, losing every non-pair line. EnvFile keeps the original lines and rewrites only keys that changed. TestEnvFile.
Adding ignore patterns could corrupt .euignore. Without a trailing newline, *.log plus dist/ became *.logdist/. A newline is written first when needed. TestEuignoreSteps.
A broken eulix.toml was silently ignored. A syntax error made Eulix use defaults with no warning. A parse error is returned with the file and line; a missing file still means defaults. TestLoadRejectsBrokenConfig.
A query after a timeout raced the timed-out one. A data race, and possibly mismatched replies. A timeout marks the embedder dead and later requests fail at once. TestEmbedderTimeoutKillsServer (under -race).
Shutdown and start-up errors could lose the embedder’s last log lines. The crash reason was missing from the diagnostics; failed starts leaked file descriptors. A reap step waits for the log reader before waiting on the process, capped at 5 s. TestEmbedderRoundTrip, TestEmbedderStartupFailures.
On Windows, the Python subprocess lost the system PATH. Anything found through PATH (DLLs, CUDA tools) was missing. prependPath matches the name case-insensitively. TestPrependPath.
The Gemini API key leaked into error messages. Network errors printed the URL with ?key=…, and it reached the debug log. The key is sent in an x-goog-api-key header. TestErrorsDoNotLeakAPIKey.
Ollama ignored temperature = 0. omitempty dropped the zero. Removed omitempty. TestProviderWireFormats.
Local mode with a blank provider called the wrong endpoint. Every answer failed with “ollama: empty response”. The provider is resolved once for both the base URL and the path. TestProviderWireFormats.
The unknown-provider hint named a key that does not exist. It said base_url; the key is baseURL. Message corrected. TestValidateConfig.
Empty context chunks were sent as metadata. Empty [M2] file:0-0 entries inflated the prompt header. Empty chunks are skipped. TestBuildFullPrompt.
Go structs did not match what the parser writes. Answers showed complexity 0, importance 0.00, and a “Security notes” section that could never fill. KBStruct.go now mirrors the parser’s slim views; metrics are read from kb_metrics.json; the security-note sections are gone. Verified against real parser output for a mixed-language sample, with unknown fields rejected.

Retrieval (EHNAS and shared)

Problem What users saw Fix Test
Fix 1: the path filter removed every result for non-code file names. “How is eulix.toml loaded” returned nothing from EHNAS, because eulix.toml was treated as a required path no chunk contains. A file anchor is required only if some chunk path contains it; otherwise it is a soft preference. Covers all three callers. gate_test.go.
Fix 2: non-determinism in BM25. The same query on two fresh servers could return different chunks (6 of 20 questions). Ties break on chunk index or chunk ID in the BM25 sorts and in byScoreDesc. determinism_test.go.
Fix 3: query words did not match code words. “seeds” did not find mcSeedIndices; “loaded” did not find Load. One shared tokenizer splits camelCase and stems words, used by the index, BM25 and feedback. Expected file ranked first rose from 12 to 14 of 20, mean reciprocal rank 0.657 to 0.748. stem_test.go.
Fix 4: long functions won conceptual questions. A 523-line orchestrator was returned and hydrated for unrelated questions. A length penalty sqrt(120 / lines) with an exemption when the chunk’s own name, class or path shares a key with the question, plus exemptions for exact matches. A plain penalty regressed two benchmark questions and was replaced. long_chunk_test.go.
Smaller EHNAS changes. Random seed choice for tied walk seeds; a 5000+ anchor pin set the score floor too high. Tie-breaks in seed picking and final ordering; the pre-selection floor ignores pinned chunks; per-engine config sections. Retrieval package tests.
eulix-embed README and help text disagreed with the code (EMB-8). The README listed a --no-comments flag that does not exist and a commented-out --save-json, and a binary format without the quantized byte and scales. embed --help said the engine default was torch (it is onnx), the server help named the wrong default model, and -d omitted rocm. README and help strings corrected to match the code. embed --help output checked by hand.
The query embedder ignored the configured engine. With engine = "torch", queries still used ONNX. VectorWeaver passes -e <engine> (commit 6e1050a). None recorded. See EMB-1 for what remains.
The streaming load kept all of kb.json in memory. Loading a repository for the MCP server or chat left the whole kb.json in the process’s memory by the end of the load, because every mapped page the walk passed stayed resident: 212 MB peak for a 178 MB file, about 4 GB for the largest knowledge bases. OpenForSequentialRead reads through a 1 MiB buffer and never maps; the mapped streaming reader (MmapForSequentialRead) is deleted. Peak 31 MB on the same file, about 5% faster. TestOpenForSequentialRead_largeIsNotMapped.
The streaming load could crash when kb.json changed underneath it. On Linux and macOS the mapped reader trusted a file size taken before the file was opened, so a kb.json replaced in between crashed the process with SIGBUS. A rewrite during the load crashed it the same way. Same change: a buffered reader reaches the new end of file and the JSON decode reports an error. RET-10 now covers only whole-file decodes. TestOpenForSequentialRead_fileRewrittenWhileReading (crashes with SIGBUS on the old code).
Linux preloaded whole knowledge-base files before parsing. MAP_POPULATE made every index and call-graph load wait for the full disk read before parsing started, for no speed gain: 276 ms with it, 254 ms without (cold cache, 228 MB kb_index.json). mmapPlatform maps MAP_SHARED only. Comments that promised a bounded page cache are corrected. TestMmapPlatformDoesNotPrefault (Linux).
Windows looked up PrefetchVirtualMemory on every large load. Nothing visible. Each large decode looked the export up in kernel32.dll again, and a missing export would have panicked. The code also called FILE_FLAG_SEQUENTIAL_SCAN by a made-up name and claimed effects it doesn’t have on a mapped view; the macOS code misdescribed MAP_PRIVATE. The function is resolved once from the system directory, with Find checked first. The flag uses the x/sys/windows constant, and the Windows and macOS comments say what the code does. TestDecodeViaMmap_windows, run on Windows by .github/workflows/Test.yaml.
Debug-log flush goroutines leaked; logging stopped after an idle release (RET-9). Every router and every context-builder load started a context_debug.log flush goroutine that never stopped, so a long-running MCP server collected them (163 after three runs of the MCP tests). Closing a context builder also closed the router’s shared logger, so the log went silent after the first idle release. StartAutoFlush starts at most one goroutine per logger, and Close stops it. ContextBuilder.Close no longer closes a logger it was given; the router owns it and closes it in Router.Close. TestDebugLogger_AutoFlushStartsOnceAndStopsOnClose, TestCloseLeavesSharedDebugLoggerOpen (both fail on the old code).
Every context builder reserved ~46 MB for chunks. Loading any repository, even a tiny one, reserved a 320,000-entry chunk slice up front. Unclosed test servers kept two of them alive per test run, which made go test -count=3 ./... fail TestLexicalSearchMemoryStaysBounded (then named TestPRGap2LexicalSearchMemoryStaysBounded). The slice is sized from kb.json‘s metadata (functions + classes + methods), capped at 320,000 and starting at 1,024 without metadata. Test servers now close on cleanup, and the lexical-search memory test measures with GOGC=10 so other tests’ leftovers don’t count as growth. TestChunkCapacity, TestStreamKBChunksSizesSliceFromMetadata; go test -race -count=3 ./... passes.

Parser and PRISM

Problem What users saw Fix
PRISM v2 never linked calls to methods. self.validate(), this.step() and Rust self.x() got no edge; every method’s called_by was empty (950 method nodes with zero incoming edges in the Eulix repository’s own knowledge base). Commit 95f1288 stores the call receiver separately and indexes methods by declared name for Python, TypeScript and Rust, resolving self, this, cls and Self through the class and its parents. I confirmed on 2026-11-03 that these three now resolve. Go, Java, JavaScript, C and C++ remain open as PRISM-2.
Calls through unknown receivers could invent edges. A uniquely named method was linked by guessing. Commit 02f3674 disables that guess. This is the behaviour described in PRISM-3.
Rust module paths and JavaScript lookups mis-resolved. Wrong targets for crate::/self:: paths and cross-file JavaScript names. Commit c6acd89.
Method resolution broke compatibility with older callers. Regressions after the receiver work. Commit dcc1633 (restore method resolution compatibility).
self.x() in Python was not recognized as an implicit receiver. The shortcut looked for a self parameter that the Python parser removes. Python methods are now treated as having a receiver unless they are static methods (verified: an inherited method in another directory resolves).
Rust items inside inline mod blocks were not extracted (was PARSE-5). Functions, structs, impls and consts in mod name { ... }, including every #[cfg(test)] mod tests, had no node; on ripgrep 7,345 of 15,066 call sites sat in functions eulix never saw. Fixed 2026-11-15: the Rust parser collects items from the file root and every inline module body. On ripgrep v2, correct caller → callee pairs rose from 967 to 1,645. Test items_inside_inline_modules_are_extracted (grammar_files/rust.rs).
Rust impl blocks in another file than their type were dropped. impl E { ... } in other.rs for a struct E in lib.rs lost all its methods and their calls; so did impl Trait for ForeignType. Fixed 2026-11-15: such blocks become an impl_{Type} entry, and PRISM v2 gives their methods (and self inside them) to the type it resolves to. Blanket impls (impl<P> Tr for &mut P) are keyed <P> so they never bind to a type named P. Tests impl_for_a_type_declared_elsewhere_keeps_its_methods, blanket_impls_are_not_keyed_as_a_type_named_like_the_parameter, rust_impl_in_another_file_gives_its_methods_to_the_type.
Rust types imported from another crate resolved to the wrong crate’s homonym. use grep_regex::RegexMatcher; RegexMatcher::new() linked to a RegexMatcher in another crate’s tests/ directory, or in crates/pcre2. Fixed 2026-11-15: files under another crate’s tests/, benches/ or examples/ are never import candidates, and a package directory matching the imported crate name (grep_regex → crates/regex) is preferred. The earlier test expecting a sibling test target’s type was corrected. Tests rust_type_from_another_crate_skips_that_crates_test_targets, rust_imported_crate_name_picks_its_package_among_homonyms.
C++ code in .h headers was parsed as C (was PARSE-6). Classes and inline methods in C++ headers had no node; class LIB Name : Base { with an export macro was read as a function Name. Fixed 2026-11-15: a .h file with C++-only syntax goes to the C++ parser, and export annotations between class and the name are blanked before parsing (offsets unchanged). Tests cpp_headers_are_told_apart_from_c_headers, a_cpp_header_with_the_h_extension_is_parsed_as_cpp, export_macros_between_class_and_name_do_not_hide_the_class.
C and C++ skipped everything inside #if/#ifdef and extern "C". Every include-guarded header, and any code under a feature #ifdef, produced no functions, types or globals. On tinyxml2, 685 call sites targeted methods eulix did not know. Fixed 2026-11-15: both parsers look through conditional-compilation blocks and extern "C" { ... } (both branches of an #if/#else are kept). On tinyxml2 the unknown targets fell to 26. Tests items_inside_include_guards_ifdefs_and_extern_c_are_extracted (c.rs), items_inside_include_guards_and_extern_c_are_extracted (cpp.rs).
C++ global variable names included their initializer. static int counter = 0; was recorded as a global named counter = 0. Fixed 2026-11-15: the name is taken from the init declarator’s inner declarator. Covered by the C++ include-guard test above.

LSP

Found by reviewing PR bb695d1 (#148) and by the benchmark in eulix-lsp/bench/. All of these were re-tested on 2026-11-12. The last four are working-tree changes on fix/lsp-148-sync and are not committed yet.

Problem What users saw Fix Test
Indexing was quadratic. Each doubling of the workspace made the scan about 4 times slower: 25 s at 4,000 files and 396 s on the Linux kernel. Index requests (cross-file definition, references, workspace search) waited for the whole scan, and every edit and watcher event paid the same cost. Index::index_file checked each new call site against every call already recorded for that name (sites.contains). It now removes duplicates within the file with a HashSet; remove_file already clears the file’s old entries. Scan time: 0.41 s at 4,000 files, 49 s on the kernel. See LSP Indexing. call_sites_are_deduplicated_and_sorted, same_call_line_in_two_files_is_kept_and_reindex_does_not_duplicate; bench/bench_lsp.py growth exponent about 1.0.
Open buffers were overwritten when the editor encoded the URI. With VS Code on Windows, or paths with +, the scan and watcher replaced an open buffer’s symbols with the disk version. commit_disk_batch and forget_disk check whether a file is open by comparing paths (Documents::open_paths) instead of rebuilding the URI. disk_events_skip_open_buffers_with_client_encoded_uris.
Closing a non-UTF-8 file deleted its symbols. A file with one Latin-1 byte was indexed at startup, then lost every symbol once closed or changed on disk. The close and watcher reads decode loosely (String::from_utf8_lossy), as the scan already did. closing_a_non_utf8_file_restores_its_disk_symbols.
The scan’s cancellation guarded against a second scan that never runs. Nothing visible; about 50 lines of locking for a case nothing can trigger. One stop flag, set only by shutdown. The unused ServerState::shutdown field was removed. Only initialized starts a scan; an in-process rescan would need a per-scan flag again. Existing scan and shutdown tests.
An older scan never stopped, open buffers were replaced by disk content, and the watcher indexed files outside the workspace. Stale symbols, lost buffer edits, and symbols from sibling folders such as /repo-other. Commit bb695d1: per-scan cancel token, buffer-owned index entries with revision checks and per-path disk tickets, and workspace checks by path component with symlinks ignored. 28 tests in src/backend/sync_tests.rs; 9 checks in e2e_lsp.py.