What happened
Ailoos's inference path has a semantic cache: if a new prompt is similar enough to a cached one, the cached answer is returned. The similarity threshold was 0.8. At 0.8, what is the capital of Spain? matched a cached what is the capital of France? and the model answered Paris.
On 7 September 2026 the threshold in CacheManager was raised to 0.95. Eight tests passed. The task was closed.
Hours later, an unrelated failing test led to CacheAugmentedRAG — the class the actual traffic flows through — which had its own default written separately: cache_config.get('similarity_threshold', 0.8). The dangerous value was still live exactly where it mattered, with the fix's tests green.
Why a duplicated default is worse than none
With no default, a missing configuration fails loudly. With two defaults, fixing one looks like fixing the problem, and the one that governs stays as it was. The tests that pass are the tests of the copy you touched.
The rule
grep -rn "<the value>"across the whole tree before closing. Duplicates hide in wrappers, adapters and config loaders.- Test the production path, not the component. A request through the real entry point, asserting the real behaviour — here, that a Spain question does not return Paris.
- One default, one place. The value now lives in a single configuration constant that both classes import.
The pattern across the ecosystem
This is the same family as the price that lived in five language files, a sitemap and a deploy script long after the canonical file changed it; as the chain id that appeared as 1337, 9911 and 27777; as the tokenizer constant fixed in the server rather than carried with the model. Every one was a value with copies. The ecosystem's answer is canonical files with gates — and, for code, this note.
From the Ailoos inference work, 2026-09-07.


