@yaks/tracker 0.0.0-stage → 0.2.36

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.
Files changed (198) hide show
  1. package/Histogram.js +71 -0
  2. package/Histogram.js.map +1 -0
  3. package/Histogram.ts +100 -0
  4. package/LICENSE +202 -0
  5. package/README.md +639 -2
  6. package/_dist/brief.d.ts +25 -0
  7. package/_dist/brief.d.ts.map +1 -0
  8. package/_dist/changes.d.ts +9 -0
  9. package/_dist/changes.d.ts.map +1 -0
  10. package/_dist/chart.d.ts +24 -0
  11. package/_dist/chart.d.ts.map +1 -0
  12. package/_dist/digest.d.ts +64 -0
  13. package/_dist/digest.d.ts.map +1 -0
  14. package/_dist/effects.d.ts +73 -0
  15. package/_dist/effects.d.ts.map +1 -0
  16. package/_dist/errors.d.ts +14 -0
  17. package/_dist/errors.d.ts.map +1 -0
  18. package/_dist/everywhere.d.ts +13 -0
  19. package/_dist/everywhere.d.ts.map +1 -0
  20. package/_dist/fault.d.ts +29 -0
  21. package/_dist/fault.d.ts.map +1 -0
  22. package/_dist/file.d.ts +6 -0
  23. package/_dist/file.d.ts.map +1 -0
  24. package/_dist/fixtime.d.ts +20 -0
  25. package/_dist/fixtime.d.ts.map +1 -0
  26. package/_dist/frames.d.ts +6 -0
  27. package/_dist/frames.d.ts.map +1 -0
  28. package/_dist/graph.d.ts +3 -0
  29. package/_dist/graph.d.ts.map +1 -0
  30. package/_dist/group.d.ts +21 -0
  31. package/_dist/group.d.ts.map +1 -0
  32. package/_dist/instrument.d.ts +37 -0
  33. package/_dist/instrument.d.ts.map +1 -0
  34. package/_dist/intake.d.ts +21 -0
  35. package/_dist/intake.d.ts.map +1 -0
  36. package/_dist/merge.d.ts +11 -0
  37. package/_dist/merge.d.ts.map +1 -0
  38. package/_dist/mod.d.ts +7 -0
  39. package/_dist/mod.d.ts.map +1 -0
  40. package/_dist/model.d.ts +20 -0
  41. package/_dist/model.d.ts.map +1 -0
  42. package/_dist/outage.d.ts +7 -0
  43. package/_dist/outage.d.ts.map +1 -0
  44. package/_dist/people.d.ts +3 -0
  45. package/_dist/people.d.ts.map +1 -0
  46. package/_dist/poll.d.ts +101 -0
  47. package/_dist/poll.d.ts.map +1 -0
  48. package/_dist/poll_thread.d.ts +8 -0
  49. package/_dist/poll_thread.d.ts.map +1 -0
  50. package/_dist/reading.d.ts +34 -0
  51. package/_dist/reading.d.ts.map +1 -0
  52. package/_dist/remote.d.ts +61 -0
  53. package/_dist/remote.d.ts.map +1 -0
  54. package/_dist/report.d.ts +324 -0
  55. package/_dist/report.d.ts.map +1 -0
  56. package/_dist/resolution.d.ts +22 -0
  57. package/_dist/resolution.d.ts.map +1 -0
  58. package/_dist/routes.d.ts +33 -0
  59. package/_dist/routes.d.ts.map +1 -0
  60. package/_dist/script.d.ts +8 -0
  61. package/_dist/script.d.ts.map +1 -0
  62. package/_dist/service.d.ts +30 -0
  63. package/_dist/service.d.ts.map +1 -0
  64. package/_dist/sync_health.d.ts +4 -0
  65. package/_dist/sync_health.d.ts.map +1 -0
  66. package/_dist/ticket.d.ts +14 -0
  67. package/_dist/ticket.d.ts.map +1 -0
  68. package/_dist/tools.d.ts +39 -0
  69. package/_dist/tools.d.ts.map +1 -0
  70. package/_dist/trace-intake.d.ts +25 -0
  71. package/_dist/trace-intake.d.ts.map +1 -0
  72. package/_dist/views.d.ts +11 -0
  73. package/_dist/views.d.ts.map +1 -0
  74. package/_dist/vocab.d.ts +9 -0
  75. package/_dist/vocab.d.ts.map +1 -0
  76. package/box.json +51 -0
  77. package/brief.js +86 -0
  78. package/brief.js.map +1 -0
  79. package/brief.ts +120 -0
  80. package/changes.js +57 -0
  81. package/changes.js.map +1 -0
  82. package/changes.ts +70 -0
  83. package/chart.js +186 -0
  84. package/chart.js.map +1 -0
  85. package/chart.ts +193 -0
  86. package/deno.json +1 -0
  87. package/digest.js +329 -0
  88. package/digest.js.map +1 -0
  89. package/digest.ts +406 -0
  90. package/effects.js +136 -0
  91. package/effects.js.map +1 -0
  92. package/effects.ts +178 -0
  93. package/errors.js +130 -0
  94. package/errors.js.map +1 -0
  95. package/errors.ts +185 -0
  96. package/everywhere.js +46 -0
  97. package/everywhere.js.map +1 -0
  98. package/everywhere.ts +66 -0
  99. package/fault.js +65 -0
  100. package/fault.js.map +1 -0
  101. package/fault.ts +107 -0
  102. package/file.js +87 -0
  103. package/file.js.map +1 -0
  104. package/file.ts +93 -0
  105. package/fixtime.js +67 -0
  106. package/fixtime.js.map +1 -0
  107. package/fixtime.ts +86 -0
  108. package/frames.js +77 -0
  109. package/frames.js.map +1 -0
  110. package/frames.ts +69 -0
  111. package/graph.js +7 -0
  112. package/graph.js.map +1 -0
  113. package/graph.ts +8 -0
  114. package/group.js +444 -0
  115. package/group.js.map +1 -0
  116. package/group.ts +533 -0
  117. package/inspect.js +471 -0
  118. package/inspect.js.map +1 -0
  119. package/inspect.ts +693 -0
  120. package/instrument.js +69 -0
  121. package/instrument.js.map +1 -0
  122. package/instrument.ts +93 -0
  123. package/intake.js +43 -0
  124. package/intake.js.map +1 -0
  125. package/intake.ts +84 -0
  126. package/merge.js +126 -0
  127. package/merge.js.map +1 -0
  128. package/merge.ts +115 -0
  129. package/migrate.ts +36 -0
  130. package/mod.js +8 -0
  131. package/mod.js.map +1 -0
  132. package/mod.ts +19 -0
  133. package/model.js +8 -0
  134. package/model.js.map +1 -0
  135. package/model.ts +27 -0
  136. package/outage.js +129 -0
  137. package/outage.js.map +1 -0
  138. package/outage.ts +158 -0
  139. package/package.json +133 -4
  140. package/page.d.ts +2 -0
  141. package/page.js +905 -0
  142. package/people.js +51 -0
  143. package/people.js.map +1 -0
  144. package/people.ts +82 -0
  145. package/poll.js +277 -0
  146. package/poll.js.map +1 -0
  147. package/poll.ts +411 -0
  148. package/poll_thread.js +104 -0
  149. package/poll_thread.js.map +1 -0
  150. package/poll_thread.ts +126 -0
  151. package/poll_worker.ts +45 -0
  152. package/reading.js +122 -0
  153. package/reading.js.map +1 -0
  154. package/reading.ts +162 -0
  155. package/reconcile.js +113 -0
  156. package/reconcile.js.map +1 -0
  157. package/reconcile.ts +130 -0
  158. package/remote.js +312 -0
  159. package/remote.js.map +1 -0
  160. package/remote.ts +397 -0
  161. package/report.js +825 -0
  162. package/report.js.map +1 -0
  163. package/report.ts +944 -0
  164. package/resolution.js +114 -0
  165. package/resolution.js.map +1 -0
  166. package/resolution.ts +123 -0
  167. package/routes.js +130 -0
  168. package/routes.js.map +1 -0
  169. package/routes.ts +163 -0
  170. package/script.js +13 -0
  171. package/script.js.map +1 -0
  172. package/script.ts +16 -0
  173. package/service.js +174 -0
  174. package/service.js.map +1 -0
  175. package/service.ts +215 -0
  176. package/spread.js +94 -0
  177. package/spread.js.map +1 -0
  178. package/spread.ts +101 -0
  179. package/sync_health.js +36 -0
  180. package/sync_health.js.map +1 -0
  181. package/sync_health.ts +65 -0
  182. package/ticket.js +6 -0
  183. package/ticket.js.map +1 -0
  184. package/ticket.ts +24 -0
  185. package/tools.js +305 -0
  186. package/tools.js.map +1 -0
  187. package/tools.ts +411 -0
  188. package/trace-intake.js +164 -0
  189. package/trace-intake.js.map +1 -0
  190. package/trace-intake.ts +148 -0
  191. package/views.js +247 -0
  192. package/views.js.map +1 -0
  193. package/views.ts +254 -0
  194. package/vocab.js +20 -0
  195. package/vocab.js.map +1 -0
  196. package/vocab.json +834 -0
  197. package/vocab.ts +14 -0
  198. package/yak-tracker@.service +22 -0
