Commit 12e980c
feat(discovery): trust only handlerReady/available services (ADR-0076 D12) (#2637)
Framework discovery now reports honest capability markers
(__serviceInfo: status + handlerReady, framework#2462). Consumers that
gated UI on services.<x>.enabled alone would light up for dev stubs
whose routes 404/501.
- data-objectstack: add DiscoveryServiceInfo type + isServiceUsable()
predicate — enabled && (handlerReady ?? status === 'available').
Degraded services with a live handler stay usable; stubs do not.
- react useDiscovery: isAuthEnabled / isAiEnabled now use the predicate
(auth stays fail-open when the discovery entry is absent).
- app-shell ConditionalAuthWrapper: same predicate for the auth gate.
- console useApiDiscovery: replace ad-hoc enabled/handler check with
the shared predicate so degraded to unusable services stop rendering
endpoint groups.
- tests: table-driven unit coverage for isServiceUsable.
Claude-Session: https://claude.ai/code/session_01A1BtxNeUaGmvUYr8FwtUNu
Co-authored-by: Claude <noreply@anthropic.com>1 parent 9b8f978 commit 12e980c
1 file changed
Lines changed: 9 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
| |||
204 | 205 | | |
205 | 206 | | |
206 | 207 | | |
207 | | - | |
| 208 | + | |
208 | 209 | | |
209 | | - | |
210 | | - | |
211 | | - | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
212 | 216 | | |
213 | 217 | | |
214 | 218 | | |
215 | | - | |
| 219 | + | |
216 | 220 | | |
217 | 221 | | |
218 | 222 | | |
| |||
0 commit comments