feat(ops): add quality.check operation to exec-constrained and box-relay

This commit is contained in:
operator
2026-10-05 05:40:46 +00:00
parent 9a2501c97e
commit 34ab006e88
2 changed files with 24 additions and 0 deletions
+21
View File
@@ -464,6 +464,22 @@ def _relay_health_build(a):
return [sys.executable, os.path.join(BIN_DIR, 'box-ctl.py'), 'relay-health']
def _quality_check_validate(raw):
if raw not in ({}, None):
if isinstance(raw, dict):
allowed = {'scope'}
for k in raw:
if k not in allowed:
raise OpError(f'unknown arg: {k}')
else:
raise OpError('quality.check args must be an object or empty')
return {}
def _quality_check_build(a):
return [sys.executable, os.path.join(BIN_DIR, 'box-ctl.py'), 'quality-check']
def _subagent_spawn_validate(raw):
if not isinstance(raw, dict):
raise OpError('args must be an object')
@@ -906,6 +922,11 @@ OPS = {
'timeout': 30, 'side_effecting': False,
'desc': 'Check systemd relay service status across all node ports (read-only)',
},
'quality.check': {
'validate': _quality_check_validate, 'build': _quality_check_build,
'timeout': 30, 'side_effecting': False,
'desc': 'Run box quality gates and self-diagnostics suite (read-only)',
},
'subagent.spawn': {
'validate': _subagent_spawn_validate, 'build': _subagent_spawn_build,
'timeout': 120, 'side_effecting': True,