instar 1.3.370 → 1.3.371

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.
@@ -1 +1 @@
1
- {"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../src/commands/server.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AA6SH,UAAU,YAAY;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;2DACuD;IACvD,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAuxDD,wBAAsB,WAAW,CAAC,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,CA8gTtE;AAED,wBAAsB,UAAU,CAAC,OAAO,EAAE;IAAE,GAAG,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAsDzE;AAED;;;;;;;;;;;GAWG;AACH,wBAAsB,aAAa,CAAC,OAAO,EAAE;IAAE,GAAG,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAuD5E"}
1
+ {"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../src/commands/server.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AA6SH,UAAU,YAAY;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;2DACuD;IACvD,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAuxDD,wBAAsB,WAAW,CAAC,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,CA4iTtE;AAED,wBAAsB,UAAU,CAAC,OAAO,EAAE;IAAE,GAAG,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAsDzE;AAED;;;;;;;;;;;GAWG;AACH,wBAAsB,aAAa,CAAC,OAAO,EAAE;IAAE,GAAG,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAuD5E"}
@@ -10122,6 +10122,27 @@ export async function startServer(options) {
10122
10122
  if (pin?.pinned && pin.preferredMachine === wsSelf) {
10123
10123
  return { owner: wsSelf, epoch: 0 };
10124
10124
  }
10125
+ // Issue #930 (live, v1.3.369): the pin store is ROUTER-local —
10126
+ // on the pinned-TO machine it is empty, so #926's fallback
10127
+ // never fires there. Second fallback: the newest
10128
+ // topic-placement JOURNAL entry (own + replica — the entry is
10129
+ // emitted at the router's CAS chokepoint, the strongest
10130
+ // placement evidence reachable here). Admitting a READ-ONLY,
10131
+ // jailed, hash-verified, never-clobber pull off it is not the
10132
+ // kill/spawn/move class the journal-actuation ban guards, and
10133
+ // nomination already runs on replica evidence by design; the
10134
+ // per-write stillCurrent recheck still aborts on a real claim.
10135
+ try {
10136
+ const placement = wsReader2
10137
+ .query({ kind: 'topic-placement', topic, limit: 1 })
10138
+ .entries[0];
10139
+ const pd = placement?.data;
10140
+ if (pd?.owner === wsSelf && typeof pd.epoch === 'number') {
10141
+ return { owner: wsSelf, epoch: pd.epoch };
10142
+ }
10143
+ }
10144
+ catch { /* @silent-fallback-ok: missing placement evidence simply means no fallback ownership — the reflex answers not-owner honestly (WORKING-SET-HANDOFF-SPEC §3.3) */
10145
+ }
10125
10146
  return { owner: null, epoch: null };
10126
10147
  };
10127
10148
  workingSetPullCoordinator = new wscMod.WorkingSetPullCoordinator({
@@ -10482,7 +10503,16 @@ export async function startServer(options) {
10482
10503
  if (res.ok && res.result && typeof res.result === 'object') {
10483
10504
  const cap = res.result;
10484
10505
  const journalAdvert = _unwrapPeerJournalAdvert(machineId, cap.journalAdvert);
10485
- return { selfReportedLastSeen: cap.selfReportedLastSeen, loadAvg: cap.loadAvg, journalAdvert };
10506
+ // #930 sibling (live, v1.3.369): the commitments advert was
10507
+ // parsed AWAY here — served by the peer, dropped by this
10508
+ // narrowing return — so driveCommitmentsSync never fired and
10509
+ // zero replicas ever landed. Pass it through.
10510
+ return {
10511
+ selfReportedLastSeen: cap.selfReportedLastSeen,
10512
+ loadAvg: cap.loadAvg,
10513
+ journalAdvert,
10514
+ ...(cap.commitmentsAdvert ? { commitmentsAdvert: cap.commitmentsAdvert } : {}),
10515
+ };
10486
10516
  }
10487
10517
  return null;
10488
10518
  },