fix: preserve native model switches and bound project searches
Server CI and Windows package / verify (push) Failing after 1m40s
Server CI and Windows package / windows-package (push) Skipped

This commit is contained in:
yilsem committed 2026-10-13 16:32:50 +03:00
1 parent db5e876f40
commit e7d3080e0a
14 files changed
+371 -35

No files matched your search

@@ -180,9 +180,13 @@ def prepare(handler, module, payload, checkpoints):
slug = original.get('model', '')
external = module.ek_model_mu(slug)
source_model = payload.get('source_model') or ''
if not external and gc.native_opaque(original):
# Defense in depth for direct/older splitter callers. Native encrypted
# state never enters owner decoding or cross-provider summarization.
return {'request': gc.normalize(original)}
# Defense in depth: an accidental worker call cannot alter native-only history.
if not external and not module.ek_model_mu(source_model) and not gc.foreign(original):
return {'request': copy.deepcopy(original), 'window': handler._transfer_window(slug)}
if not external and not module.ek_model_mu(source_model) and not gc.foreign_history(original):
return {'request': gc.normalize(original)}
settings = settings_store.read(module.HOME)
actual = (module.yonlendirilen(str(original.get('prompt_cache_key') or ''), slug) or slug) if external else slug
window = handler._transfer_window(actual)