fix(install): drop semantic-search leftovers when local search is off
CI / CI configuration security checks (push) Successful in 2s
CI / Capabilities and shell quality (push) Successful in 17s
CI / Python tests and compilation (push) Successful in 30s
CI / QMD unit tests (push) Successful in 5s
CI / Build and inspect generated packages (push) Successful in 17s
CI / PowerShell tests on Ubuntu (push) Successful in 1m25s
CI / Installed client configuration smoke tests (push) Successful in 48s
CI / Bash integration and installation guards (push) Successful in 1m10s

Disabling local QMD search now removes the qmd-search sandbox exclusion,
also from existing settings on update. Agent instructions mention semantic
search only as available when installed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Julian LechnerandClaude Opus 5.5 committed 2026-11-16 13:55:27 +01:00
1 parent 477e792f97
commit 53511937b0
6 files changed
+28 -3

No files matched your search

+13
View File
@@ -99,6 +99,19 @@ class InstallOptionsTests(unittest.TestCase):
commands = [hook['command'] for group in result['hooks']['SessionStart'] for hook in group['hooks']]
self.assertEqual(commands, ['bash "/c/hooks/scripts/show-session-state-pointer.sh"'])
def test_semantic_retrieval_disabled_removes_qmd_sandbox_exclusion(self):
with tempfile.TemporaryDirectory() as directory:
settings = Path(directory) / 'settings.json'
qmd = 'node "$HOME/.my-ai-configuration/qmd/qmd-search.mjs" *'
settings.write_text(json.dumps({'sandbox': {'enabled': True, 'excludedCommands': [qmd, 'docker *']}}), encoding='utf-8')
self.assertEqual(json.loads(OPTIONS.filter_options(settings, semantic_retrieval_enabled=False))['sandbox']['excludedCommands'], ['docker *'])
settings.write_text(json.dumps({'sandbox': {'enabled': True, 'excludedCommands': [qmd]}}), encoding='utf-8')
self.assertEqual(json.loads(OPTIONS.filter_options(settings, semantic_retrieval_enabled=False))['sandbox'], {'enabled': True})
self.assertEqual(json.loads(OPTIONS.filter_options(settings, semantic_retrieval_enabled=True))['sandbox']['excludedCommands'], [qmd])
current = {'sandbox': {'enabled': True, 'excludedCommands': [qmd, 'docker *']}}
self.assertEqual(OPTIONS.merge_json(current, {'sandbox': {'enabled': True}})['sandbox']['excludedCommands'], ['docker *'])
self.assertEqual(OPTIONS.merge_json(current, {'sandbox': {'excludedCommands': [qmd]}})['sandbox']['excludedCommands'], [qmd, 'docker *'])
def test_semantic_retrieval_disabled_removes_codex_session_hook(self):
with tempfile.TemporaryDirectory() as directory:
config = Path(directory) / 'config.toml'