@lmzhen/dsh-evolution-core 0.3.62 → 0.3.64

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
@@ -29,16 +29,17 @@ Single-file writes (`update`, `patch`, `writeSupportFile`)
29
29
  additionally run the read and the write inside `transactIo` when a caller
30
30
  injects a `transact` into the constructor — that is the cross-process lock, so
31
31
  two processes sharing `DSH_HOME` cannot interleave their RMW on one file.
32
- `create` writes a new file and `archive`/`consolidate` already own a two-phase
33
- commit, so they deliberately stay outside the serial chain.
34
-
35
- **0.3.46 residual (documented, per G2.5 precedent):** the low-frequency
36
- single-file entry points `create`, `archive`, `removeSupportFile` and
37
- `setPinned` still perform an unlocked read→write (their per-file read is not
38
- inside the serial/transact task). The race needs a same-process concurrent
39
- mutator on the SAME skill file, which the serialized entry points above make
40
- unlikely; the exposure is acknowledged and not locked (收益不抵锁面扩大 —
41
- adding locks to four low-frequency entry points is not worth the surface).
32
+ `create` is INSIDE the serial chain and, when a transact backend is bound, its
33
+ exists check runs inside the same per-file transact (v18); `archive`/`consolidate`
34
+ are rename-based two-phase paths and stay outside the single-file serial chain.
35
+
36
+ **v18 residual (updated):** `create`, `removeSupportFile` and `setPinned` now
37
+ run on the serial chain (`removeSupportFile`'s delete also goes through the
38
+ per-file transact), so the remaining single-file residual is the protection
39
+ TOCTOU (a marker check outside the transact) and the multi-file two-phase
40
+ paths `archive`/`consolidate`/`restructure`. The race needs a concurrent
41
+ mutator on the SAME skill file/package; the exposure is acknowledged and the
42
+ protection check is the next candidate (see the v18 optimization plan, E-5).
42
43
 
43
44
  When the backend provides `transact` (nodeEvolutionIo and the io adapter do),
44
45
  the constructor binds it BY DEFAULT since 0.3.27 — the single-file entry points
@@ -47,8 +48,9 @@ the constructor binds it BY DEFAULT since 0.3.27 — the single-file entry point
47
48
  instantiation, so same-file concurrent writes from different processes no
48
49
  longer resolve to last-writer-wins there. An explicit `transact` argument
49
50
  overrides the default binding. The two-phase paths deliberately stay outside
50
- that lock: `create` (exists probe + write) can still double-pass the probe
51
- across processes, `archive`/`consolidate` are rename-based with best-effort
51
+ that lock: `create`'s exists probe runs inside the transact when a transact
52
+ backend is bound (v18), so only a transact-less custom backend can still
53
+ double-pass the probe across processes; `archive`/`consolidate` are rename-based with best-effort
52
54
  rollback (an archive loser's rollback surfaces the raw failure when the source
53
55
  vanished), and `restructure`'s multi-file swap can expose an interleaved tree
54
56
  to a concurrent reader. These residual windows are documented rather than