Changeset 30d0e2c in Klonkt for src/services/guardianship/handshake.js
- Timestamp:
- 08/03/2026 06:38:16 AM (5 weeks ago)
- Branches:
- main
- Children:
- 3d882bd
- Parents:
- 69bd747
- File:
-
- 1 edited
-
src/services/guardianship/handshake.js (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
src/services/guardianship/handshake.js
r69bd747 r30d0e2c 545 545 } 546 546 547 /** 548 * §4.2 SHOULD: retry the dereference for handshakes left deferred because the 549 * candidate could not be read. 550 * 551 * Waiting for a further activity from a party is not enough: the commit is 552 * triggered by the LAST `Accept`, so if that one has already arrived nothing 553 * will ever poke it again and the handshake would sit until its window closed. 554 * The ward's dashboard polling its own offers queue is this instance's 555 * schedule, exactly as a read settles a lapse (§3.6.3). 556 * 557 * Deliberately not awaited by the read: a poll should render what is true now, 558 * not block on someone else's slow server. A retry that succeeds shows up in 559 * the next poll, which is the same second or two later. 560 */ 561 export async function retryDeferred(slug) { 562 for (const o of offers.listDeferred(slug)) { 563 await maybeCommit(slug, o.offer_id).catch(() => { /* next poll tries again */ }); 564 } 565 } 566 547 567 function notify(slug, ev) { 548 568 try { if (deps && typeof deps.onEvent === 'function') deps.onEvent(slug, ev); } catch { /* best-effort */ } 549 569 } 550 570 551 export default { wireHandshake, handleOutbox, handleInbox, parseRelationship, parseUndoRelationship, endGuardianship };571 export default { wireHandshake, handleOutbox, handleInbox, parseRelationship, parseUndoRelationship, endGuardianship, retryDeferred };
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)