@haystackeditor/cli 0.14.3 → 0.14.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -521,9 +521,16 @@ async function runUnifiedScan(repo, token) {
521
521
  try {
522
522
  statusResp = await fetch(`${HAYSTACK_API}/api/onboarding/scan/status?runId=${encodeURIComponent(runId)}`, { headers: { Authorization: `Bearer ${token}` } });
523
523
  }
524
- catch {
524
+ catch (err) {
525
525
  // Transient network blip — the KV state is authoritative and won't vanish
526
- // from one failed poll, so keep going.
526
+ // from one failed poll, so keep going. Record it (non-disruptive, no
527
+ // terminal noise) so a persistently-failing poll isn't invisible
528
+ // (PR001: no silent failure).
529
+ trackError('onboarding_scan_poll_network_error', {
530
+ repo,
531
+ run_id: runId,
532
+ error_message: err instanceof Error ? err.message : String(err),
533
+ });
527
534
  continue;
528
535
  }
529
536
  if (statusResp.status === 404) {
package/dist/index.js CHANGED
@@ -45,7 +45,11 @@ function getVersion() {
45
45
  const pkgPath = join(dirname(fileURLToPath(import.meta.url)), '..', 'package.json');
46
46
  return JSON.parse(readFileSync(pkgPath, 'utf8')).version ?? '0.0.0';
47
47
  }
48
- catch {
48
+ catch (err) {
49
+ // package.json ships inside the npm tarball, so this should never happen —
50
+ // but log to stderr instead of silently reporting a wrong version
51
+ // (PR001: no silent fallback). stderr keeps the stdout `--version` clean.
52
+ console.error('haystack: could not read version from package.json:', err instanceof Error ? err.message : err);
49
53
  return '0.0.0';
50
54
  }
51
55
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@haystackeditor/cli",
3
- "version": "0.14.3",
3
+ "version": "0.14.4",
4
4
  "description": "Set up Haystack for your project — automated PR review, triage, and merge queue",
5
5
  "type": "module",
6
6
  "bin": {