Repository navigation
Commit 7074b6c
fix: [#830] address consensus review — Skill.all/PostConnectSuggestions in degraded + detectDataTools via safeSpawnSync
Second-pass on PR #831 after code review. Three follow-ups in scope.
1. Skill.all() in degraded (MAJOR per reviewer)
The `Skill.all().then(...).catch(() => 0)` block silently swallowed
failures. If skills failed to load, the user saw `skill_count: 0`
with no indication anything was wrong. Pushed "skills" into the
degraded list on catch.
2. detectDataTools consistency (MAJOR)
`detectDataTools` still used a bare `Bun.spawnSync` + try/catch
pattern, solving the same "missing binary" problem detectGit now
solves with safeSpawnSync. Two different code paths for the same
semantic. Routed through safeSpawnSync for uniformity.
Also exported safeSpawnSync so tests can exercise the primitive
directly (was internal-only before).
3. PostConnectSuggestions degraded tracking (MINOR)
The dynamic import / `trackSuggestions` call had a swallowing
try/catch with a "Telemetry must never break scan output" comment.
Fair principle, but the failure was invisible post-deploy. Pushed
"post-connect-suggestions" into degraded so the dashboard sees
when it silently misfires.
4. safeSpawnSync docs (MINOR)
Reviewer flagged that the `exitCode: number` return type collapses
"signaled child" and "exited 1" into the same value. Documented
that contract explicitly in the JSDoc — future callers know what
the helper guarantees and what it doesn't.
5. safeSpawnSync timeout passthrough
detectDataTools needed the 5000ms timeout, which the original
safeSpawnSync signature didn't expose. Added an optional opts.timeout
parameter that forwards to Bun.spawnSync.
Tests
- 4 new tests for safeSpawnSync directly: returns null on missing
binary, returns {exitCode, stdout} on success, returns nonzero
exitCode on failed run, forwards timeout option without crashing.
Validation
- `tsgo --noEmit`: pass.
- `bun test test/tool/project-scan.test.ts`: 82 pass / 0 fail (4 new).
- Marker check: pass (no upstream-shared files in this file's path).
Reviewer note
- Gemini-3.1-pro second opinion failed (OpenRouter credit exhaustion).
Review proceeded with single-reviewer Claude analysis.
Closes review feedback for PR #831.
Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>1 parent 4402667 commit 7074b6c
2 files changed
Lines changed: 81 additions & 19 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
59 | 71 | | |
60 | | - | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
61 | 76 | | |
62 | | - | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
63 | 82 | | |
64 | 83 | | |
65 | 84 | | |
| |||
352 | 371 | | |
353 | 372 | | |
354 | 373 | | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
355 | 380 | | |
356 | 381 | | |
357 | | - | |
358 | | - | |
359 | | - | |
360 | | - | |
361 | | - | |
362 | | - | |
363 | | - | |
364 | | - | |
365 | | - | |
366 | | - | |
367 | | - | |
368 | | - | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
369 | 388 | | |
370 | | - | |
371 | | - | |
372 | | - | |
373 | 389 | | |
| 390 | + | |
374 | 391 | | |
375 | 392 | | |
376 | 393 | | |
| |||
608 | 625 | | |
609 | 626 | | |
610 | 627 | | |
611 | | - | |
| 628 | + | |
| 629 | + | |
| 630 | + | |
| 631 | + | |
612 | 632 | | |
613 | 633 | | |
614 | 634 | | |
| |||
733 | 753 | | |
734 | 754 | | |
735 | 755 | | |
736 | | - | |
| 756 | + | |
| 757 | + | |
| 758 | + | |
| 759 | + | |
737 | 760 | | |
738 | 761 | | |
739 | 762 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
| |||
930 | 931 | | |
931 | 932 | | |
932 | 933 | | |
| 934 | + | |
| 935 | + | |
| 936 | + | |
| 937 | + | |
| 938 | + | |
| 939 | + | |
| 940 | + | |
| 941 | + | |
| 942 | + | |
| 943 | + | |
| 944 | + | |
| 945 | + | |
| 946 | + | |
| 947 | + | |
| 948 | + | |
| 949 | + | |
| 950 | + | |
| 951 | + | |
| 952 | + | |
| 953 | + | |
| 954 | + | |
| 955 | + | |
| 956 | + | |
| 957 | + | |
| 958 | + | |
| 959 | + | |
| 960 | + | |
| 961 | + | |
| 962 | + | |
| 963 | + | |
| 964 | + | |
| 965 | + | |
| 966 | + | |
| 967 | + | |
| 968 | + | |
| 969 | + | |
| 970 | + | |
| 971 | + | |
0 commit comments