@intentius/chant 0.72.3 → 0.72.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.
@@ -104,6 +104,22 @@ export interface ConvergeTickResult {
104
104
  gated: number;
105
105
  /** The one human-readable summary line this tick produced. */
106
106
  log: string;
107
+ /**
108
+ * Whether this tick's ledger record reached the remote (chant#2337).
109
+ *
110
+ * The append is local-first and always lands, so the tick's own result is
111
+ * correct either way — this says whether anyone else can see it. Before
112
+ * this, the push was `.catch(() => undefined)` and the tick reported success
113
+ * whether or not the record left the machine, which is the last instance of
114
+ * the idiom #2310 was filed about.
115
+ *
116
+ * Softer than the gate's version of the same bug (#2336): a lost tick record
117
+ * is an informational log rather than an approval, so nobody is stranded
118
+ * waiting on a fact they cannot see. It is still not success.
119
+ */
120
+ pushed: boolean;
121
+ /** Why the record did not reach the remote, when `pushed` is false. */
122
+ pushWarning?: string;
107
123
  }
108
124
 
109
125
  function shellQuote(s: string): string {
@@ -442,7 +458,19 @@ export async function convergeTick(args: ConvergeTickArgs, signal?: AbortSignal)
442
458
  },
443
459
  log,
444
460
  });
445
- await pushLifecycle().catch(() => undefined);
461
+ // chant#2337 — reported rather than swallowed, the way #2336 does it for the
462
+ // gate. A push that did not land leaves a correct local record nobody else
463
+ // can read, and the caller is the only one positioned to say so.
464
+ let pushed = false;
465
+ let pushWarning: string | undefined;
466
+ try {
467
+ pushed = await pushLifecycle();
468
+ if (!pushed) {
469
+ pushWarning = "no remote is configured for chant/lifecycle — the tick record was recorded locally only";
470
+ }
471
+ } catch (err) {
472
+ pushWarning = err instanceof Error ? err.message : String(err);
473
+ }
446
474
 
447
475
  return {
448
476
  id: record.id,
@@ -455,5 +483,7 @@ export async function convergeTick(args: ConvergeTickArgs, signal?: AbortSignal)
455
483
  unobserved: record.summary.unobserved,
456
484
  adopted: record.summary.adopted,
457
485
  log: record.log,
486
+ pushed,
487
+ ...(pushWarning !== undefined ? { pushWarning } : {}),
458
488
  };
459
489
  }