syntaxai/tdd.md · main · public / images / git-url-anatomy.svg
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 600" width="1200" height="600">
<rect width="1200" height="600" 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">/GIT/ URL anatomy — one segment is doing no work</text>
<text x="80" y="92" font-size="32" font-weight="700" fill="#e8e8e8">isAllowedRepo() already enforces a single tenant.</text>
<text x="80" y="120" font-size="15" fill="#7a7a7a">The owner segment is checked, rejected if anything else, and never read again. It's policy overhead, not data.</text>
</g>
<!-- BEFORE label + URL -->
<text x="80" y="172" font-family="ui-monospace, 'SF Mono', 'JetBrains Mono', Menlo, Consolas, monospace" font-size="14" font-weight="600" fill="#b8794a" letter-spacing="2">BEFORE</text>
<rect x="80" y="184" width="1040" height="60" fill="#1a1a1a" stroke="#2a2a2a" stroke-width="1.5" rx="6"/>
<text x="100" y="222" font-family="ui-monospace, 'SF Mono', 'JetBrains Mono', Menlo, Consolas, monospace" font-size="18" xml:space="preserve" fill="#e8e8e8">https://tdd.md/GIT/<tspan fill="#b8794a" font-weight="700" text-decoration="line-through">syntaxai/</tspan>tdd.md/blob/main/src/b32_sama_v2_verify.ts</text>
<!-- Caret pointer + caption under the struck segment.
"https://tdd.md/GIT/" = 19 chars × ~10.8px ≈ 205px starting at x=100,
so "syntaxai/" sits centered around x=100 + 205 + 49 = 354. -->
<text x="354" y="262" text-anchor="middle" font-family="ui-monospace, 'SF Mono', 'JetBrains Mono', Menlo, Consolas, monospace" font-size="12" fill="#b8794a">↑ redundant — always "syntaxai", validated then ignored</text>
<!-- isAllowedRepo snippet -->
<rect x="80" y="288" width="1040" height="116" fill="#101010" stroke="#1f1f1f" stroke-width="1" rx="6"/>
<g font-family="ui-monospace, 'SF Mono', 'JetBrains Mono', Menlo, Consolas, monospace" font-size="14">
<text x="100" y="312" fill="#6a6a6a">// src/d21_handlers_repo_browse.ts:26</text>
<text x="100" y="334" fill="#c8c8c8"><tspan fill="#a07a5a">const</tspan> isAllowedRepo = (owner: <tspan fill="#7ec77e">string</tspan>, repo: <tspan fill="#7ec77e">string</tspan>): <tspan fill="#7ec77e">boolean</tspan> =></text>
<text x="120" y="354" fill="#c8c8c8">owner === <tspan fill="#6a8db5">LIVE_REPO_OWNER</tspan> && <tspan fill="#6a6a6a">// "syntaxai" — checked but never user-supplied in practice</tspan></text>
<text x="120" y="374" fill="#c8c8c8">repo === <tspan fill="#6a8db5">LIVE_REPO_NAME</tspan> && <tspan fill="#6a6a6a">// "tdd.md"</tspan></text>
<text x="120" y="394" fill="#c8c8c8">SAFE_OWNER_REPO.test(owner) && SAFE_OWNER_REPO.test(repo);</text>
</g>
<!-- AFTER label + URL -->
<text x="80" y="446" font-family="ui-monospace, 'SF Mono', 'JetBrains Mono', Menlo, Consolas, monospace" font-size="14" font-weight="600" fill="#7ec77e" letter-spacing="2">AFTER</text>
<rect x="80" y="458" width="1040" height="60" fill="#1a1a1a" stroke="#7ec77e" stroke-width="1.5" rx="6"/>
<text x="100" y="496" font-family="ui-monospace, 'SF Mono', 'JetBrains Mono', Menlo, Consolas, monospace" font-size="18" fill="#e8e8e8">https://tdd.md/GIT/tdd.md/blob/main/src/b32_sama_v2_verify.ts</text>
<!-- Counts strip -->
<g font-family="ui-monospace, 'SF Mono', 'JetBrains Mono', Menlo, Consolas, monospace" font-size="13" fill="#8a8a8a">
<text x="80" y="552">49 references touched · 10 source files · 7 content files · 1 regex 301-redirect</text>
</g>
<!-- Watermark -->
<text x="1120" y="584" text-anchor="end" font-family="ui-monospace, 'SF Mono', 'JetBrains Mono', Menlo, Consolas, monospace" font-size="12" fill="#5a5a5a">https://tdd.md</text>
</svg>