You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
supervisor: gate wraps ANY cbm_mcp_handle_tool embedder — test binaries recurse into spawn chains #845
Discovered during the #828 distill (2026-07-04). The #827 index supervisor's gate in handle_index_repository wraps unconditionally (unless --index-worker/CBM_INDEX_SUPERVISOR=0), and the worker spawn resolves the CURRENT binary (self) — correct for the MCP server/CLI, wrong for any other embedder of cbm_mcp_handle_tool.
Observed: tests/repro's runner indexes via cbm_mcp_handle_tool → the supervisor spawns ' cli --index-worker index_repository ...' → the test binary ignores argv, selects suites via the inherited CBM_REPRO_ONLY env (or runs ALL suites when unset) → re-indexes → spawns grandchildren recursively. 11+ min idle process chains observed; the main test-runner escapes only by accident (argv-based suite selection). These recursive spawn trees during test runs also multiply kernel VM-map load (see the 2026-07-04 host panics).
Fix shape (product, not just tests): main() of the real binary marks itself as a supervisor-capable host (e.g. cbm_index_supervisor_mark_host()); the gate wraps ONLY when marked. Embedders/tests then run in-process by default. Belt+suspenders: export CBM_INDEX_SUPERVISOR=0 in the repro/test harness mains. Needs a RED reproduction first (tiny embedder that calls handle_tool and asserts no child spawn) per reproduce-first policy.
Fixed on main via #851 (merge 37c00d1). Both bugs landed reproduce-first: (1) the supervisor gate now wraps only a process that called cbm_index_supervisor_mark_host() (the real binary's main), so embedders of cbm_mcp_handle_tool — including the test runner — index in-process and can no longer trigger the recursive ' cli --index-worker' spawn chains; (2) the CLI worker now starts the parent-death watchdog, so a worker whose supervisor dies exits instead of orphaning. This also removes a recursive-spawn contributor to the local build kernel-panics observed 2026-07-04. Guard tests: index_supervisor_gate_requires_marked_host_issue845 + test_worker_watchdog.sh.
Activity
fix(supervisor): wrap only marked host binaries; watchdog in worker mode
DeusData commentedon Jul 4, 2026
Fixed on main via #851 (merge 37c00d1). Both bugs landed reproduce-first: (1) the supervisor gate now wraps only a process that called cbm_index_supervisor_mark_host() (the real binary's main), so embedders of cbm_mcp_handle_tool — including the test runner — index in-process and can no longer trigger the recursive ' cli --index-worker' spawn chains; (2) the CLI worker now starts the parent-death watchdog, so a worker whose supervisor dies exits instead of orphaning. This also removes a recursive-spawn contributor to the local build kernel-panics observed 2026-07-04. Guard tests: index_supervisor_gate_requires_marked_host_issue845 + test_worker_watchdog.sh.
fix(index): gate supervised auto-index watcher registration on auto_w…