-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathpython-results.html
More file actions
465 lines (439 loc) · 26.3 KB
/
Copy pathpython-results.html
File metadata and controls
465 lines (439 loc) · 26.3 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
464
465
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>LLM Test-Gen Benchmark — Scorecard Results</title>
<script src="https://cdn.jsdelivr.net/npm/chart.js@4.4.1/dist/chart.umd.min.js"></script>
<style>
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
background: #0f1117; color: #e1e4e8; padding: 40px; min-height: 100vh;
}
h1 { font-size: 26px; font-weight: 600; margin-bottom: 6px; color: #fff; }
.subtitle { color: #8b949e; margin-bottom: 36px; font-size: 14px; max-width: 1000px; line-height: 1.6; }
.wrap { max-width: 1240px; margin: 0 auto; }
code { font-family: 'SF Mono','Fira Code',monospace; background: #1f2937; padding: 1px 5px; border-radius: 3px; font-size: 0.92em; color: #e3b341; }
section { margin-bottom: 56px; }
section > h2 {
font-size: 19px; font-weight: 600; color: #fff; margin-bottom: 6px;
padding-bottom: 8px; border-bottom: 1px solid #30363d;
}
section > .sec-note { font-size: 13px; color: #8b949e; margin: 10px 0 22px; line-height: 1.6; max-width: 1000px; }
/* Decomposition hero */
.decomp { display: flex; align-items: stretch; gap: 0; flex-wrap: wrap; }
.decomp .arm {
flex: 1; min-width: 200px; border: 1px solid #30363d; border-radius: 12px;
padding: 22px 24px; background: #161b22; text-align: center; position: relative;
}
.decomp .arm .tally { font-size: 52px; font-weight: 700; line-height: 1; }
.decomp .arm .tally small { font-size: 24px; color: #8b949e; font-weight: 500; }
.decomp .arm .arm-name { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 14px; }
.decomp .arm .arm-desc { font-size: 12px; color: #8b949e; margin-top: 10px; line-height: 1.5; }
.arm.coverage .tally { color: #d29922; } .arm.coverage .arm-name { color: #d29922; }
.arm.ablation .tally { color: #58a6ff; } .arm.ablation .arm-name { color: #58a6ff; }
.arm.quality .tally { color: #3fb950; } .arm.quality .arm-name { color: #3fb950; }
.decomp .gap {
flex: 0 0 150px; display: flex; flex-direction: column; align-items: center;
justify-content: center; padding: 0 6px; text-align: center;
}
.decomp .gap .delta { font-size: 22px; font-weight: 700; color: #fff; }
.decomp .gap .arrow { font-size: 28px; color: #444c56; line-height: 1; }
.decomp .gap .what { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 4px; }
.decomp .gap .lever { font-size: 11px; color: #8b949e; margin-top: 4px; line-height: 1.4; }
.gap.prompt .what { color: #58a6ff; }
.gap.model .what { color: #3fb950; }
/* Controls + legend */
.controls {
display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin-bottom: 22px;
background: #161b22; border: 1px solid #30363d; border-radius: 10px; padding: 14px 18px;
}
.controls label { font-size: 13px; color: #8b949e; font-weight: 600; }
select {
background: #0d1117; color: #e1e4e8; border: 1px solid #30363d; border-radius: 6px;
padding: 7px 12px; font-size: 13px; font-family: inherit; cursor: pointer;
}
.legend { display: flex; gap: 16px; flex-wrap: wrap; margin-left: auto; }
.legend .item { display: flex; align-items: center; gap: 6px; font-size: 12px; color: #8b949e; }
.legend .sw { width: 14px; height: 14px; border-radius: 3px; }
.sw.base { background: #475569; } .sw.r1 { background: #d29922; } .sw.rb { background: #58a6ff; } .sw.r2 { background: #3fb950; }
/* Axis small-multiples grid */
.axis-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
@media (max-width: 1100px){ .axis-grid { grid-template-columns: repeat(2,1fr);} }
.axis-card {
border: 1px solid #30363d; border-radius: 10px; background: #161b22; padding: 14px 14px 8px;
}
.axis-card .ah { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 2px; }
.axis-card .atitle { font-size: 13px; font-weight: 600; color: #e6edf3; }
.axis-card .dir { font-size: 10px; font-weight: 700; padding: 2px 6px; border-radius: 4px; white-space: nowrap; }
.dir.lower { background: #1a3a2a; color: #3fb950; }
.dir.higher { background: #1f3a5f; color: #58a6ff; }
.axis-card .afull { font-size: 11px; color: #768390; line-height: 1.4; min-height: 30px; margin-bottom: 6px; }
.axis-card .cbox { position: relative; height: 132px; }
.axis-card .verdict { font-size: 11px; color: #8b949e; margin-top: 6px; text-align: center; }
.v-win { color: #3fb950; font-weight: 600; } .v-loss { color: #f85149; font-weight: 600; } .v-tie { color: #768390; }
/* W/L/T matrix */
table { border-collapse: collapse; width: 100%; font-size: 13px; }
.matrix th, .matrix td { border: 1px solid #30363d; padding: 8px 10px; text-align: center; }
.matrix th { background: #161b22; color: #8b949e; font-weight: 600; }
.matrix td.wt { text-align: left; font-family: 'SF Mono','Fira Code',monospace; font-size: 12px; color: #c9d1d9; background: #11151c; }
.cell-yes { background: rgba(63,185,80,0.14); color: #3fb950; font-weight: 600; }
.cell-no { background: rgba(248,81,73,0.12); color: #f85149; font-weight: 600; }
.matrix .wlt { font-size: 10px; color: #768390; display: block; margin-top: 2px; font-weight: 400; }
.matrix tfoot td, .matrix .totalrow td { background: #161b22; font-weight: 700; color: #fff; }
/* Coverage floor */
.cov-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 24px; align-items: start; }
@media (max-width: 900px){ .cov-grid { grid-template-columns: 1fr; } }
.cov-chart-box { border: 1px solid #30363d; border-radius: 10px; background: #161b22; padding: 16px; height: 320px; position: relative; }
.callout { border: 1px solid #5a3a1a; background: #2b1d0e; border-radius: 10px; padding: 16px 18px; }
.callout h3 { font-size: 14px; color: #e3b341; margin-bottom: 8px; }
.callout p { font-size: 12.5px; color: #c9b88a; line-height: 1.6; }
.callout strong { color: #f0883e; }
/* Changes table */
.changes th, .changes td { border: 1px solid #30363d; padding: 10px 12px; text-align: left; vertical-align: top; font-size: 12.5px; line-height: 1.5; }
.changes th { background: #161b22; color: #8b949e; font-weight: 600; position: sticky; top: 0; }
.changes td.chg { color: #e6edf3; font-weight: 500; width: 24%; }
.changes td.find { color: #8b949e; width: 18%; }
.changes td.pred { color: #8b949e; width: 26%; }
.changes tr:nth-child(even) td { background: #11151c; }
.out { font-weight: 700; white-space: nowrap; }
.out.ok { color: #3fb950; } .out.partial { color: #e3b341; } .out.proc { color: #58a6ff; }
.changes td.outcome small { display:block; font-weight: 400; color: #768390; margin-top: 3px; white-space: normal; }
.notes { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 900px){ .notes { grid-template-columns: 1fr; } }
.note { border: 1px solid #30363d; border-radius: 8px; padding: 16px; background: #161b22; }
.note h3 { font-size: 13px; color: #fff; margin-bottom: 8px; }
.note p, .note ul { font-size: 12px; color: #8b949e; line-height: 1.6; }
.note ul { padding-left: 16px; }
.footer { color: #586069; font-size: 11px; margin-top: 40px; border-top: 1px solid #21262d; padding-top: 16px; }
</style>
</head>
<body>
<div class="wrap">
<h1>LLM Test-Gen Benchmark — Scorecard Results</h1>
<p class="subtitle">
Three OSS Python suites (<code>itsdangerous</code>, <code>httpx</code>, <code>requests</code>) regenerated under
three iteration policies (oneshot / iter2 / iter20), scored on 8 auto-countable quality axes.
Three arms decompose the coverage → quality change into a <b style="color:#58a6ff">prompt effect</b> and a
<b style="color:#3fb950">model effect</b>:
<b style="color:#d29922">coverage</b> = Opus 4.7 + coverage-goal prompts ·
<b style="color:#58a6ff">ablation</b> = Opus 4.7 + scorecard-goal prompts ·
<b style="color:#3fb950">quality</b> = Opus 4.8 + scorecard-goal prompts.
</p>
<!-- ===================== DECOMPOSITION ===================== -->
<section>
<h2>Headline: prompt redesign dominates, model bump is a top-up</h2>
<p class="sec-note">Worktrees that beat their own baseline on the auto-countable axes (wins > losses).
Holding the model at 4.7 and only swapping the prompts moved <b>+6</b>; the 4.7→4.8 bump added <b>+1</b>.</p>
<div class="decomp">
<div class="arm coverage">
<div class="arm-name">coverage · 4.7 · coverage-prompts</div>
<div class="tally">2<small>/9</small></div>
<div class="arm-desc">Opus 4.7, coverage-goal prompts</div>
</div>
<div class="gap prompt">
<div class="what">Prompt effect</div>
<div class="arrow">→</div>
<div class="delta">+6</div>
<div class="lever">scorecard-goal<br>prompt rewrite</div>
</div>
<div class="arm ablation">
<div class="arm-name">ablation · 4.7 · scorecard-prompts</div>
<div class="tally">8<small>/9</small></div>
<div class="arm-desc">Opus 4.7, scorecard-goal prompts</div>
</div>
<div class="gap model">
<div class="what">Model effect</div>
<div class="arrow">→</div>
<div class="delta">+1</div>
<div class="lever">Opus 4.7 → 4.8</div>
</div>
<div class="arm quality">
<div class="arm-name">quality · 4.8 · scorecard-prompts</div>
<div class="tally">9<small>/9</small></div>
<div class="arm-desc">Opus 4.8, scorecard-goal prompts</div>
</div>
</div>
</section>
<!-- ===================== PER-AXIS BEFORE/AFTER ===================== -->
<section>
<h2>Per-axis: baseline vs generated, across the redesign</h2>
<p class="sec-note">For each axis: the human <b>baseline</b> (gray) and what each arm generated. Watch the
<b style="color:#d29922">coverage</b> bar (old prompts) versus <b style="color:#58a6ff">ablation</b> / <b style="color:#3fb950">quality</b>
(new prompts) — most of the movement happens at the prompt swap. <code>A.2</code> is a noisy proxy (any <code>obj._x()</code> call).
Verdict shown is <b>quality vs baseline</b>.</p>
<div class="controls">
<label for="wtsel">Worktree</label>
<select id="wtsel"></select>
<div class="legend">
<div class="item"><span class="sw base"></span>Baseline</div>
<div class="item"><span class="sw r1"></span>coverage (4.7·coverage)</div>
<div class="item"><span class="sw rb"></span>ablation (4.7·scorecard)</div>
<div class="item"><span class="sw r2"></span>quality (4.8·scorecard)</div>
</div>
</div>
<div class="axis-grid" id="axisGrid"></div>
</section>
<!-- ===================== W/L/T MATRIX ===================== -->
<section>
<h2>Beats-baseline matrix — every worktree, every arm</h2>
<p class="sec-note">✓ = wins more axes than it loses vs baseline. The column totals are the headline tally (2 → 8 → 9).
Sub-text is each cell's win/loss/tie count.</p>
<table class="matrix" id="matrix"></table>
</section>
<!-- ===================== COVERAGE FLOOR ===================== -->
<section>
<h2>The caveat: winning the fragility scorecard ≠ holding the coverage floor</h2>
<p class="sec-note">The matrix above scores fragility axes only. The quality arm's coverage (non-regression floor) tells a
subtler story — the two single-pass <b>oneshot</b> arms regress.</p>
<div class="cov-grid">
<div class="cov-chart-box"><canvas id="covChart"></canvas></div>
<div class="callout">
<h3>Two oneshot arms breach the floor</h3>
<p><strong>httpx/oneshot −6.96 pp line / −14.57 pp branch</strong> and
<strong>requests/oneshot −3.17 / −6.84</strong> regress coverage, yet both still "win" the fragility
scorecard. oneshot is a single pass with no repair — its expected failure mode. Every
<b>iter2 / iter20</b> arm holds or beats the floor (itsdangerous/iter20 +2.35 line, requests/iter20
+3.34 / +3.36). <br><br>Next lever: <b style="color:#e3b341">gate the scorecard tally on the coverage
floor</b> so single-pass wins stop flattering the headline.</p>
</div>
</div>
</section>
<!-- ===================== CHANGES TABLE ===================== -->
<section>
<h2>The changes that were made — and whether they landed</h2>
<p class="sec-note">Each prompt-design change from coverage → quality, the coverage-driven finding that motivated it, its
falsifiable prediction, and the measured outcome.</p>
<table class="changes" id="changes">
<thead><tr><th>Change (coverage → quality)</th><th>Motivating finding</th><th>Falsifiable prediction</th><th>Measured outcome</th></tr></thead>
<tbody></tbody>
</table>
</section>
<section>
<h2>Reading notes</h2>
<div class="notes">
<div class="note">
<h3>What the scorer counts</h3>
<ul>
<li><b>A axes</b> (anti-fragility, lower better): A.1 substring asserts, A.2 private-symbol use, A.4 recomputed crypto, A.5 or-joined matches.</li>
<li><b>B.1</b> fixed-vector asserts (higher better) · <b>C.1</b> real-mock LOC (lower).</li>
<li><b>D.1</b> LOC/test (lower = reuse) · <b>D.2</b> parametrize ratio (higher).</li>
<li>Semantic axes (A.3/A.6/B.2/B.3/E.*) are <i>not</i> auto-counted — this tally is a floor, not the full verdict.</li>
</ul>
</div>
<div class="note">
<h3>Why the deltas are trustworthy even if levels aren't</h3>
<ul>
<li>The auto-scorer is more generous than the coverage-driven hand audit (which judged ~1/9 truly better), so absolute tallies are soft.</li>
<li>But the <i>same</i> instrument scores all three arms, so the prompt-vs-model decomposition holds.</li>
<li>A.2 is the one axis the <b>model</b> moved more than the prompt (118 → 59); A.1/C.1/D.2 were solved by the prompt alone.</li>
</ul>
</div>
</div>
</section>
<div class="footer">
Generated from <code>results-{coverage,ablation,quality}-scorecard.json</code> + <code>results-quality.json</code> ·
changes from <code>CHANGELOG.md</code> + <code>FINDINGS.md</code> (findings 10–14). Single self-contained file; Chart.js via CDN.
</div>
</div>
<script>
// ---- DATA (verified from the scorecard JSONs; baselines identical across arms) ----
const AXES = [
{k:'A1', t:'A.1 substring asserts', dir:'lower', full:'match= / "in str(e)" assertions on exception messages'},
{k:'A2', t:'A.2 private symbols', dir:'lower', full:'Private-symbol imports / obj._x() access (noisy proxy)'},
{k:'A4', t:'A.4 recomputed crypto', dir:'lower', full:'Recomputing expected crypto/encoding inside the test'},
{k:'A5', t:'A.5 or-joined matches', dir:'lower', full:'assert "x" in str(e) or "y" in str(e)'},
{k:'C1', t:'C.1 real mocks', dir:'lower', full:'mock_real LOC — MagicMock / patch( / mocker'},
{k:'B1', t:'B.1 fixed vectors', dir:'higher',full:'Tests pinning an exact expected literal'},
{k:'D1', t:'D.1 LOC / test', dir:'lower', full:'test_loc / test_count (lower = more reuse)'},
{k:'D2', t:'D.2 parametrize ratio', dir:'higher',full:'@parametrize occurrences / test_count'},
];
const BASE = {
itsdangerous:{A1:4,A2:10,A4:10,A5:0,C1:0,B1:0,D1:13.0,D2:0.189},
httpx: {A1:7,A2:22,A4:1,A5:0,C1:0,B1:13,D1:16.56,D2:0.082},
requests: {A1:9,A2:18,A4:0,A5:0,C1:3,B1:6,D1:14.88,D2:0.223},
};
const WTS = [
'itsdangerous/oneshot','itsdangerous/iter2','itsdangerous/iter20',
'httpx/oneshot','httpx/iter2','httpx/iter20',
'requests/oneshot','requests/iter2','requests/iter20',
];
// per arm: gen values + [W,L,T] + better
const GEN = {
coverage:{
'itsdangerous/oneshot': {A1:10,A2:9,A4:10,A5:0,C1:0,B1:2,D1:6.86,D2:0.0, wlt:[3,2,3],better:true},
'itsdangerous/iter2': {A1:10,A2:15,A4:8,A5:1,C1:0,B1:2,D1:6.73,D2:0.0, wlt:[3,4,1],better:false},
'itsdangerous/iter20': {A1:11,A2:8,A4:12,A5:0,C1:0,B1:2,D1:6.88,D2:0.0, wlt:[3,3,2],better:false},
'httpx/oneshot': {A1:9,A2:5,A4:0,A5:0,C1:0,B1:6,D1:9.34,D2:0.002, wlt:[3,3,2],better:false},
'httpx/iter2': {A1:16,A2:13,A4:0,A5:0,C1:0,B1:6,D1:10.22,D2:0.0, wlt:[3,3,2],better:false},
'httpx/iter20': {A1:7,A2:23,A4:1,A5:0,C1:0,B1:13,D1:16.56,D2:0.078, wlt:[0,2,6],better:false},
'requests/oneshot': {A1:1,A2:30,A4:0,A5:0,C1:0,B1:6,D1:6.81,D2:0.0, wlt:[3,2,3],better:true},
'requests/iter2': {A1:1,A2:42,A4:0,A5:0,C1:29,B1:4,D1:8.24,D2:0.0, wlt:[2,4,2],better:false},
'requests/iter20': {A1:0,A2:40,A4:0,A5:0,C1:1,B1:4,D1:7.4,D2:0.0, wlt:[3,3,2],better:false},
},
ablation:{
'itsdangerous/oneshot': {A1:0,A2:6,A4:5,A5:0,C1:0,B1:2,D1:15.23,D2:0.114, wlt:[4,2,2],better:true},
'itsdangerous/iter2': {A1:0,A2:10,A4:6,A5:0,C1:0,B1:1,D1:12.37,D2:0.202, wlt:[5,0,3],better:true},
'itsdangerous/iter20': {A1:0,A2:15,A4:10,A5:0,C1:0,B1:8,D1:15.92,D2:0.252, wlt:[3,2,3],better:true},
'httpx/oneshot': {A1:4,A2:11,A4:0,A5:0,C1:0,B1:17,D1:10.61,D2:0.047, wlt:[5,1,2],better:true},
'httpx/iter2': {A1:3,A2:13,A4:0,A5:0,C1:0,B1:12,D1:11.45,D2:0.086, wlt:[5,1,2],better:true},
'httpx/iter20': {A1:2,A2:16,A4:0,A5:0,C1:1,B1:15,D1:13.65,D2:0.088, wlt:[6,1,1],better:true},
'requests/oneshot': {A1:0,A2:28,A4:0,A5:0,C1:0,B1:2,D1:8.82,D2:0.104, wlt:[3,3,2],better:false},
'requests/iter2': {A1:0,A2:12,A4:0,A5:0,C1:0,B1:6,D1:8.7,D2:0.094, wlt:[4,1,3],better:true},
'requests/iter20': {A1:0,A2:7,A4:0,A5:0,C1:0,B1:9,D1:11.64,D2:0.224, wlt:[6,0,2],better:true},
},
quality:{
'itsdangerous/oneshot': {A1:0,A2:0,A4:2,A5:0,C1:0,B1:4,D1:11.96,D2:0.268, wlt:[6,0,2],better:true},
'itsdangerous/iter2': {A1:0,A2:1,A4:0,A5:0,C1:0,B1:7,D1:11.75,D2:0.197, wlt:[6,0,2],better:true},
'itsdangerous/iter20': {A1:0,A2:14,A4:0,A5:0,C1:0,B1:3,D1:10.47,D2:0.105, wlt:[4,2,2],better:true},
'httpx/oneshot': {A1:0,A2:10,A4:0,A5:0,C1:0,B1:7,D1:11.35,D2:0.138, wlt:[5,1,2],better:true},
'httpx/iter2': {A1:0,A2:9,A4:0,A5:0,C1:0,B1:16,D1:13.22,D2:0.155, wlt:[6,0,2],better:true},
'httpx/iter20': {A1:0,A2:2,A4:0,A5:0,C1:0,B1:7,D1:10.78,D2:0.134, wlt:[5,1,2],better:true},
'requests/oneshot': {A1:0,A2:6,A4:0,A5:0,C1:0,B1:11,D1:8.79,D2:0.183, wlt:[5,1,2],better:true},
'requests/iter2': {A1:0,A2:11,A4:0,A5:0,C1:0,B1:7,D1:9.6,D2:0.182, wlt:[5,1,2],better:true},
'requests/iter20': {A1:0,A2:6,A4:0,A5:0,C1:0,B1:8,D1:8.68,D2:0.238, wlt:[6,0,2],better:true},
},
};
// quality coverage deltas (non-regression floor) — line pp
const COV = {
'itsdangerous/oneshot':0.00,'itsdangerous/iter2':1.64,'itsdangerous/iter20':2.35,
'httpx/oneshot':-6.96,'httpx/iter2':0.00,'httpx/iter20':0.00,
'requests/oneshot':-3.17,'requests/iter2':1.52,'requests/iter20':3.34,
};
const repoOf = wt => wt.split('/')[0];
const COUNT_AXES = new Set(['A1','A2','A4','A5','C1','B1']); // sum; D1/D2 are ratios -> mean
// "All 9 (totals)" synthetic series
function totals(){
const out = {base:{}, coverage:{}, ablation:{}, quality:{}};
AXES.forEach(a=>{
const isCount = COUNT_AXES.has(a.k);
const baseVals = WTS.map(w=>BASE[repoOf(w)][a.k]);
out.base[a.k] = isCount ? baseVals.reduce((x,y)=>x+y,0) : (baseVals.reduce((x,y)=>x+y,0)/9);
['coverage','ablation','quality'].forEach(arm=>{
const v = WTS.map(w=>GEN[arm][w][a.k]);
out[arm][a.k] = isCount ? v.reduce((x,y)=>x+y,0) : (v.reduce((x,y)=>x+y,0)/9);
});
});
return out;
}
Chart.defaults.color = '#8b949e';
Chart.defaults.font.family = "-apple-system, system-ui, sans-serif";
Chart.defaults.font.size = 10;
const COLORS = {base:'#475569', coverage:'#d29922', ablation:'#58a6ff', quality:'#3fb950'};
// ---- build worktree selector ----
const sel = document.getElementById('wtsel');
sel.innerHTML = '<option value="__all__">All 9 worktrees (totals)</option>'
+ WTS.map(w=>`<option value="${w}">${w}</option>`).join('');
// ---- build axis cards ----
const grid = document.getElementById('axisGrid');
const charts = {};
AXES.forEach(a=>{
const card = document.createElement('div'); card.className='axis-card';
card.innerHTML = `
<div class="ah"><span class="atitle">${a.t}</span>
<span class="dir ${a.dir}">${a.dir==='lower'?'↓ lower':'↑ higher'} better</span></div>
<div class="afull">${a.full}</div>
<div class="cbox"><canvas id="c_${a.k}"></canvas></div>
<div class="verdict" id="v_${a.k}"></div>`;
grid.appendChild(card);
charts[a.k] = new Chart(document.getElementById('c_'+a.k), {
type:'bar',
data:{ labels:['Base','coverage','ablation','quality'],
datasets:[{ data:[0,0,0,0],
backgroundColor:[COLORS.base,COLORS.coverage,COLORS.ablation,COLORS.quality],
borderRadius:3, barPercentage:0.78, categoryPercentage:0.82 }] },
options:{ responsive:true, maintainAspectRatio:false,
plugins:{ legend:{display:false}, tooltip:{ callbacks:{ label:c=>` ${c.raw}` } } },
scales:{ x:{ grid:{display:false}, ticks:{font:{size:10}} },
y:{ grid:{color:'#21262d'}, beginAtZero:true, ticks:{maxTicksLimit:5} } } }
});
});
function fmt(v){ return Number.isInteger(v) ? v : Math.round(v*1000)/1000; }
function render(wt){
let base, g1, gb, g2, verdicts=null;
if(wt==='__all__'){
const T = totals(); base=T.base; g1=T.coverage; gb=T.ablation; g2=T.quality;
} else {
base={}; AXES.forEach(a=>base[a.k]=BASE[repoOf(wt)][a.k]);
g1=GEN.coverage[wt]; gb=GEN.ablation[wt]; g2=GEN.quality[wt];
verdicts={}; AXES.forEach(a=>{
const gv=g2[a.k], bv=base[a.k];
verdicts[a.k] = gv===bv ? 'TIE' : ((a.dir==='lower'? gv<bv : gv>bv) ? 'WIN':'LOSS');
});
}
AXES.forEach(a=>{
const ch=charts[a.k];
ch.data.datasets[0].data=[fmt(base[a.k]),fmt(g1[a.k]),fmt(gb[a.k]),fmt(g2[a.k])];
ch.update('none');
const ve=document.getElementById('v_'+a.k);
if(verdicts){
const v=verdicts[a.k];
const cls=v==='WIN'?'v-win':v==='LOSS'?'v-loss':'v-tie';
const sym=v==='WIN'?'✓ win':v==='LOSS'?'✗ loss':'= tie';
ve.innerHTML=`quality vs baseline: <span class="${cls}">${sym}</span> (${fmt(g2[a.k])} vs ${fmt(base[a.k])})`;
} else {
ve.innerHTML=`<span class="v-tie">summed (counts) / averaged (D-axes) over 9</span>`;
}
});
}
sel.addEventListener('change',()=>render(sel.value));
render('__all__');
// ---- W/L/T matrix ----
const arms=[['coverage','coverage · 4.7 · coverage-prompts'],['ablation','ablation · 4.7 · scorecard-prompts'],['quality','quality · 4.8 · scorecard-prompts']];
const mt=document.getElementById('matrix');
let html='<thead><tr><th class="wt" style="text-align:left">Worktree</th>'
+ arms.map(a=>`<th>${a[1]}</th>`).join('') + '</tr></thead><tbody>';
WTS.forEach(w=>{
html+=`<tr><td class="wt">${w}</td>`;
arms.forEach(a=>{
const g=GEN[a[0]][w];
const cls=g.better?'cell-yes':'cell-no';
const sym=g.better?'✓':'✗';
html+=`<td class="${cls}">${sym}<span class="wlt">${g.wlt[0]}W ${g.wlt[1]}L ${g.wlt[2]}T</span></td>`;
});
html+='</tr>';
});
html+='</tbody>';
// totals row
const tallies=arms.map(a=>WTS.filter(w=>GEN[a[0]][w].better).length);
html+=`<tfoot><tr class="totalrow"><td class="wt" style="color:#fff">Beats baseline</td>`
+ tallies.map(t=>`<td>${t} / 9</td>`).join('') + `</tr></tfoot>`;
mt.innerHTML=html;
// ---- coverage floor chart ----
new Chart(document.getElementById('covChart'),{
type:'bar',
data:{ labels:WTS, datasets:[{ label:'Δ line coverage (pp) vs baseline',
data:WTS.map(w=>COV[w]),
backgroundColor:WTS.map(w=>COV[w]<0?'#f85149':(COV[w]>0?'#3fb950':'#475569')),
borderRadius:3 }] },
options:{ indexAxis:'y', responsive:true, maintainAspectRatio:false,
plugins:{ legend:{display:false}, title:{display:true,text:'quality — coverage delta (non-regression floor)',color:'#e6edf3',font:{size:13}},
tooltip:{callbacks:{label:c=>` ${c.raw>0?'+':''}${c.raw} pp`}} },
scales:{ x:{ grid:{color:'#21262d'}, ticks:{callback:v=>v+''} },
y:{ grid:{display:false}, ticks:{font:{family:"'SF Mono',monospace",size:10}} } } }
});
// ---- changes table ----
const CHANGES=[
['Goal: coverage % → multi-axis scorecard win','#1 / #9 coverage isn\'t a quality proxy','Scorecard tally positive for ≥5/9','ok','✅ Confirmed','9/9 (quality), 8/9 (ablation)'],
['Anti-fragility contract: forbid substring-match asserts','#5a substring matching','Substring asserts drop >80% vs coverage','ok','✅ Confirmed','A.1 total 65 → 0 (86% on ablation alone)'],
['Forbid private-symbol reach','#5d private-symbol imports','Private-symbol use → ~zero','partial','⚠️ Partial','185 → 59; big drop, not zero; noisy proxy'],
['Forbid recomputed crypto; prefer fixed byte vectors','#5b recomputed crypto','A.4 down, B.1 fixed-vectors up','ok','✅ Confirmed','A.4 ~eliminated; B.1 up (httpx 13→16)'],
['Require parametrize / fixtures / inheritance over unrolling','#5h LOC inflation','D.2 parametrize ratio up vs ~0','ok','✅ Confirmed','D.2 ≤0.08 → 0.10–0.27'],
['Forbid git-history recovery of deleted tests','#3 session restored baseline via git show','No worktree restores baseline suite','ok','✅ Confirmed','Max identical = 3 empty __init__.py (coverage: 31/32 real)'],
['Require REPL verification of stdlib/3rd-party assumptions','#4 epistemic errors w/o checking','Committed-broken tests → ~0','proc','◐ Process held','repl_verifications.log in every session; not re-run here'],
['Name framework real-I/O fixtures (httpbin, MockTransport…)','#7 integration tests are the win','More iter2/iter20 add integration tests','ok','✅ Confirmed','mock_framework 62–153 LOC in every httpx/requests arm'],
['iter20 stop: coverage parity → 3 iters w/o scorecard gain','#2 iter20 budget underused','iter20 iterations rise toward budget','ok','✅ Confirmed','2–3 → 6–9 (quality), 10–17 (ablation)'],
['Forbid pip install -e . from inside worktrees','#8a shared venv clobbered','Editable install stays pointing at base/','proc','◐ Hermicity held','Constraint encoded; venv unclobbered'],
['Split mock-LOC: real (C.1) vs framework (C.2)','#6 mock metric is noisy','Metric stops mislabeling framework I/O','ok','✅ Confirmed','C.1→0 in quality; C.2 reported separately'],
['SUMMARY reports pure-line, branch, AND combined %','#8c labels disagreed across experiments','Apples-to-apples cross-experiment comparison','proc','◐ Process held','Format adopted across quality SUMMARYs'],
];
const cb=document.querySelector('#changes tbody');
cb.innerHTML=CHANGES.map(r=>`<tr>
<td class="chg">${r[0]}</td>
<td class="find">${r[1]}</td>
<td class="pred">${r[2]}</td>
<td class="outcome"><span class="out ${r[3]}">${r[4]}</span><small>${r[5]}</small></td></tr>`).join('');
</script>
</body>
</html>