fix(rap): treat servers that don't support /tool_call_status as having given up on the call#62
Draft
shadaj wants to merge 1 commit into
Draft
fix(rap): treat servers that don't support /tool_call_status as having given up on the call#62shadaj wants to merge 1 commit into
/tool_call_status as having given up on the call#62shadaj wants to merge 1 commit into
Conversation
…ing given up on the call Previously, a server responding 404 (or any non-2xx) to a `/tool_call_status` query was treated as *unknown* liveness and its pending tool calls / subscriptions were kept pending forever. Since such a server cannot be tracking the call in a way that survives restarts, the default is now to treat the call/subscription as failed and prune it. ## New liveness semantics (`rap-client`) * `check_tool_call_status` now maps: * 2xx + valid body → `Alive` / `Gone` as reported (unchanged) * **4xx (endpoint unsupported, e.g. 404 from an older server) → `Gone`** (was `Unknown`) * **2xx with unparseable body → `Gone`** (was `Unknown`) * 5xx (transient server error) → `Unknown` (kept pending) * transport error (unreachable) → `Unknown` (kept pending) * `ToolCallLiveness` docs updated to reflect the new contract. The daemon's reconcile logic is unchanged (prunes on `Gone`, keeps on `Alive`/`Unknown`) — the new mapping means unsupported-endpoint servers now get their orphaned work pruned on boot, while genuinely unreachable servers still get the benefit of the doubt. ## Tests * Flipped `keeps_pending_tool_call_when_endpoint_unsupported` → `prunes_pending_tool_call_when_endpoint_unsupported` (404 now injects the failure result). * New `prunes_dead_subscription_when_endpoint_unsupported` (404 → final subscription-failure event). * New `keeps_pending_tool_call_on_transient_server_error` (500 → kept pending). ## Docs * `tool-call-status.md`: rewrote **Runtime Error Semantics** into the two categories (endpoint unsupported → prune; server unavailable → unknown, never prune), with the rationale that a hung conversation is worse than a spurious failure; updated the recovery and dispatch sections (multi-server broadcast querying must not treat a non-owning server's `alive: false`/404 as authoritative when the owning server is unreachable). * Updated `lifecycle.md`, `building-a-rap-tool.md` (endpoint is now effectively required for async/subscription tools), `building-a-runtime.md`, `subscription-events.md`, and `infinity-code/background-agents.md` to match. Co-authored-by: Infinity 🤖 <infinity@hydro.run> PR: #62
Deploying infinity with
|
| Latest commit: |
bb01dcc
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://2b5a32e6.infinity-dc7.pages.dev |
| Branch Preview URL: | https://sandbox-c20ca70d-6e6b-46bc-a.infinity-dc7.pages.dev |
shadaj
force-pushed
the
sandbox-c20ca70d-6e6b-46bc-a469-116a46741b89
branch
from
July 9, 2026 20:55
deb8392 to
bb01dcc
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Previously, a server responding 404 (or any non-2xx) to a
/tool_call_statusquery was treated as unknown liveness and its pending tool calls / subscriptions were kept pending forever. Since such a server cannot be tracking the call in a way that survives restarts, the default is now to treat the call/subscription as failed and prune it.New liveness semantics (
rap-client)check_tool_call_statusnow maps:Alive/Goneas reported (unchanged)Gone(wasUnknown)Gone(wasUnknown)Unknown(kept pending)Unknown(kept pending)ToolCallLivenessdocs updated to reflect the new contract.The daemon's reconcile logic is unchanged (prunes on
Gone, keeps onAlive/Unknown) — the new mapping means unsupported-endpoint servers now get their orphaned work pruned on boot, while genuinely unreachable servers still get the benefit of the doubt.Tests
keeps_pending_tool_call_when_endpoint_unsupported→prunes_pending_tool_call_when_endpoint_unsupported(404 now injects the failure result).prunes_dead_subscription_when_endpoint_unsupported(404 → final subscription-failure event).keeps_pending_tool_call_on_transient_server_error(500 → kept pending).Docs
tool-call-status.md: rewrote Runtime Error Semantics into the two categories (endpoint unsupported → prune; server unavailable → unknown, never prune), with the rationale that a hung conversation is worse than a spurious failure; updated the recovery and dispatch sections (multi-server broadcast querying must not treat a non-owning server'salive: false/404 as authoritative when the owning server is unreachable).lifecycle.md,building-a-rap-tool.md(endpoint is now effectively required for async/subscription tools),building-a-runtime.md,subscription-events.md, andinfinity-code/background-agents.mdto match.