Merge daemon warmup admission fix

Owner-authorized follow-up. Live runtime remains unchanged until its normal managed update.
This commit is contained in:
Anton Razzhigaev 2026-09-13 22:10:56 +03:00 • committed by GitHub
commit 75b94cfc0d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 8 additions and 2 deletions

View file

@ -970,7 +970,13 @@ def warm_owned_daemon() -> bool:
def warm() -> None:
try:
ensure_owned_gateway().close()
# Warmup is the host's speculative join, so give an already
# custodied daemon enough room to finish journal admission after
# its control socket appears. A normal caller keeps the shorter
# admission window; expiry still leaves custody intact and the
# first real caller simply joins the same startup.
warmup_admission_wait = max(_ADMISSION_WAIT_SEC, _SPAWN_WAIT_SEC * 2.0)
ensure_owned_gateway(admission_wait_sec=warmup_admission_wait).close()
except Exception:
log.info("Owned daemon warmup did not reach readiness; the first caller starts or joins",
exc_info=True)

View file

@ -246,7 +246,7 @@ def test_warmup_is_one_background_ensure_for_a_provisioned_home_only(restart_roo
descriptor.write_text("{}")
assert owned.warm_owned_daemon() is True
_join_warmup_thread()
assert ensures == [("ensure", {}), "closed"]
assert ensures == [("ensure", {"admission_wait_sec": 40.0}), "closed"]
def unreachable(**kw):
raise RuntimeError("fixture daemon down")