syntaxai/tdd.md · main · public / images / cost-flattening-confirmed.svg

cost-flattening-confirmed.svg 87 lines · 5119 bytes raw
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 700" width="1200" height="700">
  <rect width="1200" height="700" fill="#0a0a0a"/>

  <!-- Header -->
  <g font-family="ui-monospace, 'SF Mono', 'JetBrains Mono', Menlo, Consolas, monospace">
    <text x="80" y="46" font-size="20" font-weight="600" fill="#909090">Hypothesis test — cost-flattening of pattern-as-redirect</text>
    <text x="80" y="92" font-size="32" font-weight="700" fill="#e8e8e8">Predicted 1 hour. Landed in 8 minutes 8 seconds.</text>
    <text x="80" y="120" font-size="14" fill="#7a7a7a">The git-url-refactor postmortem closed with a falsifiable claim. The second URL refactor measured it. 7.4× faster than predicted.</text>
  </g>

  <!-- Comparison header -->
  <g font-family="ui-monospace, 'SF Mono', 'JetBrains Mono', Menlo, Consolas, monospace" font-size="13" font-weight="600" letter-spacing="2">
    <text x="100" y="172" fill="#909090">DIMENSION</text>
    <text x="480" y="172" fill="#909090">PR #42 (FIRST)</text>
    <text x="780" y="172" fill="#909090">PR #53 (HYPOTHESIS TEST)</text>
    <text x="1080" y="172" fill="#909090">VERDICT</text>
  </g>
  <line x1="80" y1="184" x2="1120" y2="184" stroke="#2a2a2a" stroke-width="1"/>

  <!-- Rows -->
  <g font-family="ui-monospace, 'SF Mono', 'JetBrains Mono', Menlo, Consolas, monospace" font-size="15">

    <text x="100" y="216" fill="#c8c8c8">wall-clock (commit → live)</text>
    <text x="480" y="216" fill="#8a8a8a">an evening</text>
    <text x="780" y="216" fill="#c8c8c8" font-weight="700">8 min 8 sec</text>
    <text x="1080" y="216" fill="#7ec77e">✓ confirmed</text>

    <text x="100" y="246" fill="#c8c8c8">files changed</text>
    <text x="480" y="246" fill="#8a8a8a">19</text>
    <text x="780" y="246" fill="#c8c8c8">17</text>
    <text x="1080" y="246" fill="#7ec77e">comparable</text>

    <text x="100" y="276" fill="#c8c8c8">URL references rewritten</text>
    <text x="480" y="276" fill="#8a8a8a">49</text>
    <text x="780" y="276" fill="#c8c8c8">~22</text>
    <text x="1080" y="276" fill="#8a8a8a">smaller scope</text>

    <text x="100" y="306" fill="#c8c8c8">Layer-1 helper LOC</text>
    <text x="480" y="306" fill="#8a8a8a">13</text>
    <text x="780" y="306" fill="#c8c8c8">13</text>
    <text x="1080" y="306" fill="#7ec77e">✓ identical</text>

    <text x="100" y="336" fill="#c8c8c8">sibling-test cases</text>
    <text x="480" y="336" fill="#8a8a8a">9</text>
    <text x="780" y="336" fill="#c8c8c8">12</text>
    <text x="1080" y="336" fill="#7ec77e">covered</text>

    <text x="100" y="366" fill="#c8c8c8">Layer-3 wrapper</text>
    <text x="480" y="366" fill="#8a8a8a">11 lines (Response + 301)</text>
    <text x="780" y="366" fill="#c8c8c8">11 lines (copy-paste)</text>
    <text x="1080" y="366" fill="#7ec77e">✓ identical</text>

    <text x="100" y="396" fill="#c8c8c8">sed-pass over-rewrites</text>
    <text x="480" y="396" fill="#8a8a8a">0</text>
    <text x="780" y="396" fill="#c8c8c8">1 (caught + fixed in 30s)</text>
    <text x="1080" y="396" fill="#c89a3a">~ pattern risk</text>

    <text x="100" y="426" fill="#c8c8c8">verifier verdict before</text>
    <text x="480" y="426" fill="#8a8a8a">7/7 ✓</text>
    <text x="780" y="426" fill="#c8c8c8">7/7 ✓</text>
    <text x="1080" y="426" fill="#7ec77e">stable</text>

    <text x="100" y="456" fill="#c8c8c8">verifier verdict after</text>
    <text x="480" y="456" fill="#8a8a8a">7/7 ✓</text>
    <text x="780" y="456" fill="#c8c8c8">7/7 ✓</text>
    <text x="1080" y="456" fill="#7ec77e">stable</text>

    <text x="100" y="486" fill="#c8c8c8">test count delta</text>
    <text x="480" y="486" fill="#8a8a8a">+9 (379 → 388)</text>
    <text x="780" y="486" fill="#c8c8c8">+12 (407 → 419)</text>
    <text x="1080" y="486" fill="#7ec77e">net positive</text>
  </g>

  <!-- Bottom callout -->
  <rect x="80" y="520" width="1040" height="140" fill="#101a10" stroke="#1f3f1f" stroke-width="1" rx="6"/>
  <g font-family="ui-monospace, 'SF Mono', 'JetBrains Mono', Menlo, Consolas, monospace">
    <text x="100" y="552" font-size="16" font-weight="600" fill="#7ec77e">Cost-flattening hypothesis: CONFIRMED — much more dramatically than predicted.</text>
    <text x="100" y="578" font-size="14" fill="#c8c8c8">Predicted: 1 hour. Actual: 8m 8s. Ratio: 7.4× faster. The reusable shape (b32_&lt;old&gt;_url_redirect + sibling test +</text>
    <text x="100" y="602" font-size="14" fill="#c8c8c8">Layer-3 wrapper) collapses the URL-refactor wall-clock from "evening's work" to "coffee break". Same number of</text>
    <text x="100" y="626" font-size="14" fill="#c8c8c8">structural pieces; the cost of CONNECTING them was the bulk of the original effort, and that's now zero.</text>
    <text x="100" y="648" font-size="13" fill="#8a8a8a">One small pattern-risk surfaced: sed pattern matched inside filesystem paths (content/sama/sorted.md), caught by a unit test.</text>
  </g>

  <!-- Watermark -->
  <text x="1120" y="684" text-anchor="end" font-family="ui-monospace, 'SF Mono', 'JetBrains Mono', Menlo, Consolas, monospace" font-size="12" fill="#5a5a5a">https://tdd.md</text>
</svg>