From 31ca34c679b676355fd4ce1967ef06a7338270dd Mon Sep 17 00:00:00 2001 From: Jeremie Miller Date: Tue, 12 May 2026 17:59:31 -0500 Subject: [PATCH] fix(service): _up trusts wait_ready as authoritative; _status is informational MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The readiness primitive (wait_ready) is the contract for service-up readiness on darwin per AC-3 of the solstone-macos installer spec. _up() was calling _status() at the end and returning ITS exit code — but _status() ends with a 10s health_check() callosum-status timeout that fires DURING normal supervisor warmup (convey/cortex/link bring up the callosum bus over ~30-90s post-readiness). This re-introduced the same premature-failure that the readiness primitive was meant to retire. wait_ready returning a valid marker means the supervisor has signaled itself ready; further status probes are noise. Diagnosed during solstone-macos installer cold smoke 2026-05-12: marker file written at +33s, supervisor process alive and healthy, sol setup reported service_up_failed. Trace: wait_ready succeeds -> _status() prints "Service: installed" + "State: running (launchd)" -> health_check() times out at 10s -> _status returns 1 -> _up returns 1 -> setup emits service_up_failed. After fix: _up returns 0 once wait_ready succeeds; _status() runs for the human-readable Service/State output but does not gate the exit code. Bumps version to 0.3.1 for the solstone-macos installer fix-and-ship cycle. Co-Authored-By: Claude Opus 4.7 (1M context) --- pyproject.toml | 2 +- solstone/think/service.py | 10 +++++++++- uv.lock | 2 +- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index c4fc41dca..2fb8b3778 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "solstone" -version = "0.3.0" +version = "0.3.1" description = "Navigate Life Intelligently" readme = "README.md" requires-python = ">=3.11" diff --git a/solstone/think/service.py b/solstone/think/service.py index 8fe72a78c..08344a6d4 100644 --- a/solstone/think/service.py +++ b/solstone/think/service.py @@ -559,7 +559,15 @@ def _up(port: int = DEFAULT_SERVICE_PORT) -> int: print(_ready_timeout_message(), file=sys.stderr) return 1 - return _status() + # wait_ready() succeeding is the authoritative readiness signal per the + # readiness primitive contract. _status() is invoked for human-readable + # output, but its return code (which folds in health_check()'s 10s callosum + # status probe) is NOT the gate. The callosum bus warms up over ~30-90s + # post-readiness while convey/cortex/link come online; allowing _status() + # to fail _up() here re-introduces the same premature-failure that the + # readiness primitive was meant to retire. + _status() + return 0 def _down() -> int: diff --git a/uv.lock b/uv.lock index 0713ea36b..2f843af53 100644 --- a/uv.lock +++ b/uv.lock @@ -2668,7 +2668,7 @@ wheels = [ [[package]] name = "solstone" -version = "0.3.0" +version = "0.3.1" source = { editable = "." } dependencies = [ { name = "anthropic" }, -- 2.51.2