@rljson/fs-agent 0.1.0 → 0.2.1
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.api.md +374 -187
- package/README.architecture.md +422 -1372
- package/README.md +8 -7
- package/README.public.md +160 -149
- package/README.tests.md +175 -127
- package/dist/README.api.md +374 -187
- package/dist/README.architecture.md +422 -1372
- package/dist/README.md +8 -7
- package/dist/README.public.md +160 -149
- package/dist/README.tests.md +175 -127
- package/dist/fs-agent.d.ts +436 -1199
- package/dist/fs-agent.js +4952 -6578
- package/dist/fs-atomic-write.d.ts +11 -0
- package/dist/fs-edit-chain.d.ts +53 -267
- package/dist/fs-history.d.ts +83 -0
- package/dist/fs-merge.d.ts +109 -0
- package/dist/fs-receive.d.ts +83 -0
- package/dist/fs-scanner.d.ts +70 -23
- package/dist/fs-send.d.ts +53 -0
- package/dist/fs-signals.d.ts +212 -0
- package/dist/fs-stamps.d.ts +102 -0
- package/dist/fs_agent_version.d.ts +2 -0
- package/dist/index.d.ts +7 -7
- package/package.json +31 -45
- package/dist/fs-anti-entropy.d.ts +0 -404
- package/dist/fs-bucket-sync.d.ts +0 -172
- package/dist/fs-conflict-resolver.d.ts +0 -385
- package/dist/fs-manifest.d.ts +0 -159
package/dist/README.tests.md
CHANGED
|
@@ -8,22 +8,22 @@ found in the LICENSE file in the root of this package.
|
|
|
8
8
|
|
|
9
9
|
# The test suite, as a document
|
|
10
10
|
|
|
11
|
-
**
|
|
12
|
-
lines.**
|
|
11
|
+
**67 files, 771 scenarios, 100 % coverage on statements, branches, functions and
|
|
12
|
+
lines.** 770 must pass; one is committed inverted, and §2.11 says which and why.
|
|
13
13
|
One command runs all of it:
|
|
14
14
|
|
|
15
15
|
```bash
|
|
16
16
|
pnpm test # vitest --coverage --no-file-parallelism, then eslint
|
|
17
17
|
```
|
|
18
18
|
|
|
19
|
-
`--no-file-parallelism` is not a preference. **Thirty-
|
|
19
|
+
`--no-file-parallelism` is not a preference. **Thirty-four of these files**
|
|
20
20
|
drive a real `Server`, a real socket pair or the mesh harness — with real
|
|
21
21
|
watchers and real timers; run in parallel they fight over the cores and invent
|
|
22
22
|
failures. Four different tests once failed
|
|
23
23
|
across four CI runs of the same commit, each passing on re-run — not four bugs,
|
|
24
24
|
one scheduler.
|
|
25
25
|
|
|
26
|
-
This document says what the suite actually proves, because the number
|
|
26
|
+
This document says what the suite actually proves, because the number 771 does
|
|
27
27
|
not. It is organised by the question answered rather than by file; the file
|
|
28
28
|
index is at the end.
|
|
29
29
|
|
|
@@ -33,9 +33,9 @@ index is at the end.
|
|
|
33
33
|
|
|
34
34
|
| tier | what it is | files |
|
|
35
35
|
| --- | --- | --- |
|
|
36
|
-
| **mesh** | a real `Server`, real sockets (`createSocketPair`), real watchers, real files on disk, two to four nodes, with cuts, heals, mutes, deafenings and stopped processes |
|
|
36
|
+
| **mesh** | a real `Server`, real sockets (`createSocketPair`), real watchers, real files on disk, two to four nodes, with cuts, heals, mutes, deafenings and stopped processes | 12 |
|
|
37
37
|
| **client–server** | two or three clients and a real hub, each suite run **twice** — once over `SocketMock`, once over a real socket.io server configured at production's 50 MB limit | 6 |
|
|
38
|
-
| **unit / decision** | one agent, or a pure function with no filesystem and no clock |
|
|
38
|
+
| **unit / decision** | one agent, or a pure function with no filesystem and no clock | 55 |
|
|
39
39
|
|
|
40
40
|
A decision-tier test proves a RULE. It does not prove the rule is ever
|
|
41
41
|
reached, and the difference has cost this package real defects: every decision
|
|
@@ -73,58 +73,51 @@ measured in the field rather than an invented case.
|
|
|
73
73
|
|
|
74
74
|
### 2.2 That a deletion travels — the hardest thing here
|
|
75
75
|
|
|
76
|
-
Deletion is where this package has lost data, and it carries the most tests
|
|
77
|
-
|
|
76
|
+
Deletion is where this package has lost data, and it carries the most tests per
|
|
77
|
+
line of code anywhere in it.
|
|
78
78
|
|
|
79
79
|
The architecture is the claim: **an absence is not a deletion.** A tree lacks a
|
|
80
|
-
path because
|
|
81
|
-
content hash cannot tell the two apart. Every attempt to infer it failed
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
across four machines, and a file deleted from 3 642 that was back moments
|
|
86
|
-
later. So a removal is **stated** in the edit chain by the node that performed
|
|
87
|
-
it, and that statement is the only authority.
|
|
80
|
+
path because its author removed it or because its author never had it, and a
|
|
81
|
+
content hash cannot tell the two apart. Every attempt to infer it failed. So a
|
|
82
|
+
deletion is applied for one reason only — the head that lacks the file
|
|
83
|
+
**descends from this node's own** — and an absence anywhere else reaches the
|
|
84
|
+
folder only through a three-way merge against the common ancestor.
|
|
88
85
|
|
|
89
86
|
What holds it up:
|
|
90
87
|
|
|
91
|
-
- `fs-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
- `fs-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
its files), F7 (100 deletions out of 400 complete everywhere), I7 (a peer's
|
|
108
|
-
deletion does not remove a file re-created since), and J9 (a deletion made
|
|
109
|
-
while the agent was **down** still propagates).
|
|
88
|
+
- `fs-relate.spec.ts` — how two heads stand, including that a descent found is
|
|
89
|
+
proof even where another part of the history cannot be read, and that a walk
|
|
90
|
+
out of budget answers `fork`, never `behind`.
|
|
91
|
+
- `fs-send.spec.ts` and `fs-agent-mass-delete-guard.spec.ts` — the guards: a
|
|
92
|
+
sender does not author a mass disappearance its watcher did not see, and a
|
|
93
|
+
receiver keeps what an apply would lose.
|
|
94
|
+
- `fs-collect-removals.spec.ts` — the net delta a join uses to tell a stale
|
|
95
|
+
copy from new work, netting re-adds against removals in order.
|
|
96
|
+
- At mesh tier: T2 (a delete survives a merge with a peer that still holds the
|
|
97
|
+
file), T4 (a delete made while cut off is not resurrected on rejoin), F1
|
|
98
|
+
(removing a **directory** propagates), F7 (100 deletions out of 400 complete
|
|
99
|
+
everywhere), **F11** (deletions from alternating nodes, one with a clock 20 s
|
|
100
|
+
fast, all arrive and none returns), I7 (a peer's deletion does not remove a
|
|
101
|
+
file re-created since), J9 (a deletion made while the agent was **down**
|
|
102
|
+
propagates), and the wiped-and-reverted file (a machine that lost its folder
|
|
103
|
+
does not empty the fleet, and is refilled).
|
|
110
104
|
|
|
111
105
|
### 2.3 That two people editing one file lose nothing
|
|
112
106
|
|
|
113
|
-
`fs-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
107
|
+
`fs-merge.spec.ts` carries the conflict table on maps; `fs-conflict-rules.spec.ts`
|
|
108
|
+
carries it on disks — one test per row, C1–C6, on two real nodes and a stamping
|
|
109
|
+
hub, each forcing its order instead of racing for it, plus *C3 with no stamp*:
|
|
110
|
+
nothing is decided, nothing is lost, the wait is told, and two nodes do not
|
|
111
|
+
answer each other's announcements in a loop.
|
|
118
112
|
|
|
119
|
-
The
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
113
|
+
The guarantee: both versions survive, the one that reached the fleet later keeps
|
|
114
|
+
the name — by the hub's stamp, never a clock — every node reaches the same
|
|
115
|
+
verdict, and the conflict is reported. `fs-stamps.spec.ts` holds how a version's
|
|
116
|
+
stamp is derived, including a walk that stops at a row it cannot read yet.
|
|
123
117
|
|
|
124
118
|
At mesh tier: F5 (four nodes editing one file end on one version), F10 (two
|
|
125
119
|
nodes keep both versions **and say so**), T3 (both changes kept from a shared
|
|
126
|
-
ancestor), and `simultaneous-edit.spec.ts` (
|
|
127
|
-
contesting one file).
|
|
120
|
+
ancestor), and `simultaneous-edit.spec.ts` (three nodes contesting one file).
|
|
128
121
|
|
|
129
122
|
### 2.4 That a document never goes backwards
|
|
130
123
|
|
|
@@ -134,8 +127,13 @@ converged deletion does not come back*, *every node ends on the last save*,
|
|
|
134
127
|
*every announcement carries a chain head*, and — under random churn and
|
|
135
128
|
partitions across three seeds — *a disagreement is never silent*.
|
|
136
129
|
|
|
137
|
-
These are the expensive ones, and they are the tests that caught
|
|
138
|
-
example-based test could
|
|
130
|
+
These are the expensive ones, and they are the tests that caught defects no
|
|
131
|
+
example-based test could. One was the scanner's: Node rounds an mtime to the
|
|
132
|
+
nearest millisecond, so a file the agent applied in the second half of the
|
|
133
|
+
millisecond the next scan started in read as one still being written, and the
|
|
134
|
+
receiver announced the version before it. `fs-scanner.spec.ts` now pins it — a
|
|
135
|
+
rewrite the agent noted reads as written, an un-noted one as the version before.
|
|
136
|
+
Another: a receiver catching up recorded itself as the author of
|
|
139
137
|
a file it had never edited, 28 seconds after the real edit, and the whole fleet
|
|
140
138
|
settled one version behind the last save about one run in three.
|
|
141
139
|
|
|
@@ -149,7 +147,7 @@ loss. The third had never been gated at all, because the test read the fleet's
|
|
|
149
147
|
convergence verdict and used only its snapshot.
|
|
150
148
|
|
|
151
149
|
All three are now asserted: the same files, the same bytes, and — if that ever
|
|
152
|
-
fails — that some node's `diverged`
|
|
150
|
+
fails — that some node's `diverged` said so. The silence
|
|
153
151
|
check is kept beside the equality check rather than instead of it, because a
|
|
154
152
|
disagreement nobody noticed is a different defect from one every node is
|
|
155
153
|
announcing, and a failure should say which. The seed fixes the write sequence
|
|
@@ -177,56 +175,112 @@ is renamed aside into `.fsagent-recovered/`, which the scanner ignores.
|
|
|
177
175
|
|
|
178
176
|
### 2.6 That a lost message heals itself
|
|
179
177
|
|
|
180
|
-
`heals-after-forced-divergence.spec.ts` (
|
|
178
|
+
`heals-after-forced-divergence.spec.ts` (scenarios × 2 hub signals) drops
|
|
181
179
|
messages on purpose: a new file whose push the hub never received, a deletion
|
|
182
180
|
whose push it never received, a deletion a peer never received, a peer deletion
|
|
183
181
|
that must **not** be undone, every node healing when the hub received nothing
|
|
184
|
-
at all, and a node that misses every forward while another keeps writing.
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
`
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
the
|
|
182
|
+
at all, and a node that misses every forward while another keeps writing.
|
|
183
|
+
|
|
184
|
+
There is no separate repair mechanism to test: the hub says its head again on
|
|
185
|
+
the beacon or the bootstrap, and `receive` is the repair. `fs-receive.spec.ts`
|
|
186
|
+
holds that decision — one case per relation — and
|
|
187
|
+
`fs-agent-anti-entropy.spec.ts` the wiring: what the agent hears, what it
|
|
188
|
+
reports, that a head nobody can read is said once per pair, and that a stopped
|
|
189
|
+
receive side stops reporting.
|
|
190
|
+
|
|
191
|
+
### 2.6b That a host application is told what happened
|
|
192
|
+
|
|
193
|
+
`fs-signals.spec.ts` (41) tests the sink with no filesystem at all, which is
|
|
194
|
+
what lets it assert the awkward parts directly: the cap dropping the oldest, the
|
|
195
|
+
per-kind counters surviving that drop, a listener that throws not costing the
|
|
196
|
+
next one its notification, and a persisted log coming back from a shape nobody
|
|
197
|
+
validated on the way out.
|
|
198
|
+
|
|
199
|
+
That last part is most of the file, deliberately. A signal log is read from a
|
|
200
|
+
folder that users, backup tools and other builds of this agent all write into,
|
|
201
|
+
so it will be truncated, half-written and occasionally produced by a newer
|
|
202
|
+
version. Every branch of that tolerance has a case: not an object, `null`, a
|
|
203
|
+
`signals` that is not an array, an entry missing each required field in turn, a
|
|
204
|
+
total that is not a finite number, and a good entry either side of a bad one.
|
|
205
|
+
Two of those encode decisions rather than defences — an unknown `kind` is
|
|
206
|
+
**kept**, because it is still a true record of something that happened, and
|
|
207
|
+
restoring does **not** fire subscribers, because replaying history through the
|
|
208
|
+
callback would make every restart look like a fresh folder-wide conflict.
|
|
209
|
+
|
|
210
|
+
`fs-agent-signals.spec.ts` (19) is the other half: one case per place in the
|
|
211
|
+
agent that does something to a user's folder, asserting the **fields** rather
|
|
212
|
+
than that something was emitted. A signal with the right kind and the wrong
|
|
213
|
+
`action` is worse than no signal, because it gets filtered into silence.
|
|
214
|
+
|
|
215
|
+
The sink also derives each signal's `id`, and the same ids again from a log
|
|
216
|
+
written before ids existed; two signals saying the same thing in one
|
|
217
|
+
millisecond stay two. A join's `copies` keep only the paths the signal names.
|
|
218
|
+
|
|
219
|
+
The mass-delete guard tests and the mesh harness's `mesh.conflicts` collector
|
|
220
|
+
read the signal channel too: there is no other surface left to assert.
|
|
221
|
+
|
|
222
|
+
### 2.6c That a host can show the history, and go back
|
|
223
|
+
|
|
224
|
+
`fs-history.spec.ts` (22) walks chains written by hand, because the orders that
|
|
225
|
+
matter are the ones a running fleet produces rarely: both sides of a fork that
|
|
226
|
+
reached the fleet in one announcement, a stamp that disagrees with the graph, a
|
|
227
|
+
merge below a merge. Each states the whole order it expects, and one rule
|
|
228
|
+
outranks every key: an entry is never listed above one made on top of it.
|
|
229
|
+
Pages are asserted to continue exactly where the last stopped, across a fork
|
|
230
|
+
too, and the read-only reader is asserted to leave the store byte for byte as
|
|
231
|
+
it found it.
|
|
232
|
+
|
|
233
|
+
`fs-agent-history.spec.ts` (12) is the same on a running mesh. A pull and a
|
|
234
|
+
merge are in the history, in one order on both nodes. And `restoreRevision`
|
|
235
|
+
makes a folder exactly a revision, as an edit the other node follows. Its
|
|
236
|
+
guards each have a case:
|
|
237
|
+
|
|
238
|
+
- a file saved a moment before is recorded first rather than pruned. This is
|
|
239
|
+
the case that found the settle rule hiding a brand-new file from the restore;
|
|
240
|
+
- a file still being written makes the restore `busy`, not lossy;
|
|
241
|
+
- the agent's own log and the set-aside copies survive the prune;
|
|
242
|
+
- a revision that would empty the folder is refused before anything is
|
|
243
|
+
written.
|
|
196
244
|
|
|
197
245
|
### 2.7 That a node claims only what it changed
|
|
198
246
|
|
|
199
247
|
The standing design rule: one identical chain on every client, an edit exists
|
|
200
|
-
only where the change was made, a receiver adopts and never authors
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
`fs-agent-
|
|
208
|
-
`fs-
|
|
209
|
-
`fs-chain-crosses-the-wire.spec.ts`
|
|
248
|
+
only where the change was made, a receiver adopts and never authors.
|
|
249
|
+
|
|
250
|
+
`fs-agent-authorship.spec.ts` (a received file, a stated deletion, a real edit
|
|
251
|
+
after both, and an absence only a lagging scan reports), `fs-agent-no-laundering.spec.ts` (a node does not re-advertise
|
|
252
|
+
what it adopted; a partial apply stays quiet; authoring never reads a pass that
|
|
253
|
+
began before its own write — the F9 revert, pinned deterministically — and
|
|
254
|
+
reads the watcher's last pass otherwise, so a stalled copy is not looked at
|
|
255
|
+
again), `fs-agent-own-echo.spec.ts`,
|
|
256
|
+
`fs-agent-self-parent.spec.ts` and `fs-agent-stale-reconnect.spec.ts` hold the
|
|
257
|
+
edges, with `fs-edit-chain.spec.ts` and `fs-chain-crosses-the-wire.spec.ts`
|
|
258
|
+
under them.
|
|
259
|
+
|
|
260
|
+
The receiving half: an apply writes over nothing it has not read.
|
|
261
|
+
`fs-agent-receive-degradation.spec.ts` lands a save between a receive's scan and
|
|
262
|
+
its apply — once under an apply, once under a merge. The apply stops, the save
|
|
263
|
+
becomes this node's work, and the head is merged; a scan that cannot catch up
|
|
264
|
+
stops receiving again after `RECEIVE_AGAIN_MAX` tries, and the next time the
|
|
265
|
+
head is said tries again.
|
|
210
266
|
|
|
211
267
|
Also here: `fs-ref-vs-content.spec.ts` — identical content written at different
|
|
212
|
-
times gives **one** ref. mtime is deliberately not part of
|
|
213
|
-
|
|
214
|
-
does not, and while it was in the identity the same bytes gave a different ref
|
|
215
|
-
per machine and a node's deletions were refused by everybody.
|
|
268
|
+
times gives **one** ref and one content map. mtime is deliberately not part of
|
|
269
|
+
content identity: while it was, the same bytes gave a different ref per machine.
|
|
216
270
|
|
|
217
271
|
### 2.8 That a hostile or broken filesystem breaks only itself
|
|
218
272
|
|
|
219
273
|
| suite | what it survives |
|
|
220
274
|
| --- | --- |
|
|
221
|
-
| `fs-agent-locked-file.spec.ts` (
|
|
275
|
+
| `fs-agent-locked-file.spec.ts` (8) | a file another process holds open — the rest of the restore lands, every locked file is named, a non-lock write failure still aborts, and the half-applied state is **not** advertised to peers |
|
|
222
276
|
| `fs-impossible-filename.spec.ts` (4) | a path the filesystem refuses — a 300-character path, `CON.txt`. Each blocks only itself |
|
|
223
277
|
| `fs-filenames.spec.ts` (5) | a German filename round-tripping byte for byte, two Unicode spellings of one name not destroying each other, a case-only rename |
|
|
224
|
-
| `fs-hostile-tree.spec.ts` (
|
|
278
|
+
| `fs-hostile-tree.spec.ts` (7) | a tree from a peer is not trusted with paths — no escaping the sync root |
|
|
225
279
|
| `fs-filetype-changes.spec.ts` (6) | a path that changes what it IS: file → directory, directory → file, symlinks |
|
|
226
280
|
| `fs-scanner-vanish.spec.ts` (12) | an entry deleted between `readdir` and `stat` |
|
|
227
281
|
| `fs-disk-full.spec.ts` (3) | ENOSPC — a clean abort with a message, not a silent standstill |
|
|
228
282
|
| `fs-slow-copy.spec.ts` (3) | a file still being written: never hashed half-done, and one unsettled file does not stop the folder |
|
|
229
|
-
| `fs-clock-skew.spec.ts` (
|
|
283
|
+
| `fs-clock-skew.spec.ts` (6) | a machine whose clock is wrong — a file is visible whatever its timestamp says |
|
|
230
284
|
| `fs-agent-blob-stream.spec.ts` (3) | a file larger than one socket message, and a transfer that breaks off mid-file |
|
|
231
285
|
|
|
232
286
|
### 2.9 That coming back does not cost what you missed
|
|
@@ -248,9 +302,6 @@ about the test changes.
|
|
|
248
302
|
|
|
249
303
|
### 2.10 That the wire format is what it claims to be
|
|
250
304
|
|
|
251
|
-
`fs-bucket-sync.spec.ts` (29) pins the format itself — message bodies are JSON
|
|
252
|
-
because a POSIX filename may contain any byte but `/` and NUL.
|
|
253
|
-
|
|
254
305
|
There is no mixed-version test, because there is only one format — every node
|
|
255
306
|
announces a chain head, and the fleet is upgraded together.
|
|
256
307
|
|
|
@@ -355,21 +406,22 @@ Open items are in
|
|
|
355
406
|
## 5. File index
|
|
356
407
|
|
|
357
408
|
Counts are what `pnpm test` reports per file, so suites that generate cases in a
|
|
358
|
-
loop are counted as they run. They sum to the
|
|
409
|
+
loop are counted as they run. They sum to the 771 above.
|
|
359
410
|
|
|
360
411
|
### Mesh tier
|
|
361
412
|
|
|
362
413
|
| file | n | what it covers |
|
|
363
414
|
| --- | --- | --- |
|
|
364
415
|
| `mesh/fs-mesh.spec.ts` | 6 | T1–T7, the scenarios the sync has to survive |
|
|
365
|
-
| `mesh/fs-mesh-field-defects.spec.ts` |
|
|
366
|
-
| `mesh/fs-mesh-matrix.spec.ts` | 9 | the scenario matrix at mesh tier (L7, L8, I7, I10, J4+J5, J9 ×2) |
|
|
416
|
+
| `mesh/fs-mesh-field-defects.spec.ts` | 11 | F1–F11, field defects reduced in process |
|
|
417
|
+
| `mesh/fs-mesh-matrix.spec.ts` | 9 | the scenario matrix at mesh tier (L7, L8, I7, I7b, I10, J4+J5, J6, J9 ×2) |
|
|
367
418
|
| `mesh/fs-mesh-invariants.spec.ts` | 7 | invariants over the route, not the destination |
|
|
368
419
|
| `mesh/fs-mesh-wiped-and-reverted.spec.ts` | 6 | a node comes back empty, or holding an older copy |
|
|
369
|
-
| `mesh/fs-mesh-additive.spec.ts` | 3 | additive reconciliation (A1–A3) |
|
|
370
420
|
| `mesh/fs-mesh-catchup-cost.spec.ts` | 2 | coming back does not cost what you missed |
|
|
421
|
+
| `fs-conflict-rules.spec.ts` | 8 | the conflict table C1–C6 on disks, and C3 before a stamp is known |
|
|
422
|
+
| `fs-agent-history.spec.ts` | 12 | the history a host shows — a pull, a merge, one order — and going back to a revision exactly |
|
|
371
423
|
| `fs-editor-patterns.spec.ts` | 6 | how real programs save |
|
|
372
|
-
| `fs-chain-crosses-the-wire.spec.ts` |
|
|
424
|
+
| `fs-chain-crosses-the-wire.spec.ts` | 3 | the chain crosses the wire |
|
|
373
425
|
| `field-repro.spec.ts` | 3 | reported failures, reproduced verbatim |
|
|
374
426
|
|
|
375
427
|
### Client–server tier
|
|
@@ -379,7 +431,7 @@ loop are counted as they run. They sum to the 923 above.
|
|
|
379
431
|
| `client-server/socket-mock.spec.ts` | 35 | the shared suite (`shared-sync-tests.ts`) over `SocketMock` |
|
|
380
432
|
| `client-server/socket-io.spec.ts` | 35 | the same shared suite over a real socket.io server at production's 50 MB limit |
|
|
381
433
|
| `client-server/advanced-sync.spec.ts` | 15 | three clients, catch-up, teardown and restart, 10 MB, 100 files, rapid overwrites |
|
|
382
|
-
| `client-server/heals-after-forced-divergence.spec.ts` |
|
|
434
|
+
| `client-server/heals-after-forced-divergence.spec.ts` | 14 | deliberately dropped messages |
|
|
383
435
|
| `client-server/conflict-sync.spec.ts` | 2 | a real offline divergent edit, both versions preserved |
|
|
384
436
|
| `client-server/simultaneous-edit.spec.ts` | 4 | five rounds of three nodes contesting one file |
|
|
385
437
|
|
|
@@ -387,57 +439,53 @@ loop are counted as they run. They sum to the 923 above.
|
|
|
387
439
|
|
|
388
440
|
| file | n | what it covers |
|
|
389
441
|
| --- | --- | --- |
|
|
390
|
-
| `fs-agent.spec.ts` |
|
|
391
|
-
| `fs-scanner.spec.ts` |
|
|
392
|
-
| `fs-
|
|
393
|
-
| `fs-
|
|
394
|
-
| `fs-
|
|
395
|
-
| `fs-
|
|
396
|
-
| `fs-
|
|
397
|
-
| `fs-
|
|
398
|
-
| `fs-
|
|
399
|
-
| `fs-
|
|
400
|
-
| `fs-edit-chain.spec.ts` |
|
|
401
|
-
| `fs-plan-removals.spec.ts` | 23 | which removals may be applied |
|
|
402
|
-
| `fs-agent-mass-delete-guard.spec.ts` | 16 | refusing a deletion that looks like a loss, and reporting it |
|
|
403
|
-
| `fs-agent-concurrent-write.spec.ts` | 9 | two writes of one path must not blend — 200 rounds per assertion |
|
|
404
|
-
| `fs-agent-stale-reconnect.spec.ts` | 17 | a peer reconnecting with a stale tree |
|
|
405
|
-
| `fs-scanner-vanish.spec.ts` | 12 | an entry that vanishes mid-scan |
|
|
406
|
-
| `fs-classify.spec.ts` | 11 | behind / ahead / fork / incomplete |
|
|
407
|
-
| `fs-anti-entropy-level1.spec.ts` | 12 | the same decision, **enumerated** |
|
|
408
|
-
| `fs-agent-tombstone-log.spec.ts` | 14 | what a restart remembers it deleted |
|
|
442
|
+
| `fs-agent.spec.ts` | 81 | the agent's surface |
|
|
443
|
+
| `fs-scanner.spec.ts` | 62 | scanning, watching, the scan cache, the agent's own writes |
|
|
444
|
+
| `fs-agent-degradation.spec.ts` | 15 | what the agent does when a dependency fails, and the shapes no scenario reaches |
|
|
445
|
+
| `fs-agent-receive-degradation.spec.ts` | 16 | receiving when a part of it fails — a tree it cannot read, a stamp or state it cannot file, a folder that moves under the apply, a join |
|
|
446
|
+
| `fs-receive.spec.ts` | 11 | what a node does with a head that arrived |
|
|
447
|
+
| `fs-relate.spec.ts` | 11 | same / behind / ahead / fork / incomplete |
|
|
448
|
+
| `fs-merge.spec.ts` | 22 | `merge3` — the conflict table by example — and copy naming |
|
|
449
|
+
| `fs-stamps.spec.ts` | 11 | where each version reached the fleet, derived from payloads |
|
|
450
|
+
| `fs-send.spec.ts` | 9 | the sender answers for its edits (`planAuthoring`) |
|
|
451
|
+
| `fs-collect-removals.spec.ts` | 26 | the removal walk, and `lastEditOf` |
|
|
452
|
+
| `fs-edit-chain.spec.ts` | 16 | the chain |
|
|
409
453
|
| `fs-plan-join.spec.ts` | 9 | joining, decided before anything is written |
|
|
454
|
+
| `fs-agent-mass-delete-guard.spec.ts` | 14 | refusing a deletion that looks like a loss — before anything is written — and reporting it; a prune never touches what the scanner ignores |
|
|
455
|
+
| `fs-agent-anti-entropy.spec.ts` | 7 | receiving what the hub says |
|
|
456
|
+
| `fs-agent-stale-reconnect.spec.ts` | 14 | a peer reconnecting with a stale tree |
|
|
457
|
+
| `fs-agent-no-laundering.spec.ts` | 8 | a node does not re-advertise what it adopted |
|
|
458
|
+
| `fs-agent-authorship.spec.ts` | 4 | a node claims only what it changed |
|
|
459
|
+
| `fs-divergence-is-content.spec.ts` | 2 | a divergence is a difference in CONTENT |
|
|
460
|
+
| `fs-ref-vs-content.spec.ts` | 6 | ref identity vs content identity |
|
|
461
|
+
| `fs-agent-concurrent-write.spec.ts` | 12 | two writes of one path must not blend — 200 rounds per assertion — and the synchronous writer the bookkeeping uses |
|
|
410
462
|
| `fs-agent-incremental-restore.spec.ts` | 8 | a restore writes only what changed |
|
|
411
463
|
| `fs-agent-locked-file.spec.ts` | 8 | a file held open by another process |
|
|
412
|
-
| `fs-agent-
|
|
413
|
-
| `fs-agent-
|
|
414
|
-
| `fs-
|
|
415
|
-
| `fs-
|
|
416
|
-
| `fs-
|
|
464
|
+
| `fs-agent-blob-stream.spec.ts` | 3 | a restore streams the blob |
|
|
465
|
+
| `fs-agent-signals.spec.ts` | 19 | one case per thing the agent signals, asserting the fields |
|
|
466
|
+
| `fs-signals.spec.ts` | 41 | the signal sink: the cap, the counters, ids, and a log read from a hostile folder |
|
|
467
|
+
| `fs-history.spec.ts` | 22 | the history walk: its order on hand-written chains, pages, cursors, and the read-only reader |
|
|
468
|
+
| `fs-ignore.spec.ts` | 28 | glob ignore patterns, and every legacy prefix |
|
|
469
|
+
| `fs-blob-adapter.spec.ts` | 26 | file ↔ blob |
|
|
417
470
|
| `fs-db-adapter.spec.ts` | 6 | storing a tree with its predecessors |
|
|
418
|
-
| `fs-agent-conflict-log.spec.ts` | 5 | recording a resolved conflict |
|
|
419
|
-
| `fs-conflict-integration.spec.ts` | 6 | conflict resolution end to end |
|
|
420
|
-
| `fs-filenames.spec.ts` | 5 | unicode and case |
|
|
421
|
-
| `fs-level2-surfaces.spec.ts` | 5 | the model must be able to EXPRESS it |
|
|
422
471
|
| `blob-io.spec.ts` | 5 | storing a file as a blob |
|
|
423
|
-
| `fs-
|
|
424
|
-
| `fs-
|
|
472
|
+
| `fs-scanner-vanish.spec.ts` | 12 | an entry that vanishes mid-scan |
|
|
473
|
+
| `fs-scanner-scan-coalescing.spec.ts` | 4 | a burst collapses into at most two passes |
|
|
425
474
|
| `fs-hostile-tree.spec.ts` | 7 | a peer's tree is not trusted with paths |
|
|
426
475
|
| `fs-impossible-filename.spec.ts` | 4 | a path the filesystem refuses |
|
|
427
|
-
| `fs-
|
|
428
|
-
| `fs-
|
|
429
|
-
| `fs-stage-timings.spec.ts` | 4 | per-stage timings |
|
|
430
|
-
| `fs-agent-authorship.spec.ts` | 3 | a node claims only what it changed |
|
|
431
|
-
| `fs-agent-blob-stream.spec.ts` | 3 | a restore streams the blob |
|
|
476
|
+
| `fs-filetype-changes.spec.ts` | 6 | a path changes what it is |
|
|
477
|
+
| `fs-filenames.spec.ts` | 5 | unicode and case |
|
|
432
478
|
| `fs-clock-skew.spec.ts` | 6 | a file is visible whatever its timestamp says |
|
|
479
|
+
| `fs-slow-copy.spec.ts` | 3 | a file being written is not distributed half-done |
|
|
433
480
|
| `fs-disk-full.spec.ts` | 3 | a full disk |
|
|
434
481
|
| `fs-scale.spec.ts` | 3 | scale and endurance |
|
|
435
|
-
| `fs-
|
|
436
|
-
| `fs-
|
|
437
|
-
| `fs-agent-rescan-commits.spec.ts` |
|
|
482
|
+
| `fs-agent-silent-joiner.spec.ts` | 4 | an agent with nothing to say does not speak |
|
|
483
|
+
| `fs-stage-timings.spec.ts` | 4 | per-stage timings |
|
|
484
|
+
| `fs-agent-rescan-commits.spec.ts` | 1 | a change found only by the safety rescan |
|
|
438
485
|
| `fs-agent-self-parent.spec.ts` | 2 | a push that parents itself |
|
|
439
486
|
| `fs-rename-folder.spec.ts` | 2 | renaming a folder |
|
|
440
487
|
| `fs-agent-own-echo.spec.ts` | 1 | its own advertisement echoed back |
|
|
441
|
-
| `fs-agent-send-retires-left-state.spec.ts` | 1 | leaving a state retires it |
|
|
442
488
|
| `example.spec.ts` | 1 | the README example, against a golden |
|
|
443
489
|
| `setup/goldens.spec.ts` | 1 | the golden mechanism itself |
|
|
490
|
+
| `dna/dna.spec.ts` | 1 | the files the rljson DNA generates are as it ships them |
|
|
491
|
+
| `fs_agent_version.test.ts` | 1 | the version file gg writes agrees with `package.json` |
|