@rljson/fs-agent 0.0.56 → 0.0.57

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.
Files changed (2) hide show
  1. package/dist/fs-agent.js +29 -1
  2. package/package.json +1 -1
package/dist/fs-agent.js CHANGED
@@ -2030,7 +2030,35 @@ ${err.stack}` : String(err);
2030
2030
  );
2031
2031
  const ref = await FsAgent._withRetry(
2032
2032
  () => FsAgent._withTimeout(
2033
- dbAdapter.storeFsTree(tree, { ...options, previous }),
2033
+ // skipNotification, because THIS AGENT broadcasts the ref
2034
+ // itself a few lines below, with the ancestry attached.
2035
+ //
2036
+ // Letting the insert notify sends the ref twice, and the
2037
+ // first copy is the wrong one: the connector attaches
2038
+ // whatever predecessors it currently holds, and this push has
2039
+ // not set its own yet — so the ref goes out carrying the
2040
+ // PREVIOUS push's parent. `_sendRef` then sets the right
2041
+ // ancestry and sends again, and every receiver drops that
2042
+ // second copy as already-received.
2043
+ //
2044
+ // Measured on the lab, sender against receivers:
2045
+ //
2046
+ // sent 6guj63Ox parent yNAJN-wC | seen parent CtAgdd1w
2047
+ // sent UBl35ZQQ parent 6guj63Ox | seen parent yNAJN-wC
2048
+ //
2049
+ // Every push arriving one parent behind. Harmless while
2050
+ // nothing read the ancestry; now that a receiver prunes only
2051
+ // for a sender that names a state it is in, it means a
2052
+ // correctly-formed deletion is refused by everyone — which is
2053
+ // exactly what the large-folder recipe has been reporting.
2054
+ //
2055
+ // The doubled `[sync:out]` line in every log was this, in
2056
+ // plain sight, for the whole investigation.
2057
+ dbAdapter.storeFsTree(tree, {
2058
+ ...options,
2059
+ previous,
2060
+ skipNotification: true
2061
+ }),
2034
2062
  this._timeouts.fetchTree,
2035
2063
  `syncToDb → storeFsTree(${treeKey})`
2036
2064
  ),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rljson/fs-agent",
3
- "version": "0.0.56",
3
+ "version": "0.0.57",
4
4
  "description": "Rljson fs-agent description",
5
5
  "homepage": "https://github.com/rljson/fs-agent",
6
6
  "bugs": "https://github.com/rljson/fs-agent/issues",