package/fault.js ADDED
@@ -0,0 +1,65 @@
1
+ // Fault grouping, independent of storage and the reporter.
2
+ import { replaceIds } from "@yaks/id";
3
+ import { comp, str, title } from "./model.js";
4
+ // A refusal of a name the vocabulary does not know quotes the caller's word,
5
+ // then teaches about that word (@yaks/vocab `unknownName`): one fault,
6
+ // whichever word a caller guessed.
7
+ let UNKNOWN = /\b(unknown (?:prop: \.|component ))[\w$-]+[^\n]*/g;
8
+ // Cloudflare names each of its runtime's internal failures with a reference.
9
+ let REFERENCE = /(;\s*reference\s*=\s*)[a-z0-9]+\b/gi;
10
+ // esbuild content hashes name a release, never a failure site. Keep the
11
+ // module name and extension, including the path when one is present.
12
+ export let stablePlace = (text)=>text.replace(/([\w.-]+?)(?:-[\w-]{8})+(\.(?:[cm]?js|css))(?=[:#)\s?]|$)/g, '$1$2');
13
+ /**
14
+ * A message with its volatile parts replaced by `#`.
15
+ *
16
+ * ```ts
17
+ * import { normalize } from '@yaks/tracker'
18
+ *
19
+ * normalize('T-42 failed at /srv/app.ts:10:3 after 300 tries')
20
+ * // '# failed at # after # tries'
21
+ * normalize('unknown prop: .recipy (closest declared: .recipe)')
22
+ * // 'unknown prop: .#'
23
+ * ```
24
+ */ export let normalize = (text)=>replaceIds(stablePlace(text), ()=>'#') // human ids: T-3, S-45
25
+ .toLowerCase().replace(/\b(sub|cus|cs|pi|si|in|evt|pm|seti|ch|acct|price|prod)_(?:(?:test|live)_)?[a-z0-9]{12,}\b/g, '$1_#') // Stripe's long opaque object ids; keep the object type
26
+ .replace(UNKNOWN, '$1#') // the caller's word, and what is taught about it
27
+ // Cloudflare's per-occurrence reference, after any of its internal errors
28
+ .replace(REFERENCE, '$1#').replace(/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/g, '#').replace(/\d{4}-\d{2}-\d{2}t[\d:.]+z?/g, '#') // iso timestamps
29
+ .replace(/\/[^\s:]+/g, '#') // absolute paths
30
+ .replace(/:\d+(:\d+)?/g, '#') // :line:col
31
+ .replace(/\b0x[0-9a-f]+\b/g, '#') // explicit hex numbers
32
+ .replace(/\b[0-9a-f]{6,}\b/g, '#') // hex blobs, short hashes
33
+ .replace(/(?<![a-z0-9])[+-]?(?:\d+(?:\.\d+)?|\.\d+)(?:e[+-]?\d+)?/g, '#') // whole numeric values, including decimals and duration suffixes
34
+ .replace(/#+/g, '#').replace(/\s+/g, ' ').trim();
35
+ // The first frame of a stack, so two failures at one site key together even
36
+ // when their messages differ. Empty when there is no stack (a process that
37
+ // died carries none); the key then rests on the kind and the message.
38
+ let head = (stack)=>{
39
+ if (!stack) return '';
40
+ let lines = stack.split('\n').map((l)=>l.trim());
41
+ return normalize(lines.find((l)=>l.startsWith('at ')) ?? lines[0] ?? '');
42
+ };
43
+ /**
44
+ * The key one open bug is filed under: the broken entity's kind, the
45
+ * normalized message, and the normalized top frame of the stack. A failure
46
+ * Cloudflare names by its reference is the platform's, wherever our code
47
+ * met it, so it keys without a frame: one storage reset caught by several
48
+ * calls is one bug.
49
+ *
50
+ * ```ts
51
+ * import { faultKey } from '@yaks/tracker'
52
+ *
53
+ * faultKey('session', 'exit 127 in S-9', 'Error\n at run (/a.ts:4:1)')
54
+ * // 'session:exit # in #@at run (#)'
55
+ * ```
56
+ */ export let faultKey = (kind, message, stack)=>{
57
+ let top = message.search(REFERENCE) < 0 ? head(stack) : '';
58
+ return `${kind}:${normalize(message)}${top ? `@${top}` : ''}`;
59
+ };
60
+ /** Reporting and grouping use the same explicit or derived fault. */ export let faultOf = (row)=>stablePlace(str(comp(row, 'error').fault)) || faultKey(str(comp(row, 'during').kind), title(row), str(comp(row, 'exception').stack));
61
+ /** Whose stopped work an occurrence is, where its reporter tagged it `rerun`
62
+ * (an Operator conversation's space), or ''. Each owner's is its own report,
63
+ * never folded into another's or counted away, so a fix reaches every owner
64
+ * it stopped (./effects.ts `settle`). */ export let rerunOf = (row)=>str(comp(row, 'error').tags?.rerun);
65
+ //# sourceMappingURL=fault.js.map
package/fault.js.map ADDED
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fault.js","sources":["./fault.ts"],"names":[],"mappings":"AAAA,2DAA2D;AAG3D,SAAS,UAAU,wBAA6B;AAChD,SAAS,IAAI,EAAE,GAAG,EAAE,KAAK,qBAAoB;AAE7C,6EAA6E;AAC7E,uEAAuE;AACvE,mCAAmC;AACnC,IAAI,UAAU;AAEd,6EAA6E;AAC7E,IAAI,YAAY;AAEhB,wEAAwE;AACxE,qEAAqE;AACrE,OAAO,IAAI,cAAc,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AC5B,MAAM,MACN,IAAI,KAAK,KAAK,aAAa,KAAK,GACjC;AAEH;;;uCAGuC,GACvC,OAAO,IAAI,UAAU,CAAC,MACpB,IAAK,KAAK,KAAK,SAAS,IAAI,EAA0C,OAAM"}
package/fault.ts ADDED
@@ -0,0 +1,107 @@
1
+ // Fault grouping, independent of storage and the reporter.
2
+
3
+ import type { Bundle } from 'jsr:@yaks/graph@0.2.36'
4
+ import { replaceIds } from '@yaks/id'
5
+ import { comp, str, title } from './model.js'
6
+
7
+ // A refusal of a name the vocabulary does not know quotes the caller's word,
8
+ // then teaches about that word (@yaks/vocab `unknownName`): one fault,
9
+ // whichever word a caller guessed.
10
+ let UNKNOWN = /\b(unknown (?:prop: \.|component ))[\w$-]+[^\n]*/g
11
+
12
+ // Cloudflare names each of its runtime's internal failures with a reference.
13
+ let REFERENCE = /(;\s*reference\s*=\s*)[a-z0-9]+\b/gi
14
+
15
+ // esbuild content hashes name a release, never a failure site. Keep the
16
+ // module name and extension, including the path when one is present.
17
+ export let stablePlace = (text: string): string =>
18
+ text.replace(
19
+ /([\w.-]+?)(?:-[\w-]{8})+(\.(?:[cm]?js|css))(?=[:#)\s?]|$)/g,
20
+ '$1$2',
21
+ )
22
+
23
+ /**
24
+ * A message with its volatile parts replaced by `#`.
25
+ *
26
+ * ```ts
27
+ * import { normalize } from '@yaks/tracker'
28
+ *
29
+ * normalize('T-42 failed at /srv/app.ts:10:3 after 300 tries')
30
+ * // '# failed at # after # tries'
31
+ * normalize('unknown prop: .recipy (closest declared: .recipe)')
32
+ * // 'unknown prop: .#'
33
+ * ```
34
+ */
35
+ export let normalize = (text: string): string =>
36
+ replaceIds(stablePlace(text), () => '#') // human ids: T-3, S-45
37
+ .toLowerCase()
38
+ .replace(
39
+ /\b(sub|cus|cs|pi|si|in|evt|pm|seti|ch|acct|price|prod)_(?:(?:test|live)_)?[a-z0-9]{12,}\b/g,
40
+ '$1_#',
41
+ ) // Stripe's long opaque object ids; keep the object type
42
+ .replace(UNKNOWN, '$1#') // the caller's word, and what is taught about it
43
+ // Cloudflare's per-occurrence reference, after any of its internal errors
44
+ .replace(REFERENCE, '$1#')
45
+ .replace(
46
+ /[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/g,
47
+ '#',
48
+ )
49
+ .replace(/\d{4}-\d{2}-\d{2}t[\d:.]+z?/g, '#') // iso timestamps
50
+ .replace(/\/[^\s:]+/g, '#') // absolute paths
51
+ .replace(/:\d+(:\d+)?/g, '#') // :line:col
52
+ .replace(/\b0x[0-9a-f]+\b/g, '#') // explicit hex numbers
53
+ .replace(/\b[0-9a-f]{6,}\b/g, '#') // hex blobs, short hashes
54
+ .replace(
55
+ /(?<![a-z0-9])[+-]?(?:\d+(?:\.\d+)?|\.\d+)(?:e[+-]?\d+)?/g,
56
+ '#',
57
+ ) // whole numeric values, including decimals and duration suffixes
58
+ .replace(/#+/g, '#')
59
+ .replace(/\s+/g, ' ')
60
+ .trim()
61
+
62
+ // The first frame of a stack, so two failures at one site key together even
63
+ // when their messages differ. Empty when there is no stack (a process that
64
+ // died carries none); the key then rests on the kind and the message.
65
+ let head = (stack?: string | null): string => {
66
+ if (!stack) return ''
67
+ let lines = stack.split('\n').map((l) => l.trim())
68
+ return normalize(lines.find((l) => l.startsWith('at ')) ?? lines[0] ?? '')
69
+ }
70
+
71
+ /**
72
+ * The key one open bug is filed under: the broken entity's kind, the
73
+ * normalized message, and the normalized top frame of the stack. A failure
74
+ * Cloudflare names by its reference is the platform's, wherever our code
75
+ * met it, so it keys without a frame: one storage reset caught by several
76
+ * calls is one bug.
77
+ *
78
+ * ```ts
79
+ * import { faultKey } from '@yaks/tracker'
80
+ *
81
+ * faultKey('session', 'exit 127 in S-9', 'Error\n at run (/a.ts:4:1)')
82
+ * // 'session:exit # in #@at run (#)'
83
+ * ```
84
+ */
85
+ export let faultKey = (
86
+ kind: string,
87
+ message: string,
88
+ stack?: string | null,
89
+ ): string => {
90
+ let top = message.search(REFERENCE) < 0 ? head(stack) : ''
91
+ return `${kind}:${normalize(message)}${top ? `@${top}` : ''}`
92
+ }
93
+
94
+ /** Reporting and grouping use the same explicit or derived fault. */
95
+ export let faultOf = (row: Bundle): string =>
96
+ stablePlace(str(comp(row, 'error').fault)) || faultKey(
97
+ str(comp(row, 'during').kind),
98
+ title(row),
99
+ str(comp(row, 'exception').stack),
100
+ )
101
+
102
+ /** Whose stopped work an occurrence is, where its reporter tagged it `rerun`
103
+ * (an Operator conversation's space), or ''. Each owner's is its own report,
104
+ * never folded into another's or counted away, so a fix reaches every owner
105
+ * it stopped (./effects.ts `settle`). */
106
+ export let rerunOf = (row: Bundle): string =>
107
+ str((comp(row, 'error').tags as Record<string, unknown> | undefined)?.rerun)
package/file.js ADDED
@@ -0,0 +1,87 @@
1
+ import * as io from "@yaks/file/io";
2
+ import { trash } from "@yaks/process/trash";
3
+ // Every write and sync is asynchronous: a host reporting into the spool keeps
4
+ // its thread while a busy disk takes seconds over an fsync.
5
+ let sync = async (dir)=>{
6
+ let file = await io.open(dir, {
7
+ read: true
8
+ });
9
+ try {
10
+ await file.sync();
11
+ } finally{
12
+ file.close();
13
+ }
14
+ };
15
+ export let files = (dir)=>({
16
+ append: async (line)=>{
17
+ await io.mkdir(dir, {
18
+ recursive: true,
19
+ mode: 0o700
20
+ });
21
+ let name = `${dir}/${Date.now()}-${crypto.randomUUID()}`;
22
+ let file = await io.open(`${name}.jsonl`, {
23
+ write: true,
24
+ createNew: true,
25
+ mode: 0o600
26
+ });
27
+ try {
28
+ let bytes = new TextEncoder().encode(line);
29
+ let at = 0;
30
+ while(at < bytes.length)at += await file.write(bytes.subarray(at));
31
+ await file.sync();
32
+ } finally{
33
+ file.close();
34
+ }
35
+ await sync(dir);
36
+ },
37
+ source: async function*() {
38
+ let names = [];
39
+ try {
40
+ for await (let entry of io.readDir(dir)){
41
+ if (entry.isFile && entry.name.endsWith('.jsonl')) {
42
+ names.push(entry.name);
43
+ }
44
+ }
45
+ } catch (error) {
46
+ if (io.isNotFound(error)) return;
47
+ throw error;
48
+ }
49
+ for (let name of names.sort()){
50
+ let path = `${dir}/${name}`;
51
+ let text;
52
+ try {
53
+ text = await io.readTextFile(path);
54
+ } catch (error) {
55
+ // Another intake can acknowledge a segment after this directory read.
56
+ if (io.isNotFound(error)) continue;
57
+ throw error;
58
+ }
59
+ // A writer may still be filling this segment. Neither a partial tail
60
+ // nor a crash before its newline can hold later complete records back.
61
+ if (!text.endsWith('\n')) continue;
62
+ let rows = text.trimEnd().split('\n').flatMap((line)=>JSON.parse(line));
63
+ let admitted = name.endsWith('.local.jsonl');
64
+ yield {
65
+ rows,
66
+ admitted,
67
+ admit: async ()=>{
68
+ if (admitted) return;
69
+ let next = path.replace(/\.jsonl$/, '.local.jsonl');
70
+ await io.rename(path, next);
71
+ path = next;
72
+ admitted = true;
73
+ await sync(dir);
74
+ },
75
+ refuse: async ()=>{
76
+ await io.rename(path, path.replace(/\.jsonl$/, '.refused'));
77
+ await sync(dir);
78
+ },
79
+ ack: async ()=>{
80
+ await trash(path, `${dir}/.trash`);
81
+ await sync(dir);
82
+ }
83
+ };
84
+ }
85
+ }
86
+ });
87
+ //# sourceMappingURL=file.js.map
package/file.js.map ADDED
@@ -0,0 +1 @@
1
+ {"version":3,"file":"file.js","sources":["./file.ts"],"names":[],"mappings":"AAAA,YAAY,6BAAkC;AAC9C,SAAS,KAAK,mCAAwC;AAOtD,8EAA8E;AAC9E,4DAA4D;AAC5D,IAAI,OAAO,OAAO;EAChB,IAAI,OAAO,MAAM,GAAG,IAAI,CAAC,KAAK;IAAE,MAAM;EAAK;EAC3C,IAAI;IACF,MAAM,KAAK,IAAI;EACjB,SAAU;IACR,KAAK,KAAK;EACZ;AACF;AAEA,OAAO,IAAI,QAAQ,CAAC,MAGf,CAAC;IACJ,QAAQ,OAAO;MACb,MAAM,GAAG,KAAK,CAAC,KAAK;QAAE,WAAW;QAAM,MAAM;MAAM;MACnD,IAAI,OAAO,GA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AO,CAAC,YAAY;YACpC,MAAM,GAAG,MAAM,CAAC,MAAM;YACtB,OAAO;YACP,WAAW;YACX,MAAM,KAAK;UACb;UACA,QAAQ;YACN,MAAM,GAAG,MAAM,CAAC,MAAM,KAAK,OAAO,CAAC,YAAY;YAC/C,MAAM,KAAK;UACb;UACA,KAAK;YACH,MAAM,MAAM,MAAM,GAAG,IAAI,OAAO,CAAC;YACjC,MAAM,KAAK;UACb;QACF;MACF;IACF;EACF,CAAC,EAAC"}
package/file.ts ADDED
@@ -0,0 +1,93 @@
1
+ import * as io from '@yaks/file/io'
2
+ import { trash } from '@yaks/process/trash'
3
+ // A file spool appends immutable JSONL segments. The newline publishes one
4
+ // complete record; committed intake moves it to trash. Writers share no offsets.
5
+
6
+ import type { Bundle } from 'jsr:@yaks/graph@0.2.36'
7
+ import type { Source } from './service.ts'
8
+
9
+ // Every write and sync is asynchronous: a host reporting into the spool keeps
10
+ // its thread while a busy disk takes seconds over an fsync.
11
+ let sync = async (dir: string) => {
12
+ let file = await io.open(dir, { read: true })
13
+ try {
14
+ await file.sync()
15
+ } finally {
16
+ file.close()
17
+ }
18
+ }
19
+
20
+ export let files = (dir: string): {
21
+ append: (line: string) => Promise<void>
22
+ source: Source
23
+ } => ({
24
+ append: async (line) => {
25
+ await io.mkdir(dir, { recursive: true, mode: 0o700 })
26
+ let name = `${dir}/${Date.now()}-${crypto.randomUUID()}`
27
+ let file = await io.open(`${name}.jsonl`, {
28
+ write: true,
29
+ createNew: true,
30
+ mode: 0o600,
31
+ })
32
+ try {
33
+ let bytes = new TextEncoder().encode(line)
34
+ let at = 0
35
+ while (at < bytes.length) at += await file.write(bytes.subarray(at))
36
+ await file.sync()
37
+ } finally {
38
+ file.close()
39
+ }
40
+ await sync(dir)
41
+ },
42
+ source: async function* () {
43
+ let names: string[] = []
44
+ try {
45
+ for await (let entry of io.readDir(dir)) {
46
+ if (entry.isFile && entry.name.endsWith('.jsonl')) {
47
+ names.push(entry.name)
48
+ }
49
+ }
50
+ } catch (error) {
51
+ if (io.isNotFound(error)) return
52
+ throw error
53
+ }
54
+ for (let name of names.sort()) {
55
+ let path = `${dir}/${name}`
56
+ let text: string
57
+ try {
58
+ text = await io.readTextFile(path)
59
+ } catch (error) {
60
+ // Another intake can acknowledge a segment after this directory read.
61
+ if (io.isNotFound(error)) continue
62
+ throw error
63
+ }
64
+ // A writer may still be filling this segment. Neither a partial tail
65
+ // nor a crash before its newline can hold later complete records back.
66
+ if (!text.endsWith('\n')) continue
67
+ let rows: Bundle[] = text.trimEnd().split('\n').flatMap((line) =>
68
+ JSON.parse(line)
69
+ )
70
+ let admitted = name.endsWith('.local.jsonl')
71
+ yield {
72
+ rows,
73
+ admitted,
74
+ admit: async () => {
75
+ if (admitted) return
76
+ let next = path.replace(/\.jsonl$/, '.local.jsonl')
77
+ await io.rename(path, next)
78
+ path = next
79
+ admitted = true
80
+ await sync(dir)
81
+ },
82
+ refuse: async () => {
83
+ await io.rename(path, path.replace(/\.jsonl$/, '.refused'))
84
+ await sync(dir)
85
+ },
86
+ ack: async () => {
87
+ await trash(path, `${dir}/.trash`)
88
+ await sync(dir)
89
+ },
90
+ }
91
+ }
92
+ },
93
+ })
package/fixtime.js ADDED
@@ -0,0 +1,67 @@
1
+ // Time to fix: how long a bug stayed open before it was resolved. A bug that
2
+ // came back is timed from its regression, since that is when it reopened.
3
+ // It is computed from the bug's marks and never stored.
4
+ let at = (b, name, prop = 'at')=>Date.parse(String(b[name]?.[prop] ?? ''));
5
+ /// opened({ entity: { eid: 'b' }, bug: { first: '2026-10-12T10:00:00Z' } })
6
+ /// -> Date.parse('2026-10-12T10:00:00Z')
7
+ /// opened({ entity: { eid: 'b' }, bug: { first: '2026-10-01T00:00:00Z' },
8
+ /// regressed: { at: '2026-10-12T10:00:00Z' } })
9
+ /// -> Date.parse('2026-10-12T10:00:00Z')
10
+ /** When the bug last opened: its regression, else its first occurrence. */ export let opened = (b)=>{
11
+ let first = at(b, 'bug', 'first'), back = at(b, 'regressed');
12
+ return back > first ? back : first;
13
+ };
14
+ /// fixtime({ entity: { eid: 'b' }, bug: { first: '2026-10-12T10:00:00Z' },
15
+ /// resolved: { at: '2026-10-12T10:04:00Z' } })
16
+ /// -> 240_000
17
+ /// fixtime({ entity: { eid: 'b' }, bug: { first: '2026-10-12T10:00:00Z' } })
18
+ /// -> undefined
19
+ /** How long a resolved bug was open; undefined while it is open or when it
20
+ * was archived instead. */ export let fixtime = (b)=>{
21
+ if (!b.resolved) return undefined;
22
+ let span = at(b, 'resolved') - opened(b);
23
+ return span >= 0 ? span : undefined;
24
+ };
25
+ /// span(42_000) -> '42s'
26
+ /// span(4 * 60_000) -> '4m'
27
+ /// span(72 * 60_000) -> '1h12m'
28
+ /// span(76 * 3_600_000) -> '3d4h'
29
+ /** A duration to the two largest units that matter for a bug. */ export let span = (ms)=>{
30
+ let s = Math.round(ms / 1000), m = Math.floor(s / 60);
31
+ let h = Math.floor(m / 60), d = Math.floor(h / 24);
32
+ return d ? `${d}d${h % 24 ? `${h % 24}h` : ''}` : h ? `${h}h${m % 60 ? `${m % 60}m` : ''}` : m ? `${m}m` : `${s}s`;
33
+ };
34
+ /// spread([{ ms: 3, of: 'c' }, { ms: 1, of: 'a' }, { ms: 2, of: 'b' }])
35
+ /// -> { count: 3, median: 2, worst: { ms: 3, of: 'c' } }
36
+ /// spread([{ ms: 1, of: 'a' }, { ms: 4, of: 'b' }]).median -> 2.5
37
+ /// spread([]) -> { count: 0 }
38
+ /** Median and worst over timed things, in any order. */ export let spread = (timed)=>{
39
+ let sorted = [
40
+ ...timed
41
+ ].sort((a, b)=>a.ms - b.ms), n = sorted.length;
42
+ if (!n) return {
43
+ count: 0
44
+ };
45
+ let mid = n >> 1;
46
+ return {
47
+ count: n,
48
+ median: n % 2 ? sorted[mid].ms : (sorted[mid - 1].ms + sorted[mid].ms) / 2,
49
+ worst: sorted[n - 1]
50
+ };
51
+ };
52
+ /// let bug = (h, m) => ({ entity: { eid: `${h}:${m}` },
53
+ /// bug: { first: `2026-10-12T${h}:00:00Z` },
54
+ /// resolved: { at: `2026-10-12T10:${m}:00Z` } })
55
+ /// let four = fixes([bug(10, '01'), bug(10, '03'), bug('09', '00'), bug(10, '05')])
56
+ /// [four.count, four.median, four.worst?.ms] -> [4, 240_000, 3_600_000]
57
+ /// fixes([]) -> { count: 0 }
58
+ /** Median and worst time to fix over resolved bugs. */ export let fixes = (rows)=>spread(rows.flatMap((of)=>{
59
+ let ms = fixtime(of);
60
+ return ms == undefined ? [] : [
61
+ {
62
+ ms,
63
+ of
64
+ }
65
+ ];
66
+ }));
67
+ //# sourceMappingURL=fixtime.js.map
package/fixtime.js.map ADDED
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fixtime.js","sources":["./fixtime.ts"],"names":[],"mappings":"AAAA,6EAA6E;AAC7E,0EAA0E;AAC1E,wDAAwD;AAIxD,IAAI,KAAK,CAAC,GAAW,MAAc,OAAO,IAAI,GAC5C,KAAK,KAAK,CAAC,OAAO,AAAC,CAAC,CAAC,KAAK,EAAuB,CAAC,KAAK,IAAI;AAE7D,4EAA4E;AAC5E,2CAA2C;AAC3C,0EAA0E;AAC1E,kDAAkD;AAClD,2CAA2C;AAC3C,yEAAyE,GACzE,OAAO,IAAI,SAAS,CAAC;EACnB,IAAI,QAAQ,GAAG,GAAG,OAAO,UAAU,OAAO,GAAG,GAAG;EAChD,OAAO,OAAO,QAAQ,OAAO;AAC/B,EAAC;AAED,2EAA2E;AAC3E,iDAAiD;AACjD,gBAAgB;AAChB,6EAA6E;AAC7E,kBAAkB;AAClB;yBACyB,GACzB,OAAO,IAAI,UAAU,CAAC;EACpB,IAAI,CAAC,EAAE,QAAQ,EAAE,OAAO;EACxB,IAAI,OAAO,GAAG,GAAG,cAAc,OAAO;EACtC,OAAO,QAAQ,IAAI,OAAO;AAC5B,EAAC;AAED,yBAAyB;AACzB,4BAA4B;AAC5B,gCAAgC;AAChC,kCAAkC;AAClC,+DAA+D,GAC/D,OAAO,IAAI,OAA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DED
@@ -0,0 +1,86 @@
1
+ // Time to fix: how long a bug stayed open before it was resolved. A bug that
2
+ // came back is timed from its regression, since that is when it reopened.
3
+ // It is computed from the bug's marks and never stored.
4
+
5
+ import type { Bundle, Comp } from 'jsr:@yaks/graph@0.2.36'
6
+
7
+ let at = (b: Bundle, name: string, prop = 'at'): number =>
8
+ Date.parse(String((b[name] as Comp | undefined)?.[prop] ?? ''))
9
+
10
+ /// opened({ entity: { eid: 'b' }, bug: { first: '2026-10-12T10:00:00Z' } })
11
+ /// -> Date.parse('2026-10-12T10:00:00Z')
12
+ /// opened({ entity: { eid: 'b' }, bug: { first: '2026-10-01T00:00:00Z' },
13
+ /// regressed: { at: '2026-10-12T10:00:00Z' } })
14
+ /// -> Date.parse('2026-10-12T10:00:00Z')
15
+ /** When the bug last opened: its regression, else its first occurrence. */
16
+ export let opened = (b: Bundle): number => {
17
+ let first = at(b, 'bug', 'first'), back = at(b, 'regressed')
18
+ return back > first ? back : first
19
+ }
20
+
21
+ /// fixtime({ entity: { eid: 'b' }, bug: { first: '2026-10-12T10:00:00Z' },
22
+ /// resolved: { at: '2026-10-12T10:04:00Z' } })
23
+ /// -> 240_000
24
+ /// fixtime({ entity: { eid: 'b' }, bug: { first: '2026-10-12T10:00:00Z' } })
25
+ /// -> undefined
26
+ /** How long a resolved bug was open; undefined while it is open or when it
27
+ * was archived instead. */
28
+ export let fixtime = (b: Bundle): number | undefined => {
29
+ if (!b.resolved) return undefined
30
+ let span = at(b, 'resolved') - opened(b)
31
+ return span >= 0 ? span : undefined
32
+ }
33
+
34
+ /// span(42_000) -> '42s'
35
+ /// span(4 * 60_000) -> '4m'
36
+ /// span(72 * 60_000) -> '1h12m'
37
+ /// span(76 * 3_600_000) -> '3d4h'
38
+ /** A duration to the two largest units that matter for a bug. */
39
+ export let span = (ms: number): string => {
40
+ let s = Math.round(ms / 1000), m = Math.floor(s / 60)
41
+ let h = Math.floor(m / 60), d = Math.floor(h / 24)
42
+ return d
43
+ ? `${d}d${h % 24 ? `${h % 24}h` : ''}`
44
+ : h
45
+ ? `${h}h${m % 60 ? `${m % 60}m` : ''}`
46
+ : m
47
+ ? `${m}m`
48
+ : `${s}s`
49
+ }
50
+
51
+ /** How a set of timed things spread: how many, the median, and the worst
52
+ * with the thing it timed. */
53
+ export type Spread<T> = {
54
+ count: number
55
+ median?: number
56
+ worst?: { ms: number; of: T }
57
+ }
58
+
59
+ /// spread([{ ms: 3, of: 'c' }, { ms: 1, of: 'a' }, { ms: 2, of: 'b' }])
60
+ /// -> { count: 3, median: 2, worst: { ms: 3, of: 'c' } }
61
+ /// spread([{ ms: 1, of: 'a' }, { ms: 4, of: 'b' }]).median -> 2.5
62
+ /// spread([]) -> { count: 0 }
63
+ /** Median and worst over timed things, in any order. */
64
+ export let spread = <T>(timed: { ms: number; of: T }[]): Spread<T> => {
65
+ let sorted = [...timed].sort((a, b) => a.ms - b.ms), n = sorted.length
66
+ if (!n) return { count: 0 }
67
+ let mid = n >> 1
68
+ return {
69
+ count: n,
70
+ median: n % 2 ? sorted[mid].ms : (sorted[mid - 1].ms + sorted[mid].ms) / 2,
71
+ worst: sorted[n - 1],
72
+ }
73
+ }
74
+
75
+ /// let bug = (h, m) => ({ entity: { eid: `${h}:${m}` },
76
+ /// bug: { first: `2026-10-12T${h}:00:00Z` },
77
+ /// resolved: { at: `2026-10-12T10:${m}:00Z` } })
78
+ /// let four = fixes([bug(10, '01'), bug(10, '03'), bug('09', '00'), bug(10, '05')])
79
+ /// [four.count, four.median, four.worst?.ms] -> [4, 240_000, 3_600_000]
80
+ /// fixes([]) -> { count: 0 }
81
+ /** Median and worst time to fix over resolved bugs. */
82
+ export let fixes = (rows: Bundle[]): Spread<Bundle> =>
83
+ spread(rows.flatMap((of) => {
84
+ let ms = fixtime(of)
85
+ return ms == undefined ? [] : [{ ms, of }]
86
+ }))
package/frames.js ADDED
@@ -0,0 +1,77 @@
1
+ // Stack syntax is portable. Frame URLs lose query data before they leave this
2
+ // parser; only a host's resolver can establish whether a place is application code.
3
+ import { comp, str } from "./model.js";
4
+ let frame = (line)=>{
5
+ let text = line.trim();
6
+ let name;
7
+ if (text.startsWith('at ')) {
8
+ text = text.slice(3).replace(/^async /, '');
9
+ let call = text.match(/^(.*?) \((.*)\)$/);
10
+ if (call) [name, text] = [
11
+ call[1],
12
+ call[2]
13
+ ];
14
+ } else {
15
+ let at = text.indexOf('@');
16
+ if (at < 0) return;
17
+ name = text.slice(0, at);
18
+ text = text.slice(at + 1);
19
+ }
20
+ let loc = text.match(/^(.*?):(\d+):(\d+)$/) ?? text.match(/^(.*):(\d+)$/);
21
+ if (!loc || !loc[1] || !Number(loc[2])) return;
22
+ return {
23
+ file: loc[1].split(/[?#]/)[0],
24
+ line: Number(loc[2]),
25
+ ...loc[3] ? {
26
+ column: Number(loc[3])
27
+ } : {},
28
+ ...name ? {
29
+ function: name
30
+ } : {}
31
+ };
32
+ };
33
+ export let stackFrames = (stack)=>stack.slice(0, 128_000).split('\n').flatMap((line)=>{
34
+ let got = frame(line);
35
+ return got ? [
36
+ got
37
+ ] : [];
38
+ }).slice(0, 100);
39
+ export let enrichFrames = (resolve)=>async (row)=>{
40
+ let x = comp(row, 'exception');
41
+ if (!row.exception) return row;
42
+ let frames = stackFrames(str(x.stack));
43
+ // A browser reporter can provide frames when its runtime supplies no stack.
44
+ if (!frames.length && Array.isArray(x.frames)) {
45
+ frames = x.frames.slice(0, 100).flatMap((value)=>{
46
+ if (!value || typeof value != 'object' || typeof value.file != 'string') {
47
+ return [];
48
+ }
49
+ let { file, line, column, function: name } = value;
50
+ return [
51
+ {
52
+ file: file.split(/[?#]/)[0],
53
+ ...typeof line == 'number' ? {
54
+ line
55
+ } : {},
56
+ ...typeof column == 'number' ? {
57
+ column
58
+ } : {},
59
+ ...typeof name == 'string' ? {
60
+ function: name
61
+ } : {}
62
+ }
63
+ ];
64
+ });
65
+ }
66
+ return {
67
+ ...row,
68
+ exception: {
69
+ ...x,
70
+ frames: resolve ? await resolve(frames, str(comp(row, 'error').commit)) : frames.map((f)=>({
71
+ ...f,
72
+ app: false
73
+ }))
74
+ }
75
+ };
76
+ };
77
+ //# sourceMappingURL=frames.js.map
package/frames.js.map ADDED
@@ -0,0 +1 @@
1
+ {"version":3,"file":"frames.js","sources":["./frames.ts"],"names":[],"mappings":"AAAA,8EAA8E;AAC9E,oFAAoF;AAGpF,SAAS,IAAI,EAAc,GAAG,qBAAoB;AAElD,IAAI,QAAQ,CAAC;EACX,IAAI,OAAO,KAAK,IAAI;EACpB,IAAI;EACJ,IAAI,KAAK,UAAU,CAAC,QAAQ;IAC1B,OAAO,KAAK,KAAK,CAAC,GAAG,OAAO,CAAC,WAAW;IACxC,IAAI,OAAO,KAAK,KAAK,CAAC;IACtB,IAAI,MAAM,CAAC,MAAM,KAAK,GAAG;MAAC,IAAI,CAAC,EAAE;MAAE,IAAI,CAAC,EAAE;KAAC;EAC7C,OAAO;IACL,IAAI,KAAK,KAAK,OAAO,CAAC;IACtB,IAAI,KAAK,GAAG;IACZ,OAAO,KAAK,KAAK,CAAC,GAAG;IACrB,OAAO,KAAK,KAAK,CAAC,KAAK;EACzB;EACA,IAAI,MAAM,KAAK,KAAK,CAAC,0BACnB,KAAK,KAAK,CAAC;EACb,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE,IAAI,CAAC,OAAO,GAAG,CAAC,EAAE,GAAG;EACxC,OAAO;IACL,MAAM,GAAG,CAAC,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE;IAC7B,MAAM,OAAO,GAAG,CAAC,EAAE;IACnB,GAAG,GAAG,CAAC,EAAE,GAAG;MAAE,QAAQ,OAAO,GAAG,CAAC,EAAE;IAAE,IAAI,CAAC,CAAC;IAC3C,GAAG,OAAO;MAAE,UAAU;IAAK,IAAI,CAAC,CAAC;EACnC;AACF;AAEA,OAAO,IAAI,cAAc,CAAC,QACxB,MAAM,KAAK,CAAC,GAAG,SAAS,KAAK,CAAC,MAAM,OAAO,CAAC,CAAC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