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

+1
View File
@@ -93,6 +93,7 @@ They cover source, web templates and styles, .NET and WPF markup and project fil
file mask lives in `MASK` in `shared/qmd/qmd-lib.mjs` and is reapplied to existing repository collections. file mask lives in `MASK` in `shared/qmd/qmd-lib.mjs` and is reapplied to existing repository collections.
Where the Claude sandbox is enabled (macOS, Linux, WSL2), the exact search command is listed in Where the Claude sandbox is enabled (macOS, Linux, WSL2), the exact search command is listed in
`sandbox.excludedCommands`, because the sandbox blocks the localhost daemon and the index under the home directory. `sandbox.excludedCommands`, because the sandbox blocks the localhost daemon and the index under the home directory.
Disabling local search removes that exclusion, including on update.
Auto thresholds can be overridden with `QMD_BENCHMARK_MAX_QUERY_SECONDS` and Auto thresholds can be overridden with `QMD_BENCHMARK_MAX_QUERY_SECONDS` and
`QMD_BENCHMARK_MIN_CHUNKS_PER_SECOND`. The benchmark uses a temporary database and a deterministic `QMD_BENCHMARK_MIN_CHUNKS_PER_SECOND`. The benchmark uses a temporary database and a deterministic
100-document fixture; its measurements are not an end-to-end estimate for a user's repository. 100-document fixture; its measurements are not an end-to-end estimate for a user's repository.
+11
View File
@@ -58,6 +58,12 @@ def filter_options(path, flashbang_enabled=True, statusline_enabled=True, semant
settings['hooks']['SessionStart'] = remaining settings['hooks']['SessionStart'] = remaining
else: else:
settings.get('hooks', {}).pop('SessionStart', None) settings.get('hooks', {}).pop('SessionStart', None)
sandbox = settings.get('sandbox', {})
excluded = [command for command in sandbox.get('excludedCommands', []) if 'qmd-search.mjs' not in command]
if excluded:
sandbox['excludedCommands'] = excluded
else:
sandbox.pop('excludedCommands', None)
if not statusline_enabled: if not statusline_enabled:
settings.pop('statusLine', None) settings.pop('statusLine', None)
return json.dumps(settings, indent=2, ensure_ascii=False) + '\n' return json.dumps(settings, indent=2, ensure_ascii=False) + '\n'
@@ -109,6 +115,11 @@ def merge_json(current, managed):
result = dict(current) result = dict(current)
if 'statusLine' not in managed: if 'statusLine' not in managed:
result.pop('statusLine', None) result.pop('statusLine', None)
sandbox = result.get('sandbox')
if isinstance(sandbox, dict) and isinstance(sandbox.get('excludedCommands'), list):
# The QMD exclusion is owned; managed settings re-add it only while semantic retrieval is enabled.
excluded = [command for command in sandbox['excludedCommands'] if 'qmd-search.mjs' not in str(command)]
result['sandbox'] = dict(sandbox, excludedCommands=excluded) if excluded else {k: v for k, v in sandbox.items() if k != 'excludedCommands'}
for key, value in managed.items(): for key, value in managed.items():
if key == 'hooks' and isinstance(value, dict) and isinstance(result.get(key), dict): if key == 'hooks' and isinstance(value, dict) and isinstance(result.get(key), dict):
hooks = dict(result[key]) hooks = dict(result[key])
+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']] 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"']) 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): def test_semantic_retrieval_disabled_removes_codex_session_hook(self):
with tempfile.TemporaryDirectory() as directory: with tempfile.TemporaryDirectory() as directory:
config = Path(directory) / 'config.toml' config = Path(directory) / 'config.toml'
+1 -1
View File
@@ -4,4 +4,4 @@ Start from the parent's requirements and references. Identify relevant boundarie
Before accepting a design that relies on external technology behavior, MUST apply the planning checkpoint in `technical-research`. Carry supporting evidence or unresolved assumptions into the handoff. Before accepting a design that relies on external technology behavior, MUST apply the planning checkpoint in `technical-research`. Carry supporting evidence or unresolved assumptions into the handoff.
Use shell commands for inspection and required research tools, including semantic search and MCPorter. Do not modify implementation code unless assigned. Use shell commands for inspection and required research tools, including semantic search (when installed) and MCPorter. Do not modify implementation code unless assigned.
+1 -1
View File
@@ -2,4 +2,4 @@
Start with the parent's question and references. Inspect only code, patterns, documentation, and constraints needed to answer it; expand when evidence requires it. Return conclusions, concrete references, and unknowns using the shared orchestration handoff protocol. Avoid modifying implementation code by default. Start with the parent's question and references. Inspect only code, patterns, documentation, and constraints needed to answer it; expand when evidence requires it. Return conclusions, concrete references, and unknowns using the shared orchestration handoff protocol. Avoid modifying implementation code by default.
Use shell commands for inspection and required research tools, including semantic search and MCPorter. Use shell commands for inspection and required research tools, including semantic search (when installed) and MCPorter.
+1 -1
View File
@@ -2,7 +2,7 @@
Provide static and semantic correctness review using the acceptance criteria and actual git diff. Inspect changed symbols first, then direct callers, dependencies, tests, and contracts needed to judge correctness. Expand for shared state, configuration, persistence, security, generated code, or public API effects; avoid broad repository exploration by default. Provide static and semantic correctness review using the acceptance criteria and actual git diff. Inspect changed symbols first, then direct callers, dependencies, tests, and contracts needed to judge correctness. Expand for shared state, configuration, persistence, security, generated code, or public API effects; avoid broad repository exploration by default.
Use shell commands to inspect diffs and run required research tools, including semantic search and MCPorter. Do not run tests, builds, or runtime checks; reuse supplied execution evidence and report gaps to the parent or verifier. Use shell commands to inspect diffs and run required research tools, including semantic search (when installed) and MCPorter. Do not run tests, builds, or runtime checks; reuse supplied execution evidence and report gaps to the parent or verifier.
For each finding, report SEVERITY (blocking, important, or minor), LOCATION, IMPACT, EVIDENCE, and SCOPE (introduced, pre-existing, or uncertain). Do not report stylistic preferences or pre-existing issues unless they materially affect the requested change. Prioritize actionable correctness defects, keep unrelated cleanup out of scope, and use blocking only for security, data-loss, broken contracts, or deterministic failures. For each finding, report SEVERITY (blocking, important, or minor), LOCATION, IMPACT, EVIDENCE, and SCOPE (introduced, pre-existing, or uncertain). Do not report stylistic preferences or pre-existing issues unless they materially affect the requested change. Prioritize actionable correctness defects, keep unrelated cleanup out of scope, and use blocking only for security, data-loss, broken contracts, or deterministic failures.