wait_for_service
Block until a deployed service converges or fails, then return its outcome and failure diagnosis so you can confirm the real deploy result without polling.
Instructions
Use when: a deploy is in flight and you need its real outcome.
Blocks until the service converges (healthy) or fails, then returns
``{outcome: converged|failed|timeout|superseded, ...}`` — always, never
raising on a timeout. After ``stop_service``, ``converged`` means the
service is actually stopped.
On ``outcome: failed`` the response also carries ``diagnosis`` — the
FULL ``diagnose_service`` bundle (``remediation.code`` + ``detail``,
crash forensics, health probe, binding readiness and a bounded log
tail), folded in so a failure needs no second call. Branch on
``diagnosis.remediation.code``. It is ``null`` on every non-failed
outcome, and ``null`` on a failure your token is not owner-or-admin for
(the bundle carries app log lines) — in that case call
``diagnose_service`` yourself with a token that owns the app.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Service name or job id of an existing service (app, model or database); both resolve to the same row. | |
| timeout | No | Seconds to block before returning ``outcome: timeout``. Default 60; floored at 1 here and capped at 300 by the daemon. | |
| version | No | Deploy generation to converge on — the ``last_deploy.version`` from a ``deploy``/``deploy_git``/``deploy_app``/``deploy_template`` 201. Omit and the generation recorded on the row when the call starts is used, so a redeploy that landed between your 201 and this call is reported as ``converged`` as if it were yours. |