@ai-ecoverse/slicc-kernel 1.196.44 → 1.196.45

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.
@@ -4381,24 +4381,27 @@ var OpfsFs = class {
4381
4381
  hiddenBackups = /* @__PURE__ */ new Set();
4382
4382
  pendingSources = /* @__PURE__ */ new Map();
4383
4383
  retryAfter = /* @__PURE__ */ new Map();
4384
- async retrySource(intent, from) {
4384
+ async retrySource(intent, from, mayClean, deadline) {
4385
4385
  const now = performance.now();
4386
- const after = this.retryAfter.get(intent) ?? -Infinity;
4387
- if (after === Infinity) return;
4388
- const eligible = now >= after;
4386
+ if (now >= deadline) return false;
4387
+ const eligible = mayClean && now >= (this.retryAfter.get(intent) ?? -Infinity);
4388
+ let attempted = false;
4389
4389
  if (eligible) this.retryAfter.set(intent, Infinity);
4390
4390
  const controller = new AbortController();
4391
4391
  const { promise, resolve: resolve2 } = Promise.withResolvers();
4392
4392
  const timer = setTimeout(() => {
4393
4393
  controller.abort();
4394
4394
  resolve2();
4395
- }, SOURCE_RETRY_MS);
4395
+ }, deadline - now);
4396
4396
  const retry = async () => {
4397
4397
  const [entry] = await this.meta.under(intent);
4398
4398
  controller.signal.throwIfAborted();
4399
4399
  const id2 = entry?.rename?.sourceCleanup;
4400
4400
  if (id2 === void 0) this.syncSourceReservation(intent);
4401
- else if (eligible) await this.cleanSource(intent, from, id2, controller.signal);
4401
+ else if (eligible) {
4402
+ attempted = true;
4403
+ await this.cleanSource(intent, from, id2, controller.signal);
4404
+ }
4402
4405
  };
4403
4406
  const attempt = retry().catch(nothing).finally(() => {
4404
4407
  clearTimeout(timer);
@@ -4406,6 +4409,7 @@ var OpfsFs = class {
4406
4409
  this.retryAfter.set(intent, performance.now() + SOURCE_BACKOFF_MS);
4407
4410
  });
4408
4411
  await Promise.race([promise, attempt]);
4412
+ return attempted;
4409
4413
  }
4410
4414
  syncSourceReservation(intent, from) {
4411
4415
  const path = from ?? this.pendingSources.get(intent);
@@ -4418,13 +4422,14 @@ var OpfsFs = class {
4418
4422
  async reservedOp(name2, args) {
4419
4423
  const touched = name2 === "symlink" ? args.slice(1, 2) : args.slice(0, PAIRED.has(name2) ? 2 : 1);
4420
4424
  let attempted = false;
4425
+ let deadline;
4421
4426
  for (const [intent, source] of this.pendingSources) {
4422
4427
  if (!READS.includes(name2) && touched.some((p) => {
4423
4428
  const at = normalizePath(p);
4424
4429
  return within4(at, source) || REMOVALS.has(name2) && (at === "/" || within4(source, at));
4425
4430
  })) {
4426
- if (!attempted) await this.retrySource(intent, source);
4427
- attempted = true;
4431
+ deadline ??= performance.now() + SOURCE_RETRY_MS;
4432
+ if (await this.retrySource(intent, source, !attempted, deadline)) attempted = true;
4428
4433
  if (this.pendingSources.has(intent)) throw fsError("EBUSY", source);
4429
4434
  } else {
4430
4435
  const [entry] = await this.meta.under(intent);
@@ -10395,7 +10400,7 @@ function satisfies(version, range2) {
10395
10400
  }
10396
10401
 
10397
10402
  // src/version.ts
10398
- var KERNEL_VERSION = true ? "1.196.44" : "0.0.0-dev";
10403
+ var KERNEL_VERSION = true ? "1.196.45" : "0.0.0-dev";
10399
10404
  var OS_RELEASE = "6.0.0-slicc";
10400
10405
  function procVersion() {
10401
10406
  return `Linux version ${OS_RELEASE} (slicc-kernel ${KERNEL_VERSION}) #1 SMP PREEMPT_DYNAMIC