Repository navigation
Expand file tree
/
Copy pathstatus.json
More file actions
463 lines (463 loc) · 41.2 KB
/
Copy pathstatus.json
File metadata and controls
463 lines (463 loc) · 41.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
{
"pieces": [
{
"name": "live capture (WebUSB, SLogic16 U3)",
"state": "won",
"rounds": 2,
"gap": "18/18 on hardware; 400 MB/s reproduced at 4, 8 and 16 channels. Remaining: live-edge capture vs native path, blocked on stimulus generator contention"
},
{
"name": "sample store + multiresolution query",
"state": "won",
"rounds": 2,
"gap": "3.51 ms/frame at the real 3200-column operating point on planar; new RleSampleStore for imports measures 0.80 ms on the 120 s capture, 2.08 ms dense worst case. Import load went from O(samples) to O(edges). NOT like-for-like: the 528 ms -> 18 ms figure compares the old planar build at 1 MSa/s against the edge-store build at 10 MSa/s, and 0.80 vs 3.51 ms is drawn from two different captures (planar cannot hold bin120 at 10 MSa/s). Same-capture control on reference/data/bin, 3200 cols x 16 ch: planar 1.84 ms, RLE 0.63 ms = 2.9x. Direction unambiguous, ratios inflated"
},
{
"name": "waveform rendering",
"state": "won",
"rounds": 2,
"gap": "per-row heights done, saturation settled at exact 1.0000 on all 16 channels, false claims struck"
},
{
"name": "pan and zoom",
"state": "won",
"rounds": 2,
"gap": "closed by scope decision: 60 Hz is the requirement, both apps sit at 120 and are vsync-limited"
},
{
"name": "channel and timing UI",
"state": "judging",
"rounds": 1,
"gap": "chrome geometry settled; .sr sessions now load (d0659e6); trigger config still stubbed"
},
{
"name": "cursors and measurement",
"state": "judging",
"rounds": 1,
"gap": "A/B cursors and hover readout working; multi-bubble merging never exercised by a dense capture"
},
{
"name": "protocol decoding",
"state": "won",
"rounds": 2,
"gap": "both blockers cleared: harness widened and mutation-verified, decode bounded and cancellable in 62 ms. UART/SPI/I2C now on real signal"
}
],
"metrics": [
{
"name": "pan/zoom fps, 100M samples x 16ch",
"ours": "120.5 fps vsync-capped, 0.0% dropped; 200 fps uncapped"
},
{
"name": "seconds to interactive waveform",
"ours": "browser, app-side: 11 ms median at 5 s (10-17), 30 ms at 120 s (28-71) - CDP wall agrees (13/30)"
},
{
"name": "decoder count (breadth)",
"ours": "125 byte-identical incl. class and full text variants; 125 on real signal, 86 non-empty"
},
{
"name": "sustained WebUSB throughput, every capture width",
"ours": "399.4 MB/s @ 16ch/200MHz, 398.3 @ 8ch/400MHz, 399.5 @ 4ch/800MHz - all three widths are the same 400 MB/s wire budget and all hold it, 0 short transfers in 1142-1143 transfers each. At 4ch the sink also absorbs 799 MB/s post-expansion (sink/raw = 2.0000 exactly)"
},
{
"name": "decode latency, Logic-2-shaped 5s x 16ch",
"ours": "13-18 ms warm (i2c), 41-46 ms warm (spi); ~870 ms cold"
},
{
"name": "decode of dense real traffic, 5s saturated UART",
"ours": "7089 ms, cancellable, watchdog-bounded"
},
{
"name": "frame time tail (the discriminating measure)",
"ours": "zoom sweep 1.67% of frames over budget, max 10.4 ms (measured with a working detector)"
}
],
"log": [
{
"t": "00:00",
"m": "device verified on bus: bDeviceClass 255, vendor class, no kernel driver bound - WebUSB claim should succeed"
},
{
"t": "00:01",
"m": "protocol distilled from libsigrok driver into docs/PROTOCOL-SLOGIC16U3.md"
},
{
"t": "00:01",
"m": "module contracts fixed in docs/ARCHITECTURE.md"
},
{
"t": "00:14",
"m": "native control: 391 MB/s at 16ch/200MHz via local libsigrok build - device and link are fine"
},
{
"t": "00:14",
"m": "SPEC BUG FOUND: aux payload length must NOT be rounded down to 4; real lengths are 2,8,2,1 - rounding down silently no-ops 3 of 4 settings. docs corrected"
},
{
"t": "00:14",
"m": "BLOCKER: probes read constant 0x00b2 - test source is on USB but not wired to the analyzer. No live-edge cross-check until someone connects them"
},
{
"t": "00:14",
"m": "substitute control: device Emulation pattern, deterministic over 3 runs, fingerprint 0700 0600 0500 at 16ch"
},
{
"t": "00:22",
"m": "RETRACTED: probes ARE connected. The constant reading was a capture taken while picolyzer sat at mode=stopped - it emits nothing until commanded"
},
{
"t": "00:22",
"m": "control established: square 0 1M -> exactly 0xb201/0xb200, 50000 each. GP_k maps to bit k, no byte swap"
},
{
"t": "00:22",
"m": "walk 100k 16: ch0-7 and ch14 follow the source; ch8,10,11 stuck low; ch9,12,13,15 stuck high (floating). Judge on ch0-7 for now"
},
{
"t": "00:22",
"m": "independent corroboration of the payload-length finding: native driver logs 'Align up to 4 (from 2)' on every aux write"
},
{
"t": "00:31",
"m": "HARDWARE RUN CONFIRMED: WebUSB sustains 399.57 MB/s at 16ch/200MHz, shortTransfers 0, emulation head byte-exact vs native driver"
},
{
"t": "00:31",
"m": "builder prediction P3 FALSIFIED: predicted 150-250 MB/s peak and >20% short at 200MHz; actual 399.57 vs 400 offered, 0.1% short. Reasoning behind it was wrong"
},
{
"t": "00:31",
"m": "browser held 199.97 MB/s at 16ch/100MHz where the NATIVE driver collapsed to 99.46 - the anomaly is libsigrok transfer sizing, not the device"
},
{
"t": "00:31",
"m": "critic confirmed expandPacked, head-drop carry and samplerate arithmetic correct against api.c. 9 defects sent back for round 2"
},
{
"t": "00:48",
"m": "device round 2 re-run on hardware: 15/15 pass, 0 failures, throughput reproduced at 399.14 MB/s"
},
{
"t": "00:48",
"m": "builder mutation-checked its new tests: reverting drain() and making the head-drop per-transfer each turn them red"
},
{
"t": "00:48",
"m": "CONTENTION: picolyzer stimulus generator is a single shared serial device and the decode builder is now driving it (mode=pattern-loop, 1500 samples). Live-edge verification deferred rather than commandeering it"
},
{
"t": "00:48",
"m": "note: the selftest head dump is 32 bytes = 16 samples = 1us at 16 MSa/s, too short to show a slow pattern. Not evidence of missing edges"
},
{
"t": "01:20",
"m": "BAR FALSIFIED A PREDICTION: 23x file size changed a mature commercial tool open time by 3%. The bar is not 'beat 150ms', it is '~150ms flat, independent of capture size'"
},
{
"t": "01:20",
"m": "BLOCKED: no screenshots and no fps number - the terminal lacks Screen Recording and Accessibility. All appearance claims tagged UNVERIFIED"
},
{
"t": "01:20",
"m": "reference agent self-corrected two claims that would have shipped false: a config backup that never existed, and stale counts after a re-run overwrote the exports"
},
{
"t": "01:55",
"m": "sample store: planar bit-planes beat interleaved on measurement, not argument. Memory a dead tie at 228 MB; planar wins queries 2.7x and edges() 69x"
},
{
"t": "01:55",
"m": "measured 229 MB actual vs 228.2 MB accounted - the memory model checks out against the browser"
},
{
"t": "01:55",
"m": "prediction P4 MISSED reproducibly: predicted <3x for 1000x samples, got 3.10-3.99x. Not an O(bins) failure - cache locality. Builder says it should have predicted a memory-hierarchy factor"
},
{
"t": "01:55",
"m": "narrow-glitch test asserts ALL 1000 columns, not just the pulse's - a test that only checked the pulse column would pass a renderer that flags everything"
},
{
"t": "01:55",
"m": "suite caught a real bug of the feared shape: maskTo(31) overflowing to a double, producing a phantom edge on a channel that never moved"
},
{
"t": "01:55",
"m": "CAUTION: agent contention corrupts timings badly - a 1.11ms frame measured 9.59ms. Bench now best-of-5 with a stability re-check. The fps metric must be measured on a quiet machine"
},
{
"t": "01:55",
"m": "contract gap closed: ColumnView was undefined in ARCHITECTURE.md, now defined and relayed to the renderer"
},
{
"t": "02:40",
"m": "data critic: could NOT break the correctness claims - built its own brute-force reference, 11 unused glitch patterns, boundary sweeps, all pass. Design decision stands"
},
{
"t": "02:40",
"m": "data critic: the head-to-head table divides planar-in-node by interleaved-in-browser. Real advantages are ~half: 2.0x not 2.7x, edges() 37x not 69x. P6 is an unrecorded MISS"
},
{
"t": "02:40",
"m": "bench does rm -rf on its output dir every run, so no artifact survives to be audited. Repo has zero git commits, so 'predictions written beforehand' has no evidence behind it"
},
{
"t": "02:40",
"m": "query(0, NaN, 5000, 100) returns low=1 high=0 - minimum above maximum - and paints a clean flat waveform. Renderer is protected only by accident"
},
{
"t": "02:40",
"m": "mutation testing: pyramid levels 6-7 can be built as garbage with the suite still reporting 40/40. Critic built the missing coverage and found no bug - a hole, not a defect"
},
{
"t": "02:40",
"m": "critic retracted two of its own priors: memory accounting is NOT circular (re-derived 228.2 MB independently), and best-of-5 is NOT hiding a tail (max/statistic under 1.56x)"
},
{
"t": "03:35",
"m": "renderer: 120.5 fps at 100M x 16ch, 3200x1440 device px, 0.0% dropped across all five phases. Display is 120Hz so that is vsync, not our ceiling"
},
{
"t": "03:35",
"m": "renderer's OWN cost is 3-6 us/frame; store.query is 4.1 ms. If fps needs to improve the work is in src/data, not src/render"
},
{
"t": "03:35",
"m": "SCREENSHOTS FALSIFIED 3 RENDERER DEFAULTS: background #141415 should be #1B1B1C; there IS a row separator it had declined to invent; rows/gutter 45/16 should be 49/8"
},
{
"t": "03:35",
"m": "after correction every geometric property matches exactly - row pitch 98, idle line 2 device px, transition bar 1 device px, no AA - max colour delta 1/255"
},
{
"t": "03:35",
"m": "two predictions fell: P2 half (linear scaling of query cost is the wrong model - it lands on a different pyramid level), P4 fully (zoom level dominates frame cost 4.2x, not 1.5x)"
},
{
"t": "03:35",
"m": "methodology catch: the fps stability check could not detect contention because fps is vsync-pinned. Switched to CPU time, which reads 9.1% drift where fps reads 0.0%"
},
{
"t": "03:35",
"m": "OPEN DISCREPANCY: a mature commercial tool's 120s zoom-out is 100.00% solid; ours lights 79.07% of columns, which matches the export's transition count exactly. Likely different captures, not a rendering defect"
},
{
"t": "04:20",
"m": "decode critic: conformance harness destructures away the annotation class and all text variants past the first - so 'byte-identical' covers 2 of the 4 fields, and those 2 blind fields are exactly what the renderer consumes"
},
{
"t": "04:20",
"m": "proved by mutation: forcing every annotation class to 0, and dropping every text variant, both leave the harness 6/6 green"
},
{
"t": "04:20",
"m": "no timeout, no cancel anywhere. A 5s saturated UART capture spends 6.9s inside one un-interruptible runPython call. libsigrokdecode ships srd_session_terminate_reset and Pyodide ships setInterruptBuffer; neither is used"
},
{
"t": "04:20",
"m": "memory ceiling measured at ~80M edges (29-35 bytes/edge against a 4 GB wasm32 space) and past it the failure is silent heap corruption, not a clean OOM"
},
{
"t": "04:20",
"m": "34% of decode wall time is spent marshalling channels no decoder reads; supplying empty arrays for them cuts 12.49s to 8.26s with byte-identical output"
},
{
"t": "04:20",
"m": "32-bit sample ceiling undocumented: Int32Array throughout means 2^31 samples, which at this device's 200 MSa/s is a 10.7 SECOND capture"
},
{
"t": "04:20",
"m": "the 125 figure is a union across two eof modes; in the mode the product actually ships, it is 124 and 'parallel' disagrees with sigrok-cli"
},
{
"t": "04:20",
"m": "critic verified 131 decoders are genuinely unmodified stock (diff -r against upstream 71f4514, zero content differences) and that wait() semantics survive 28/28 adversarial cases byte-identical"
},
{
"t": "05:30",
"m": "RETRACTED: channels 8-15 were never floating. They are wired to the generator's protocol pins sitting at idle levels - UART idles high, SPI mode 0 idles low, CS active-low idles high, I2C idles released. Seven for seven"
},
{
"t": "05:30",
"m": "real channel map measured: D8=GP16 marker, D9=GP17 UART, D10/11/12=SPI SCK/MOSI/CS, D13=SCL, D14=GP8, D15=SDA. GP9-15 and GP18 genuinely unprobed"
},
{
"t": "05:30",
"m": "crosstalk theory on D14 killed: driving GP8 alone gave exactly 12500 edges on D14 at 1 MHz with zero activity elsewhere. It is a real wire"
},
{
"t": "05:30",
"m": "UART/SPI/I2C captured through the analyzer on STOCK firmware and decoded correctly: 'Hello', de ad be ef, and an I2C write to 0x50. No firmware change was needed"
},
{
"t": "05:30",
"m": "captures preserved in reference/hwcaptures/ and independently re-decoded before the agent's /tmp copies could be cleaned"
},
{
"t": "06:10",
"m": "data round 2: all advantages corrected DOWN - query 2.7x->1.93x, edges() idle 69x->34.1x, sparse 36x->17.1x. Planar's absolutes barely moved; the inflation was entirely in the denominators"
},
{
"t": "06:10",
"m": "it also corrected a figure in its own disfavour: interleaved's win at 1000 columns was published as 1.2x, actually 1.85x"
},
{
"t": "06:10",
"m": "real operating point measured: 0.87 ms/frame at 1000 columns, 3.51 ms at 3200 - consistent with the renderer's independently measured 4.1 ms"
},
{
"t": "06:10",
"m": "OPEN CONFLICT: renderer measured full zoom-out at 4.2x the pan phase; the store measures 1.2x at 3200 columns and 0.7x at 1000, i.e. panning is worse at 1000. Unresolved, flagged by both sides"
},
{
"t": "06:10",
"m": "bench no longer deletes anything - both rm -rf lines removed, timestamped run directories, artifacts retained. Two runs now on disk"
},
{
"t": "06:10",
"m": "instrument correction: its new absolute machine reference was itself confounded by JIT tier on first use (17.8 ms -> 1.3 ms). A residual phase-1/phase-2 gap it could NOT isolate is handled by never dividing across phases"
},
{
"t": "07:05",
"m": "SATURATION SETTLED: against the 120s capture the screenshot actually shows, we saturate to exact 1.0000 on all 16 channels, identical to a mature commercial tool. There was never a discrepancy - it was our 5s render against their 120s screenshot"
},
{
"t": "07:05",
"m": "ZOOM-VS-PAN CONFLICT RESOLVED: renderer WITHDREW its 4.2x. It had compared a static 100M redraw against a panning 1M view - two variables. With pan rate and columns fixed it is 1.7x, matching the store's shape"
},
{
"t": "07:05",
"m": "drop detector fixed and controlled: injecting a 10ms stall into 10% of frames, the old criterion reported 0.00% and the new one reports 10.0%. Real figure is 1.67% of zoom frames over budget"
},
{
"t": "07:05",
"m": "per-row heights implemented; measure-screenshot.py's mode() bug fixed - it had printed '98 vs 98 match' for a screenshot containing 13 rows at 98 and 2 at 138"
},
{
"t": "07:05",
"m": "store.query cross-checked: renderer reads 3.42-3.61 ms, data builder independently measured 3.51 ms through a different path"
},
{
"t": "07:05",
"m": "contention gate now flags CONTENDED on both recent runs (15.1%, 25.6%), so all absolute ms figures are marked indicative rather than certified"
},
{
"t": "08:15",
"m": "MUTATION VERIFIED: forcing every annotation class to 0 now turns the harness RED, as does dropping text variants. Both left the old harness 6/6 green. Exit code non-zero on mismatch"
},
{
"t": "08:15",
"m": "THREE HARNESS BUGS found while widening it, all silently weakening results: a watchdog storing Date.now() in an Int32Array (wraps, fired instantly), a worker using require() in an ESM package (died at startup, so no timeout existed), and a json.dumps that CORRUPTED millions of annotations - previously misreported as 3 shim failures"
},
{
"t": "08:15",
"m": "decode is now bounded and cancellable: cancel honoured in 62 ms via Pyodide's interrupt buffer, worker reusable afterwards, terminate() no longer one-way"
},
{
"t": "08:15",
"m": "throughput dispute settled by measuring both sides on the same 5s workload: 7089 ms browser vs 2300 ms native = 3.0x. The old 2.3x came from a capture 10x smaller"
},
{
"t": "08:15",
"m": "honest limit stated rather than implied: texts[1..n] is not observable in any sigrok-cli output, so variants are checked against literal lists parsed from upstream .py at put() call sites, not differentially"
},
{
"t": "08:15",
"m": "builder disagreed with its own earlier work: describe() no longer synthesizes annotation_rows, because libsigrokdecode returns an empty list when the member is absent. The old synthesis was an invention"
},
{
"t": "09:40",
"m": "THE APPLICATION EXISTS. Live capture from the SLogic16 U3 through the browser: 16ch at 16 MSa/s, 4,800,000 samples in 460 ms, live edge followed while streaming"
},
{
"t": "09:40",
"m": "decoder on REAL signal end to end: i2c on D13/D15 gave 2,178 annotations in 22 ms, bubble reads 'Address write: 50' against a generator commanded i2c 100k 0x50 00 ff - known-answer match"
},
{
"t": "09:40",
"m": "key finding: a mature commercial tool inserts the annotation lane ABOVE the trace band and leaves the band height alone. Passing tall rows to the renderer would have stretched the trace in exactly the rows a critic checks"
},
{
"t": "09:40",
"m": "LOST on time-to-interactive: 167 ms at 5s (vs 146) but 528 ms at 120s (vs 151). The bar grows 1.03x with size, we grow 3.2x. Cause is architectural - we resample into a full store at load"
},
{
"t": "09:40",
"m": "chrome geometry verified band for band against a mature commercial tool, with a measuring tool carrying two controls: recover a known synthetic layout exactly, and detect a 20px shift"
},
{
"t": "03:31",
"m": "RLE import store landed: imports stay transitions instead of expanding into planar. Load O(edges) not O(samples) - bin120 store build 18.2 ms vs 3169.9 ms planar, byte-identical edges and queries on both reference captures"
},
{
"t": "03:31",
"m": "bin120 no longer reduced: loads at its 10 MSa/s grid rate with a 1.2e9-sample virtual length (old 1 MSa/s clamp was the planar sample budget, which is gone for imports)"
},
{
"t": "03:31",
"m": "gap contract closed on the store/render side: SampleStore.noteGap + bit3 in ColumnView.packed; renderer draws NO_DATA for gap columns (shader + cpuRaster); edges() filters gap transitions. Data suite 28/28, four mutations each turn it red. Device dropout wiring still pending - noteGap has no live producer. Known hole: .lwcap save/load rebuilds levels from gap-filtered edges, so an odd edge count inside a gap inverts every level after it"
},
{
"t": "03:31",
"m": "open-time re-benchmarked in real Brave over CDP: 11 ms median at 5 s, 30 ms at 120 s (app-side performance.now), against a mature commercial tool's 146/151. The bar is beaten 5-13x and the 3.2x size-growth loss is dead. Report: /tmp/slogicweb-ui/report.json"
},
{
"t": "03:31",
"m": ".lwcap v2 persists gap spans (magic LWCAP2, gapCount in the reserved slot); v1 files load as gapless; corrupt spans throw. Pinned by src/ui/tools/lwcap-selftest.ts (5/5, mutation-checked)"
},
{
"t": "03:31",
"m": "device reports mid-run short transfers as dropouts: start(cfg, sink, onDropout(samplePosition, missingSamples)). Offline harness pins the position at the END of the short transfer (255948 with 50 missing). Hardware still shows zero short transfers. NOT wired to the store: the lost samples are never appended, so the span has zero width in store coordinates and app.ts records nothing - noteGap has no live producer"
},
{
"t": "03:31",
"m": ".sr loader landed: sigrok sessions load into the edge store (zip reader, deflated + stored, v1/v2 naming, logic-only). All three hwcaptures open, and an independent 8N1 framer in the suite recovers the generator's 'Hello' from uart.sr's D9 - the whole zip->edges path is known-answer-proven. 12/12, mutation-checked"
},
{
"t": "16:43",
"m": "gap parity corruption fixed: saveLwcap and RleSampleStore.fromStore rebuilt channels from the gap-filtered edges(), so a gap swallowing an ODD number of edges inverted every level from the gap's end to the end of the capture - on known data the source store had right. Both now go through channelAcrossGaps (src/data/gaps.ts): ask the source store for the level at each gap's end, insert one synthetic edge at endSample-1 when the filtered list disagrees. MEASURED before: channels 1 and 2 (odd counts) inverted, the other 14 (even) did not; after: 0/2 and 0/14. Mutation-checked both ways - neutering the fixup turns both suites red, and placing the edge at endSample instead throws 'edges are not strictly increasing' because a real edge already sits there. Why it survived two rounds: both suites guarded with c1 <= G0 AND the data suite's channel list [0,5,12,15] had zero overlap with the odd-parity channels [1,2,11], so removing the guard alone left it green"
},
{
"t": "15:10",
"m": "throughput measured at every capture width, not just 16 ch. The three advertised ceilings (4x800, 8x400, 16x200 MS/s) are one 400 MB/s wire budget divided by the bit width, and the device holds it at all three: 399.4 / 398.3 / 399.5 MB/s, zero short transfers. PREDICTION FALSIFIED: I predicted 4ch@800MHz would fall short because expandPacked must unpack 400 MB/s of wire into 800 MB/s in a scalar JS loop. It does not - sink/raw is exactly 2.0000, so the loop really delivered 2.39 GB in 3.0 s = 799 MB/s. I asserted a cost was prohibitive without computing it (~5 cycles/iteration at 4 GHz). device/NOTES.md P3 records the identical error, so this is the second time; logged as P5. Still no WebUSB ceiling in evidence"
},
{
"t": "17:05",
"m": "dropout consumer wired (appendLostSamples in src/data/gaps.ts). It was dead for two rounds and the cause was structural, not a bad guard: with no samples appended the lost span has zero width in store coordinates, so there was nothing for noteGap to mark. Decision taken - append filler for the lost samples so the store's axis keeps tracking device time. The filler repeats the LAST KNOWN SAMPLE rather than zeroing; zeros invent a rising edge at the gap's end, which sits outside the gap where edges() reports it as real (MEASURED: exactly 16 spurious edges, 1 per channel). Pinned end to end in offline-test.ts: 383948 delivered + 50 lost = store length 383998, one gap at [255948, 255998). Mutation-checked both ways - zeroed filler turns the edge check red, skipping the append throws 'gap [255948,255998) outside 0 <= start < end <= 255948', which is the zero-width problem stating itself. Lost-sample count now shows in the capture panel while recording. Hardware has still never produced a short transfer, so this runs only against the scripted device"
},
{
"t": "21:15",
"m": "USB transport moved into a Dedicated Worker (318fe2f), which is the libsigrok shape - URBs reaped on a thread that has nothing else to do, so a 20-38 ms page stall cannot starve a 19.6 ms queue at 32ch/200M. The worker transfers each chunk's buffer and does not refill that URB slot until the page acks, so the existing lagChunks bound still holds; requestDevice stays a page gesture and the worker finds the grant via getDevices(), falling back to the in-page transport with the reason recorded when it cannot. One bundling trap found and contained: './usbWorker.ts?worker&inline' is a Vite-only specifier and importing it from workerTransport.ts broke the offline suite's esbuild bundle (exit 1, no test output) - it now lives only in usbWorkerSpawn.ts, installed through installUsbWorkerSpawn(), so device/ is esbuild-bundlable again. Verified with no board: 139 offline checks (18 new), tsc/vite/dist/single-file portable smoke all clean, and in the real browser the worker spawned and answered in 11 ms with 'the 359f:3032 device is not visible to this worker'. BLOCKER: the 32U3 is off the bus and needs a physical replug before any of this can be measured against libsigrok at 100M/200M"
},
{
"t": "22:40",
"m": "Worker transport made honest and measurable (d99929b, dff4219, 8c1568e). The window the split buys, now arithmetic instead of a claim: each transfer is 7.82 ms of device time at 32ch/100M and 3.91 ms at 200M, so depth 5 covers 19.6 ms on the page - the completion callback IS the re-arm and a blocked page cannot run it - while the worker keeps reaping until completed+inFlight hits lagChunks=20, which is 78.2 ms at 200M / 156.5 ms at 100M for 62.6 MB. 4x the old window against the 38.1 ms worst stall measured here. Diagnostics fixed to match: threadLabel is passed as 'worker' by the page transport and is sticky (bench restarts the loop without options), so an abort can no longer call the worker's thread 'the page thread'; the page runs its own LoopStallWatch for every capture (pageStallMaxMs/pageStalls) and appends its line to a bench reply, because the worker's reply can only describe the worker. 143 offline checks. Re-read protocol.c (8.21): training probe, timeout_count_limit = num_transfers_used, re-arm pushed to an unbounded GAsyncQueue before the consumer sees it - all confirmed against this transport. The one mechanism with no WebUSB equivalent is libusb's per-transfer timeout (protocol.c:405, ~36 ms at 200M) that turns a half-dead pipe into slow transfers the abort rule catches; WebUSB transferIn has no timeout, so a transfer the device never fills stays pending until release. That is a fidelity gap, not a tuning one, and the first suspect if hardware shows transfers stopping with no error. 32U3 still absent from the bus (only 359f:4201 thermal camera and a Sipeed CMSIS-DAP probe are attached); one physical replug unblocks the 100M/200M comparison"
},
{
"t": "23:50",
"m": "The 32ch/200M claim is now measured, not argued (02f2a1f, NOTES 8.22). Built a board-free A/B: ClockStreamDevice samples on its OWN clock with a FIFO, which the offline suite's scripted device cannot do - there, transferIn completes when the host asks, so a host that stops reading is never punished - and tools/windowHarness.ts runs both transports against it with the shipping driver, the shipping createSampleStore and the capture panel's sink, injecting a page stall that stands in for the 38 ms append+GC. Result at 2 s of 32ch/200M with a 40 ms stall every 300 ms: page transport aborts 97 ms in at 546 MB/s (its own message: 'the page thread was blocked, worst 46.8 ms, the queue covers 19.6 ms'); worker transport delivers all 517 transfers at 100.0% of 800 MB/s, 0 short, 0 slow, 0 lost, while the page was blocked 38.4 ms. Sweep of the worker arm finds the edge at 80 ms (clean at 60, losing data at 80 and 100, aborts at 120) - the same number 8.20 derived from lagChunks x transfer arithmetic, now measured by a device counting the milliseconds it had nothing to fill. The harness caught two of its own errors on the way, both recorded: it first used PlanarSampleStore instead of createSampleStore (32 channels are interleaved in the app; planar costs 8.5 ms against a 3.9 ms budget) and the scripted device first generated 3.13 MB through a 25 MB boxed number array (165 ms per chunk). Also re-confirmed 100M as the control: both arms complete at 399.4 MB/s. 143 offline checks, tsc/build green. 32U3 still off the bus; the hardware comparison still needs a physical replug"
},
{
"t": "10:05",
"m": "The tool that measured the 32ch/200M question was the thing breaking the board (9f8df1d, 017adbd, NOTES 8.23). The 32U3 came back on the bus today (Bus 002 Device 108, 359f:3032, S/N 202608052052) and the first hardware number was a good one: `bench 2 32 100` through the worker, on the page's own device grant, held 398.0 MB/s of 400 - 255 transfers, 0 short, 0 slow, longest idle gap 0.00 ms, page thread never blocked - which answers 8.19's open question (a Dedicated Worker does see a page-granted device) on real hardware. Then `bench 2 32 200` failed three times in a row and a 0.3 s/100M run afterwards delivered 0 bytes: the board was wedged. Cause found in the bench itself, and it is exactly the failure NOTES 8.6 describes: bench waited out its duration and then called stop() on a device that was STILL PRODUCING, so the host cut a live producer off, the FIFO overran, and the bulk endpoint went silent until a replug. A measuring tool must not be the thing that breaks the device. Two consequences: (1) the three 200M failures are not evidence about 200M - the board had already been through a 100M bench that ended by cutting it off, so 200M has to be taken FIRST on a freshly replugged board; (2) the 200M failure was reported as 'the worker answered with no console result', because the worker's {kind:'failed'} message was being replaced by a sentence about the reply's shape - both usbControl and getStats now re-throw the worker's own sentence (that one is verified on the wedged board in the page: 'delivered no data within 578 ms of RUN ... unplug it'). Fixes: bench arms R32_SAMPLE_LEN with the requested sample count and waits seconds+400 ms before stop, so the device ends the run itself; and stop() now recognises a device that already delivered everything its verified limit allowed and releases the interface immediately instead of waiting out STOP_TIMEOUT_MS for tail reads that are NAKs - that is 1.5 s and a release/re-claim pair saved on every timed capture the device finished, safe because the armed total is the device's own count and can only be matched after the last data-carrying transfer has been consumed. The scripted clock device had to learn to reject its post-limit reads on release the way libusb reports a cancelled URB; handing the driver a promise that never settles is what hung the first version of that check. 147 offline checks (4 new, none lost), tsc/vite build green. The board is wedged right now and answers every control transfer with R32_FLAG=0x00 and nothing on the bulk endpoint; clear-fifo and a CTRL=0 write do not revive it, so it needs a physical replug before the 200M-first measurement (script ready: /tmp/lwcdp/_hw.js)"
},
{
"t": "10:40",
"m": "The fixed 32ch@200M measurement, and the tool that has to answer the rest (cb20938, 738a2f3, 82f1a9a, 680b89a, ed5f146, NOTES 8.24). On a freshly replugged board (device 109) the simplest possible configuration - `bench 1 32 200`, worker transport, no sink, pure pipe - gives steady 532.5 MB/s of 800 with read p50 6.00 ms against the device's own 3.91 ms, 0 short reads, rearm p50 0.10 ms, maxIdleGap 0 and 0 thread stalls: nothing on this side is waiting, the time is inside Chromium's USB path between the device filling a read and this transport being handed it. The control is libsigrok on the same board, port and machine: nat.200m-8000ms delivered exactly 6,400,000,012 bytes in 8 s (800 MB/s, 2046 transfers, 0 transfer timeouts) and 32ch@100M delivered 1,200,000,012 bytes in 3 s, so the device, the link and the port are not the difference. The browser does reach 32ch@100M (398.0 of 400 MB/s measured in the worker) and does not reach 32ch@200M. Every browser attempt at 200M still ends with the board wedged - including with the device-side length limit armed and the fixed bench - because the device offers 800 while the host drains ~530, so the backlog outruns the FIFO before any abort rule can fire; recovery is a physical replug, and `bench 0.5 16 50` (100 MB/s) then delivers nothing. Software recovery was tried on this wedge state and does not exist: CTRL.RST (which the shipping driver never writes) leaves FLAG=0x00 and the pipe silent, clear-fifo has nothing latched to clear, and 4ch@10M delivers 0 bytes. The open question 8.7 left is now the only one that matters - is that ~500 MB/s a per-read cost (a turnaround a different read size or depth amortises) or a per-byte cost in Chromium's copy chain (in which case no geometry reaches 800 and 32ch/200M is out of reach for WebUSB on this host)? The instrument is now in the repository: `bench` takes [depth] [transferBytes] and reports the geometry it measured, its seconds floor is 5 ms (20 ms at 32ch/200M is 16 MB, inside the 15.6 MiB of reads already in flight), and `npm run bench:geometry` sweeps libsigrok's own probe geometry plus the largest reads that fit the 16 MiB usbfs budget plus four size/depth trades, each as repeated slices capped at 80% of the queued-read budget so a run that measures a host slower than the device cannot overrun the FIFO and cannot cost a replug. The 100M geometry is the method control. 151 offline checks green (4 new), tsc/build green. Also worth recording: only Chromium implements WebUSB on this machine (Firefox 155 has no WebUSB), so the product's ceiling is Chromium's USB path, not a choice of browser. Blocked on one physical replug to run the sweep."
},
{
"t": "10:25",
"m": "Chromium's own source answers the *shape* of the 32ch/200M question, and the sweep now carries the one geometry that could still pay (NOTES 8.25). A `transferIn` above 64 KiB is copied twice by construction: the device service allocates a fresh RefCountedBytes per call, feeds the reply as a mojo_base::BigBuffer, and BigBuffer's span constructor 'Always copies the contents of |data| into some internal storage' - and above kMaxInlineBytes = 64 KiB that storage is a fresh shared memory region whose pages the kernel zeroes on first touch; the renderer then does DOMArrayBuffer::Create(data), the second full copy. That is a per-BYTE tax, and 8.24's numbers fit it exactly: 6.00 ms observed minus the device's 3.91 ms is 2.09 ms for 3,129,344 B = 0.68 us/KiB, and a per-byte tax at that rate gives 1/(1/800MBps + 0.68us/KiB) = 521 MB/s at *any* read size, against 532.5 MB/s measured. A per-READ tax would have shown a curve climbing toward 800 instead. So `npm run bench:geometry` gained four rows that bracket the threshold at equal queue size - 32 x 131072 (just over) against 64 x 65536 (inline, same 4 MiB), plus 120 x 65536 and 200 x 65536 - because 64 KiB and below never leaves the mojo message and is the only read size the two hypotheses disagree about; every earlier row was 782,336 B and above. Same source, second bound: kWebUSBTransferSizeLimit (on by default) refuses any single transfer over 32 MiB, so 'one enormous read' tops out at 32 MiB even with usbfs_memory_mb raised - still ~520 MB/s at that per-byte rate. If the 64 KiB rows come back at ~530 the answer for the product is 32ch/100M over WebUSB plus a native backend for 200M (the user's own AppImage is already that backend); if they jump, the transport switches to <=64 KiB reads with a deep queue and the per-chunk cost in the app (12,500 chunks/s into the store) becomes the next thing to fix by batching. 151 offline checks, tsc and vite build green. Still blocked on one physical replug: device 109 is in 8.8's W1 state (0 bytes at every rate), and CTRL.RST, clear-fifo, clearHalt on EP 0x82, USBDevice.reset() and a raw USBDEVFS_RESET on the usbfs node were all tried again on it this session without bringing the pipe back."
},
{
"t": "11:20",
"m": "The browser's ceiling was never the line rate: it is 1 MiB, and WebUSB on this host DOES receive 32ch/200M continuously once the reads are under it (e141170, NOTES 8.26). The instrument was the wedge itself - the board's sampler is dead (W1) but `aux 5 = 1` (RB_TEST_UPLOAD, the vendor's USB-max-speed mode) still pushes bytes through EP 0x82, so `bench` now takes a sixth word for the source and `bench 0.5 32 200 200 65536 usbmax` measures the HOST with a free-running producer. Swept with the queue held at 12 MiB: 64 KiB x 200 = 927 MB/s, 128 KiB = 967, 256 KiB = 927, 512 KiB = 909, 768 KiB x 16 = **1,599,602,688 B in 1649 ms = 970 MB/s over two seconds** (2034 calls, 0 short, 0 slow, 0 idle gap), 956 KiB = 921 - and then 1 MiB = 477-533 MB/s, 1.25 MiB = 510, 1.5 MiB = 526, libsigrok's own 3,129,344 B = 396: all four aborted by the transport's own watchdog. A step at a power of two, both sides page multiples, queue budget fixed, is a per-allocation threshold in Chromium's path (the fresh device-service buffer, the shared-memory BigBuffer copy, the renderer's DOMArrayBuffer copy - 8.25), i.e. exactly what a reused libusb transfer never pays and why libsigrok reaches 800 MB/s with the same reads. `deriveStreamTuning` now keeps libsigrok's geometry below a 500 MB/s line rate and uses 768 KiB x 16 above it, and a new coalesceBytes delivers 8 MiB blocks to the sink because the interleaved store costs ~1.2 ms per append whatever its size (768 KiB -> 0.775-1.452 ms, 3.13 MB -> 2.185 ms, 8 MiB -> 5.025 ms) - per-read delivery would ask it for 1.5 s of work per second of data. End to end through the shipping app on the same board, 32ch/200M now receives 134,217,728 B (16 blocks) before the watchdog aborts at 648-654 MB/s, against 14 MB at 104 MB/s before the change; stubbing the frame loop's draw() moves it 510 -> 654 MB/s, so ~145 MB/s of the page's budget is the live renderer and the rest is the store (sink p95 7.2 ms per 8 MiB append, peakQueued 63 of 64). The pipe is no longer the limit - the page is - and that is the next piece of work, app-side. 155 offline checks green (4 new: the geometry gate, the coalescing block sizes, the byte stream through coalescing, the tail flush), tsc green. Still unmeasured: the real sampler at 32ch/200M (the raw upload's rate is not the sampler's), which needs the replug 8.24 has been waiting for - the watcher is still armed and will run the sweep on its own."
},
{
"t": "11:20",
"m": "The queue was bounded by the consumer, and that is what wedged the board (fix in progress, NOTES 8.27). Device 002:112 through the shipping app: 32ch/100M got 12,517,372 B then aborted at 374 MB/s of the 400 the device offers, with peakQueued 17 of the 20-chunk lag cap the loop stops refilling at - the device was left with an empty queue and its FIFO overran, which is what libsigrok's own resubmit rule (bounded by samples_need_nbytes, never by the consumer, protocol.c:395) exists to prevent. The page was never the slow side: with a worker posting at the line rate and no device at all, the app's store + live view delivered 792 MB of 800 at 32ch/100M (ratio 0.99, 27% store duty) and 1602 of 1600 at 32ch/200M (1.001, 50% duty); the store alone absorbs 1584/1418 MB/s, and one 32-channel store held 6.7 GB = 8.39 s at 200 MSa/s before anything failed. Method note: a page setTimeout pump runs at 40 ms instead of 8 while a capture draws, with the profile 73% idle - headless Chrome gates timer tasks on the compositor, so a worker posting chunks is the model that behaves like a USB completion. Fix: refills are bounded by the capture's own length when deviceSampleLimit is set (timer mode), the lagChunks cap remains only for captures with no length (software trigger) and now traces when it is what stopped the refill. +4 offline checks (159 total), tsc clean. Watcher armed for the next replug: real 32ch/100M, 32ch/200M, 32ch/200M 5 s and 32ch/100M 10 s, then the short-capture anomaly, then the sweep."
}
],
"updated": "The browser's bulk IN ceiling is 1 MiB, not the line rate: with reads under it, WebUSB on this host drained 1,599,602,688 bytes in 1649 ms (970 MB/s for two seconds) from the device's raw upload, while 1 MiB, 1.5 MiB and libsigrok's own 3,129,344 B reads abort at 477-533, 526 and 396 MB/s. deriveStreamTuning now uses 768 KiB x 16 above a 500 MB/s line rate and coalesces into 8 MiB sink blocks, because the store costs ~1.2 ms per append whatever its size. End to end at 32ch/200M the shipping app now takes 134,217,728 B before the watchdog aborts at 648 MB/s - the pipe is no longer the limit, the page is (store 5.0 ms per 8 MiB append, live renderer ~145 MB/s of budget). Still needs the replug to measure the real sampler. Since then the consumer bound turned out to be the thing that wedged the board: the read loop stopped refilling at 20 queued chunks while the page was 17 behind, the device was left with no reads, and its FIFO overran. Refills are now bounded by the capture's own length, the driver's rule, with the consumer cap kept only for captures that have no length (software trigger); the page measured 99-100% of both line rates on its own, so it was never the slow side. 159 offline checks green. Waiting on a replug for the real 32ch/100M and 32ch/200M captures"
}