fix(ci): accept QMD sandbox exclusion and satisfy ruff E731
CI / CI configuration security checks (push) Successful in 3s
CI / Capabilities and shell quality (push) Successful in 13s
CI / Python tests and compilation (push) Successful in 26s
CI / QMD unit tests (push) Successful in 5s
CI / Build and inspect generated packages (push) Successful in 18s
CI / PowerShell tests on Ubuntu (push) Failing after 51s
CI / Installed client configuration smoke tests (push) Canceled after 54s
CI / Bash integration and installation guards (push) Canceled after 55s

- validate-config: allow sandbox.excludedCommands only with the exact
  QMD search command, keeping the sandbox fail-closed
- shell package tests: expect the excludedCommands entry
- tests: replace assigned lambdas with functions (ruff E731)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Julian LechnerandClaude Opus 5.5 committed 2026-11-16 12:16:42 +01:00
1 parent 09e8e832ed
commit 49636323f0
5 files changed
+15 -7

No files matched your search

+5 -3
View File
@@ -114,7 +114,8 @@ class InstallOptionsTests(unittest.TestCase):
managed = managed.replace('__IMPECCABLE_HOOK_SCRIPT__', 'invoke-impeccable-hook.sh')
merged = OPTIONS.merge_toml(OPTIONS.merge_toml('', managed), managed)
hooks = tomllib.loads(merged)['hooks']
impeccable = lambda groups: [group for group in groups if 'impeccable-hook' in group['hooks'][0]['command']]
def impeccable(groups):
return [group for group in groups if 'impeccable-hook' in group['hooks'][0]['command']]
self.assertEqual(1, len(impeccable(hooks['PostToolUse'])))
self.assertEqual('Edit|Write|apply_patch', impeccable(hooks['PostToolUse'])[0]['matcher'])
self.assertEqual(1, len(impeccable(hooks['Stop'])))
@@ -131,8 +132,9 @@ class InstallOptionsTests(unittest.TestCase):
with self.subTest(shell=name), tempfile.TemporaryDirectory() as directory:
home = Path(directory)
env = dict(os.environ, HOME=str(home), USERPROFILE=str(home), CODEX_HOME=str(home / '.codex'))
run = lambda: subprocess.run([executable, *arguments, str(scripts / name)], input='{"event":1}',
env=env, capture_output=True, text=True, timeout=60)
def run():
return subprocess.run([executable, *arguments, str(scripts / name)], input='{"event":1}',
env=env, capture_output=True, text=True, timeout=60)
result = run()
self.assertEqual((0, ''), (result.returncode, result.stdout), result.stderr)
launcher = home / '.agents/skills/impeccable/scripts' / launcher_name