You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
discovery(frontend): useProbeBackedHealth JSDoc claims null-on-error but implementation returns buildUnavailable() #10119
autobot-frontend/src/composables/useProbeBackedHealth.ts:76 — the JSDoc says the factory returns null on fetch error ("null-on-fetch-error"), and the signature is () => Promise<R | null>. But the implementation's catch block returns buildUnavailable('Service unavailable') and never actually returns null.
Impact
Consumers coded against the documented null branch (e.g. if (res === null)) will never hit it — the error path silently yields an 'unavailable' health object instead. Stale docstring vs real behavior.
Needed
Either update the JSDoc + return type to reflect that it always resolves to R (never null), or restore the null-on-error path if that was the intended contract.
Resolved — merged as ae7951628 (PR #10402). useProbeBackedHealth typed+documented as Promise<R> (always resolves R via buildUnavailable, never null); FRONTEND_COMPOSABLES.md updated. No consumer relied on the unreachable null branch.
Activity
complete #9922 tail: footgun guard, health composable contract, syste…
github-actions commentedon Jun 21, 2026
PR #10402 (merged to
Dev_new_gui) references this issue with a close keyword.If this issue is fully resolved, close it manually. If work remains, no action is needed.
mrveiss commentedon Jun 21, 2026
Resolved — merged as
ae7951628(PR #10402). useProbeBackedHealth typed+documented asPromise<R>(always resolves R via buildUnavailable, never null); FRONTEND_COMPOSABLES.md updated. No consumer relied on the unreachable null branch.