Pass the exec-tool kill switch into the clean serve process
ci / svc-realcombo (pull_request) Successful in 1m42s
ci / test-pg (pull_request) Failing after 3m21s
ci / test (pull_request) Successful in 4m16s

Why: env -i dropped RDM_DISABLE_EXEC_TOOLS, so the real RDM binary exited immediately on runners without bwrap, and the capability probe now prints the JSON document.
Evidence: SELF bash -n scripts/svc.sh; python3 -m py_compile tests/test_svc_realcombo.py. GATE run 2656 job 3831 failed on the previous head before this fix.
Impact: serve and the lifecycle child forward that one switch; identity capabilities is checked as protocol 1 JSON.
Refs: #485
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-10-12 15:31:27 +00:00
co-authored by Cursor
parent b10406a58f
commit 0a56150d01
2 changed files with 12 additions and 1 deletions
+7
View File
@@ -1396,11 +1396,15 @@ svc_launch_serve() {
fi
# 桩只靠 SVC_STUB_* 找到记录目录。这些变量不写入 serve.env,避免 recover
# 把某次测试路径固化进实例;生产调用方没有它们。
# RDM_DISABLE_EXEC_TOOLS 是产品兜底开关,必须到达 serve,否则无 bwrap 时拒启。
local k
while IFS= read -r k; do
[ -n "$k" ] || continue
args+=("$k=${!k}")
done < <(compgen -e | grep -E '^SVC_STUB_' || true)
if [ -n "${RDM_DISABLE_EXEC_TOOLS:-}" ]; then
args+=("RDM_DISABLE_EXEC_TOOLS=$RDM_DISABLE_EXEC_TOOLS")
fi
# shellcheck disable=SC2086
nohup "${args[@]}" "$ENV_BIN" serve $exec_args >> "$ENV_DIR/svc.log" 2>&1 9>&- &
}
@@ -1422,6 +1426,9 @@ svc_lifecycle_child() {
[ -n "$k" ] || continue
args+=("$k=${!k}")
done < <(compgen -e | grep -E '^(SVC_|LC_)' || true)
if [ -n "${RDM_DISABLE_EXEC_TOOLS:-}" ]; then
args+=("RDM_DISABLE_EXEC_TOOLS=$RDM_DISABLE_EXEC_TOOLS")
fi
args+=(bash "$0" __lifecycle "$@")
"${args[@]}"
}
+5 -1
View File
@@ -134,7 +134,11 @@ class RealComboTests(tsr.SvcAutoRecoverTests):
"identity", "capabilities"],
capture_output=True, text=True, timeout=15)
self.assertEqual(cap.returncode, 0, cap.stderr)
self.assertIn("identity-capabilities: v1", cap.stdout)
doc = json.loads(cap.stdout)
self.assertEqual(doc["protocol"], 1)
self.assertEqual(doc["identity"]["open"], "existing-no-migrate")
self.assertIn("ensure", doc["identity"]["ops"])
self.assertIn("verify", doc["identity"]["ops"])
# 错 id verify 拒绝
bad = subprocess.run([str(self.runtime("rc1") / "bin" / "agent-system"),
"identity", "verify", "--instance-id",