foottrace 1.0.2 → 1.0.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.
@@ -41,6 +41,10 @@ export declare function readTree(value: unknown): ExecutionTree | undefined;
41
41
  * `changedSince` reads its paths), so a row without one is not a bundle the
42
42
  * fold can survive — it is the crash a gap exists to prevent. `CommitBundle`
43
43
  * declares it required, so no live log is affected.
44
+ * - Each trace entry needs a known verb and a string `path`. Readers use
45
+ * string path operations; accepting a number can silently lose a causal
46
+ * writer in a short log and crash the indexed lookup in a longer one.
47
+ * Empty strings and historical path spellings remain valid strings.
44
48
  * - `updates` / `overwrite`, when present, must be plain objects. They are
45
49
  * read only AT THE PATHS THE TRACE NAMES, so an absent one is harmless and
46
50
  * is tolerated, exactly as the fold tolerates an absent `redactedPaths`.
@@ -63,6 +63,10 @@ export function readTree(value) {
63
63
  * `changedSince` reads its paths), so a row without one is not a bundle the
64
64
  * fold can survive — it is the crash a gap exists to prevent. `CommitBundle`
65
65
  * declares it required, so no live log is affected.
66
+ * - Each trace entry needs a known verb and a string `path`. Readers use
67
+ * string path operations; accepting a number can silently lose a causal
68
+ * writer in a short log and crash the indexed lookup in a longer one.
69
+ * Empty strings and historical path spellings remain valid strings.
66
70
  * - `updates` / `overwrite`, when present, must be plain objects. They are
67
71
  * read only AT THE PATHS THE TRACE NAMES, so an absent one is harmless and
68
72
  * is tolerated, exactly as the fold tolerates an absent `redactedPaths`.
@@ -95,6 +99,11 @@ export function bundleRefusal(row) {
95
99
  if (!isVerb(verb)) {
96
100
  return `trace[${i}].verb is ${verb === undefined ? 'missing' : JSON.stringify(verb)}, not ${VERBS.join(' | ')}`;
97
101
  }
102
+ const path = isPlainish(entry) ? entry.path : undefined;
103
+ if (typeof path !== 'string') {
104
+ const kind = path === undefined ? 'missing' : path === null ? 'null' : Array.isArray(path) ? 'an array' : `a ${typeof path}`;
105
+ return `trace[${i}].path is ${kind}, not a string`;
106
+ }
98
107
  }
99
108
  return undefined;
100
109
  }
@@ -68,6 +68,10 @@ exports.readTree = readTree;
68
68
  * `changedSince` reads its paths), so a row without one is not a bundle the
69
69
  * fold can survive — it is the crash a gap exists to prevent. `CommitBundle`
70
70
  * declares it required, so no live log is affected.
71
+ * - Each trace entry needs a known verb and a string `path`. Readers use
72
+ * string path operations; accepting a number can silently lose a causal
73
+ * writer in a short log and crash the indexed lookup in a longer one.
74
+ * Empty strings and historical path spellings remain valid strings.
71
75
  * - `updates` / `overwrite`, when present, must be plain objects. They are
72
76
  * read only AT THE PATHS THE TRACE NAMES, so an absent one is harmless and
73
77
  * is tolerated, exactly as the fold tolerates an absent `redactedPaths`.
@@ -100,6 +104,11 @@ function bundleRefusal(row) {
100
104
  if (!(0, verbs_js_1.isVerb)(verb)) {
101
105
  return `trace[${i}].verb is ${verb === undefined ? 'missing' : JSON.stringify(verb)}, not ${verbs_js_1.VERBS.join(' | ')}`;
102
106
  }
107
+ const path = isPlainish(entry) ? entry.path : undefined;
108
+ if (typeof path !== 'string') {
109
+ const kind = path === undefined ? 'missing' : path === null ? 'null' : Array.isArray(path) ? 'an array' : `a ${typeof path}`;
110
+ return `trace[${i}].path is ${kind}, not a string`;
111
+ }
103
112
  }
104
113
  return undefined;
105
114
  }
@@ -41,6 +41,10 @@ export declare function readTree(value: unknown): ExecutionTree | undefined;
41
41
  * `changedSince` reads its paths), so a row without one is not a bundle the
42
42
  * fold can survive — it is the crash a gap exists to prevent. `CommitBundle`
43
43
  * declares it required, so no live log is affected.
44
+ * - Each trace entry needs a known verb and a string `path`. Readers use
45
+ * string path operations; accepting a number can silently lose a causal
46
+ * writer in a short log and crash the indexed lookup in a longer one.
47
+ * Empty strings and historical path spellings remain valid strings.
44
48
  * - `updates` / `overwrite`, when present, must be plain objects. They are
45
49
  * read only AT THE PATHS THE TRACE NAMES, so an absent one is harmless and
46
50
  * is tolerated, exactly as the fold tolerates an absent `redactedPaths`.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "foottrace",
3
- "version": "1.0.2",
3
+ "version": "1.0.3",
4
4
  "type": "commonjs",
5
5
  "description": "Execution records, replay, time travel and honest attribution — independent of the engine that produced them",
6
6
  "license": "MIT",