Skip to content

fix(serve): enforce the delegated health deadline - #278

Closed
Afloat16 wants to merge 1 commit into
Edge0-AI:mainfrom
Afloat16:fix/delegate-health-deadline
Closed

Afloat16 wants to merge 1 commit into
Edge0-AI:mainfrom
Afloat16:fix/delegate-health-deadline

Conversation

@Afloat16

Copy link
Copy Markdown
Contributor

What & why

--strata-ready-timeout is checked only after a failed health probe. A /health response that arrives after the deadline can therefore start the server successfully. Fixed two-second connection and five-second read timeouts also let a probe outlive the remaining startup budget.

Use a steady-clock deadline for the ready-file/health phase. Each health probe receives the remaining connection, read and total request budget; check the deadline before accepting its response. Poll sleeps stop at the same deadline. The total request budget also bounds a response that keeps sending small body fragments, which would otherwise reset the per-read timeout.

The launcher protocol and default timeout are unchanged. This bounds the ready-file/HTTP health phase after the launcher reports its PID; child shutdown retains its existing cleanup allowance.

Area

  • Engine, CLI or server (edge0-infer/)

How was it tested?

Base: bc2dc409d420097b4e864d511901180d7c2c6bac; Linux, GCC 14.2, CPU preset.

  • Rebuilt the base native CLI. A one-second timeout incorrectly accepted a successful health response delayed by three seconds and kept serving; the new regression failed against that base.
  • The fixed native CLI rejects both a three-second delayed 200 and a body sent in 0.3-second increments, returns the existing readiness error, never prints Listening:, and removes the child processes. A timely 0.2-second health probe still starts and shuts down normally.
  • Existing actual-process launch_handshake, failures, platform_launch, and lifecycle integration functions pass, including default Python selection, paths containing spaces, startup failures, signals, and cleanup.
  • Full chat_strata_test.py --cli ... passes, covering history, regeneration, cancellation, child failures, passthrough and cleanup.
  • Full CPU build passes. L0/L1: 97 passed, 3 Vulkan tests skipped, 4 unchanged baseline failures: moe_test_app_generation (std::tmpfile unavailable), moe_test_platform_memory (existing Linux expectation), and the extreme-float cases in moe_test_ordered_json / moe_test_template_tools.
  • Python syntax compilation and git diff --check pass. Linux execution was available; no macOS, Windows or GPU execution claim.

Checklist

  • Added failure-first native process regressions for delayed and continuously arriving health responses.
  • Ran affected startup, shutdown and delegated chat integrations.
  • Full L0/L1 is green (four unchanged baseline failures listed above).
  • All supported platforms tested (Linux tested locally).

@Afloat16

Copy link
Copy Markdown
Contributor Author

Superseded by #291, the consolidated delegated-serving PR requested in #289. The original change and regression coverage are preserved, and the original commit remains in the consolidated branch's history.

@Afloat16 Afloat16 closed this Nov 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant