@ai-ecoverse/slicc-kernel 1.73.2 → 1.73.3

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/README.md CHANGED
@@ -650,7 +650,7 @@ The kernel writes `/etc/passwd` and `/etc/group` when it starts (see [Users](#us
650
650
  OPFS stores names, bytes, sizes and modification times, nothing else. Everything POSIX needs on top of that lives in an IndexedDB sidecar, so it survives reloads and new kernels:
651
651
 
652
652
  - mode bits (`chmod`);
653
- - access and change times, and a modification time set explicitly with `utime` (it holds until the file is written again); a directory's times move whenever an entry is created, removed or renamed in it, as POSIX asks;
653
+ - access and change times, and a modification time set explicitly with `utime` (it holds until the file is written again); a directory's times move whenever an entry is created, removed or renamed in it, as POSIX asks, and a time set explicitly after such a change keeps winning, also when the change was made in another kernel and its write lands later; an Emscripten program reads a directory's times again after any call that can wait on another process (a pipe or socket read, `wait`, `poll`, a sleep), so a program that waits for a child or a peer to fill a directory sees the new times (rsync's final directory times rely on it), while a walk without waits reads each directory once; `chown`/`fchown` leave the times alone (Emscripten stamps the setattr of a chown with the current time, which isn't taken as an mtime);
654
654
  - inode numbers that stay stable across renames;
655
655
  - symbolic links (`symlink`, `readlink`, `lstat`, and following them in paths), which exist only in the sidecar, with their own times: `touch -h`, `lutimes` and `utimensat` with `AT_SYMLINK_NOFOLLOW` set the link's, never the target's. A link's own mode can't be changed, as on Linux: `chmod -h`, `lchmod` and `fchmodat` with `AT_SYMLINK_NOFOLLOW` fail with `EOPNOTSUPP` (which `chmod -h` and `tar` ignore for links) and never follow it, and `open` with `O_PATH | O_NOFOLLOW` gives a descriptor for the link itself.
656
656
 
@@ -1071,13 +1071,10 @@ var OpfsFs = class {
1071
1071
  this.dirDirty.delete(path);
1072
1072
  const ms = this.dirTimes.get(path);
1073
1073
  if (ms === void 0) continue;
1074
- await this.meta.update(path, (entry) => ({
1075
- ...entry,
1074
+ await this.meta.update(
1076
1075
  path,
1077
- mtimeMs: ms,
1078
- mtimeFor: 0,
1079
- ctimeMs: ms
1080
- }));
1076
+ (entry) => (entry?.timesAt ?? -1) >= ms ? entry : { ...entry, path, mtimeMs: ms, mtimeFor: 0, ctimeMs: ms }
1077
+ );
1081
1078
  if (this.dirTimes.get(path) === ms) this.dirTimes.delete(path);
1082
1079
  }
1083
1080
  }
@@ -1531,7 +1528,8 @@ var OpfsFs = class {
1531
1528
  atimeMs: atime.getTime(),
1532
1529
  mtimeMs: mtime.getTime(),
1533
1530
  mtimeFor: file?.lastModified ?? 0,
1534
- ctimeMs
1531
+ ctimeMs,
1532
+ timesAt: ctimeMs
1535
1533
  }));
1536
1534
  }
1537
1535
  async reconcile() {
@@ -8785,6 +8783,36 @@ function revokeSyncFsToken(token) {
8785
8783
  }
8786
8784
 
8787
8785
  // src/realm/sync-fs-wire.ts
8786
+ var SYNC_FS_OPS = [
8787
+ "read",
8788
+ "write",
8789
+ "exists",
8790
+ "stat",
8791
+ "lstat",
8792
+ "readdir",
8793
+ "readdir-stat",
8794
+ "mkdir",
8795
+ "rm",
8796
+ "rename",
8797
+ "link",
8798
+ "unlink",
8799
+ "rmdir",
8800
+ "symlink",
8801
+ "readlink",
8802
+ "chmod",
8803
+ "utimes",
8804
+ "lutimes",
8805
+ "statfs",
8806
+ "hold",
8807
+ "create",
8808
+ "kept",
8809
+ "pread",
8810
+ "pwrite",
8811
+ "truncate",
8812
+ "chown",
8813
+ "lchown",
8814
+ "access"
8815
+ ];
8788
8816
  var HOLD_READ = 4;
8789
8817
  var HOLD_WRITE = 8;
8790
8818
  var HOLD_CREATED = 16;
@@ -9647,6 +9675,9 @@ var AsyncRangedFile = class {
9647
9675
  }
9648
9676
  };
9649
9677
 
9678
+ // src/realm/sync-sab-bridge.ts
9679
+ var PATH_OPS = new Set(SYNC_FS_OPS);
9680
+
9650
9681
  // src/realm/live-vfs-fs.ts
9651
9682
  var EARLY_WHOLE_FILE = 64 * 1024;
9652
9683