@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 +14 -12
- package/lib/index.js +561 -174
- package/lib/types/constants.d.ts +10 -1
- package/lib/types/events.d.ts +3 -1
- package/lib/types/evolution-events.d.ts +11 -0
- package/lib/types/io.d.ts +15 -0
- package/lib/types/memory-store.d.ts +4 -0
- package/lib/types/quality.d.ts +2 -2
- package/lib/types/skill-store.d.ts +80 -1
- package/lib/types/usage.d.ts +14 -1
- package/package.json +1 -1
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`
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
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`
|
|
51
|
-
|
|
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
|