Commit 9810398
committed
feat(API): gate /diagnostics chia-tools check on chia locality
The /diagnostics endpoint reports chia-tools as a recommended local tool, but
chia-tools is only relevant when the Chia wallet and DataLayer run on this
machine. When either RPC URL is remote, CADT can't inspect that host, so the
chia-tools section now reports installed: 'unknown' (with chiaIsLocal: false)
and skips the "chia-tools is recommended" warning instead of misleadingly
reporting "not installed".
Locality is derived from the WALLET_URL/DATALAYER_URL hosts (localhost,
127.0.0.0/8, 0.0.0.0, ::1). Adds unit tests for the host classifier and
integration tests covering the remote -> unknown gating, and relaxes the
live-API contract test to accept the tri-state installed value.1 parent b1e6974 commit 9810398
3 files changed
Lines changed: 127 additions & 5 deletions
File tree
- src/routes
- tests/v2
- integration
- live-api
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
340 | 340 | | |
341 | 341 | | |
342 | 342 | | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
343 | 369 | | |
344 | 370 | | |
345 | 371 | | |
| |||
688 | 714 | | |
689 | 715 | | |
690 | 716 | | |
691 | | - | |
692 | | - | |
693 | | - | |
| 717 | + | |
| 718 | + | |
| 719 | + | |
| 720 | + | |
| 721 | + | |
| 722 | + | |
| 723 | + | |
| 724 | + | |
| 725 | + | |
| 726 | + | |
| 727 | + | |
| 728 | + | |
| 729 | + | |
| 730 | + | |
| 731 | + | |
| 732 | + | |
| 733 | + | |
| 734 | + | |
| 735 | + | |
| 736 | + | |
| 737 | + | |
| 738 | + | |
| 739 | + | |
| 740 | + | |
| 741 | + | |
694 | 742 | | |
695 | 743 | | |
696 | 744 | | |
| |||
758 | 806 | | |
759 | 807 | | |
760 | 808 | | |
761 | | - | |
| 809 | + | |
| 810 | + | |
| 811 | + | |
| 812 | + | |
762 | 813 | | |
763 | 814 | | |
764 | 815 | | |
| |||
880 | 931 | | |
881 | 932 | | |
882 | 933 | | |
| 934 | + | |
883 | 935 | | |
884 | 936 | | |
885 | 937 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
217 | 217 | | |
218 | 218 | | |
219 | 219 | | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
220 | 246 | | |
221 | 247 | | |
222 | 248 | | |
| |||
367 | 393 | | |
368 | 394 | | |
369 | 395 | | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
370 | 433 | | |
371 | 434 | | |
372 | 435 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
184 | 184 | | |
185 | 185 | | |
186 | 186 | | |
187 | | - | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
188 | 195 | | |
189 | 196 | | |
190 | 197 | | |
| |||
0 commit comments