@ouro.bot/cli 0.1.0-alpha.529 → 0.1.0-alpha.530

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.
package/changelog.json CHANGED
@@ -1,6 +1,14 @@
1
1
  {
2
2
  "_note": "This changelog is maintained as part of the PR/version-bump workflow. Agent-curated, not auto-generated. Agents read this file directly via read_file to understand what changed between versions.",
3
3
  "versions": [
4
+ {
5
+ "version": "0.1.0-alpha.530",
6
+ "changes": [
7
+ "`ouro up` now gives freshly restarted daemons a bounded final health-settling window before failing, so managed senses such as BlueBubbles and mail can finish proving healthy after asynchronous recovery without producing a false failed handoff.",
8
+ "The final daemon check continues to fail on persistent degraded health, but its failure now reports the last concrete degraded sense detail after the settle window so real boot failures stay actionable.",
9
+ "Adds regression coverage for transient degraded runtime health recovering before handoff and for persistent degraded health still blocking `ouro up`."
10
+ ]
11
+ },
4
12
  {
5
13
  "version": "0.1.0-alpha.529",
6
14
  "changes": [
@@ -564,6 +564,8 @@ function writeSyncProbeSummary(deps, findings) {
564
564
  function bootPhasePlan(_daemonAlive) {
565
565
  return ["update check", "system setup", "sync probe", "starting daemon", "provider checks", "final daemon check"];
566
566
  }
567
+ const FINAL_DAEMON_HEALTH_SETTLE_TIMEOUT_MS = 20_000;
568
+ const FINAL_DAEMON_HEALTH_SETTLE_POLL_INTERVAL_MS = 500;
567
569
  /**
568
570
  * Layer 2: brief, scannable summary of a boot-sync-probe finding for the
569
571
  * progress reporter. Renderer-style hints (full repair guidance) live in
@@ -621,7 +623,27 @@ function finalDaemonFailureMessage(deps, reason) {
621
623
  lines.push("Run `ouro up` again or `ouro doctor` for a deeper diagnosis.");
622
624
  return lines.join("\n");
623
625
  }
624
- async function verifyDaemonReadyForHandoff(deps, options = {}) {
626
+ async function verifyDaemonReadyForHandoff(deps, options) {
627
+ const settleTimeoutMs = options.settleTimeoutMs;
628
+ const settlePollIntervalMs = options.settlePollIntervalMs;
629
+ const settleDeadlineMs = cliNowMs(deps) + settleTimeoutMs;
630
+ for (;;) {
631
+ const result = await verifyDaemonReadyForHandoffOnce(deps, options);
632
+ if (result.ok || !result.retryable || settleTimeoutMs === 0)
633
+ return result;
634
+ if (cliNowMs(deps) >= settleDeadlineMs) {
635
+ const reason = result.reason;
636
+ return {
637
+ ...result,
638
+ message: finalDaemonFailureMessage(deps, `${reason} after waiting ${Math.ceil(settleTimeoutMs / 1_000)}s`),
639
+ };
640
+ }
641
+ const reason = result.reason;
642
+ options.onSettling?.(reason);
643
+ await cliSleep(deps, settlePollIntervalMs);
644
+ }
645
+ }
646
+ async function verifyDaemonReadyForHandoffOnce(deps, options = {}) {
625
647
  const socketAlive = await deps.checkSocketAlive(deps.socketPath);
626
648
  if (!socketAlive) {
627
649
  return {
@@ -665,10 +687,13 @@ async function verifyDaemonReadyForHandoff(deps, options = {}) {
665
687
  summary: `runtime health ${payload.overview.health}`,
666
688
  };
667
689
  }
690
+ const reason = `runtime health is ${payload.overview.health}${detail}`;
668
691
  return {
669
692
  ok: false,
670
693
  summary: `daemon health ${payload.overview.health}`,
671
- message: finalDaemonFailureMessage(deps, `runtime health is ${payload.overview.health}${detail}`),
694
+ message: finalDaemonFailureMessage(deps, reason),
695
+ retryable: true,
696
+ reason,
672
697
  };
673
698
  }
674
699
  const workerCount = payload.workers.length;
@@ -5883,6 +5908,9 @@ async function runOuroCli(args, deps = (0, cli_defaults_1.createDefaultOuroCliDe
5883
5908
  const finalDaemonCheck = await verifyDaemonReadyForHandoff(deps, {
5884
5909
  allowDegradedHealth: Boolean(command.noRepair
5885
5910
  && ((daemonResult.stability?.degraded.length ?? 0) > 0 || providerDegraded.length > 0)),
5911
+ settleTimeoutMs: deps.finalDaemonHealthSettleTimeoutMs ?? FINAL_DAEMON_HEALTH_SETTLE_TIMEOUT_MS,
5912
+ settlePollIntervalMs: deps.finalDaemonHealthSettlePollIntervalMs ?? FINAL_DAEMON_HEALTH_SETTLE_POLL_INTERVAL_MS,
5913
+ onSettling: (reason) => progress.updateDetail(`${reason}\nwaiting for enabled senses to prove healthy`),
5886
5914
  });
5887
5915
  if (!finalDaemonCheck.ok) {
5888
5916
  ;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ouro.bot/cli",
3
- "version": "0.1.0-alpha.529",
3
+ "version": "0.1.0-alpha.530",
4
4
  "main": "dist/heart/daemon/ouro-entry.js",
5
5
  "bin": {
6
6
  "cli": "dist/heart/daemon/ouro-bot-entry.js",