Archilyzer · Source

archilyzer

Archilyzer
git clone https://archilyzer.pages.dev/source/archilyzer.git
Log | Files | Refs | README | LICENSE

commit 3150fc9589a5e98b66fb836b6a2e5e95e93eb532
parent 21d7d994ba6f967835c2b307883c756922f35c53
Author: I Mean I'm Just Saying <imeanimjustsaying@kiwifarms.st>
Date:   Mon, 28 Sep 2026 12:52:33 -0400

plans: release 13 — slice W2's record (the export, homepage and docs lows)

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

Diffstat:
Mplans/release-13.md | 145+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 145 insertions(+), 0 deletions(-)

diff --git a/plans/release-13.md b/plans/release-13.md @@ -40,4 +40,149 @@ Then one integration gate on `main` (`r13/integration`) and the runbook ## Record +### Slice W2, as shipped — the export, homepage and docs lows (2026-09-28) + +Branch `r13/lows-export` off `main` `bf6904e8`, fast-forwarded to `main` `441bdbb2` (this plan) +before any change; worktree `/home/user/Projects/r13-lows-export`, port block #14 (export e2e +4420, homepage e2e 4440, origin B / hub A 6010 / 6011). One Opus implementer; scratch files `w2-*` +in the job's `tmp/overnight`. Six lows left by release 11, each small; one extra file was needed +(`common/lib/envVars.test.ts`, below). + +**1. Charts reach `--chart-6`.** `common/components/charts/ChartView.tsx` coloured its series, its +pie slices' config and its pie `Cell`s with its own `var(--chart-${(i % 5) + 1})`, so the sixth +series wore `--chart-1` and the slot release 11 added was reached only by the hub's cross-site +chart. All three now take `seriesColor(i)` (`common/lib/homepageChart.ts`): `--chart-1..6`, then +the golden-angle hues the hub chart already uses. Series 1–5 are unchanged. The consumers are +`SearchChartPanel` (the export's and the hub's search chart view) and `ChartCard` (the editor's +`/sites/<id>/charts` dashboard); both pass ChartView their data unchanged, so the new test covers +them. The homepage and umtool do not import ChartView. `ChartView.test.ts` (new, 2 tests) renders +ChartView server-side and reads the `ChartContainer`'s `<style>` — one `--color-<id>: <colour>;` +per series, which every Line/Area/Bar paints with — for line, area, bar, stackedBar (7 series) and +pie (7 slices). + +**2. An export unit `test` script.** `export/package.json`: `"test": "tsx --test +\"app/**/*.test.ts\""` — 11 files (3 under `ask/`, 8 under `lib/`), **98 tests, all passing**, as +FACTS predicted. The implementer gate list (`plans/tools/implementer-rules.md`) now names it, the +homepage's (2 tests) and `pnpm --filter editor test` (W1 adds that script; before it, the `tsx +--test` form); `CONTRIBUTING.md`'s "Tests" lists every package's script. FACTS amended in its two +places ("There is no vitest or jest", and O1c's "in no suite script"). + +**3. O5's wording lows (O5 review L1, L2), comments and prose only.** +`umtool/report-to-video/svg-faces.mjs:32-47`, the `FALLBACK_EM` doc comment and the README's "Why +a table, not an average" now say: kerning is ignored and the plain sum is NOT the conservative +side in general (412 / 348 positive pairs, up to +55 units; `T`×60 at 13 px is 464 px of ink +against 446.2), true only empirically (real text's worst net kerning +0.50 px); and 1.3 em covers +emoji, flags, CJK and the common scripts but not every fallback glyph (`⟹` 1.42 em, `﷽` 1.93, +`Ⅷ` 1.31; ~9 % overrun for a label made of them). **No code changed**: the file printed with +comments stripped (the TypeScript printer, `removeComments`) is identical before and after +(1,329 characters), so an unbranded render is byte-identical without a render, and none was run. +FACTS' O5 entry: its anchors (`:52`, `:55`, `:71`, `:84`) and its "still say it is" amended. + +**4. The 2origin stage guard.** `export/playwright.2origin.config.ts`: `if +(!process.env.TEST_WORKER_INDEX) stageTwoOrigins();`. Playwright evaluates a config again in each +worker process after setting `TEST_WORKER_INDEX` there (`playwright/lib/worker/workerMain.js:60`, +1.59.1, in the worker's constructor, before `_loadIfNeeded` loads the config). Each evaluation +`rmSync`ed and rewrote `.2origin/originB` under the `serve` already serving it — and with +`E2E_TWO_ORIGIN_REBUILD=1` inherited, **rebuilt the whole hub inside the worker**, deleting +`hubA` under its `serve` (see "They bite"). The common suite's env-var registry then failed ("every +variable the code reads is declared": `TEST_WORKER_INDEX`). It is Playwright's variable, set by it +and documented by it, so it joins `envVars.test.ts`'s `PLATFORM` set (beside `CI`, `NODE_ENV`) +rather than `envVars.ts`, whose test audience must be `E2E_`-prefixed and declared in a playwright +config (`babd4b75`). + +**5. `no-data.spec` skips on `workers > 1`.** `mode: "serial"` orders one file's tests, not the +files; under `--workers=N` the other specs read the summary while it is moved aside. The test +calls `test.skip(test.info().config.workers > 1, …)` before it renames anything, with the run's +worker count in the reason. The config's own `workers: 1` still runs it. + +**6. The MCP docs use `archilyzer mcp`.** `-- pnpm -C "$PWD" archilyzer mcp` (`/ABS/PATH/…` where +the old example had one) in `AGENTS.md` (the no-corpus block), `README.md` (both `claude mcp add` +blocks; the run-it example is now `TRANSCRIPT_SITE_URL=… pnpm archilyzer mcp`; the "starts the +same server through the repo's CLI" line now names the long form instead) and `mcp/README.md` ("Run +it" — `pnpm archilyzer mcp --remote|--hub|--local "$PWD/export/public"`, since a relative +`--local` resolves from `mcp/`; "Add to Claude Code"; the `mcp.json` form, `"args": ["-C", …, +"archilyzer", "mcp"]`; the Benchmark paragraph). **mcp/README's examples now register the server +as `archilyzer`** (they said `rekietalyzer`), and its `/sweep`-`/ask` paragraph says why. Every env +line is unchanged. `PUBLISH.md`'s "(the form mcp/README.md uses)" was no longer true and goes. +Checked through this worktree: `pnpm -C <worktree> archilyzer mcp --local <empty dir>` fed an +initialize request answers it as the FIRST stdout line; pnpm's `$ …` line and the server's banner +are on stderr. The grep for the old form (`yt-dlp-transcript-mcp exec`, `mcp add`) found nothing +in the homepage's docs content or in scripts; what it found and left is under "Found and left". + +| sha | what | +|---|---| +| `760af290` | `charts:` ChartView colours from `seriesColor(i)` (series, pie config, pie cells); `ChartView.test.ts` (2) | +| `546a6dd3` | `export:` the `test` script; the gate list, CONTRIBUTING's "Tests", two FACTS amendments | +| `271f49fa` | `umtool:` svg-faces' header and `FALLBACK_EM` comments, the README's "Why a table" (O5 L1, L2); FACTS' O5 entry | +| `5a4ec2fd` | `export:` the 2origin config stages only where `TEST_WORKER_INDEX` is unset | +| `0a1b3e6b` | `homepage:` `no-data.spec` skips on `workers > 1`; FACTS (this and the stage guard) | +| `ec0a11dc` | `docs:` AGENTS.md, README.md, mcp/README.md, PUBLISH.md — the `archilyzer mcp` form | +| `7a538650` | `export:` `[Unreleased]` — a chart's sixth series has a colour of its own | +| `babd4b75` | `common:` `envVars.test.ts` — `TEST_WORKER_INDEX` is a platform variable | +| _this_ | `plans:` this record | + +**Gates**, all from the worktree root: +- **tsc** (`pnpm -r --no-bail --workspace-concurrency=1 exec tsc --noEmit`) clean before every + code commit (`w2-tsc-1.log` … `w2-tsc-4.log`). +- **common 2,116/2,116** (`w2-u-common-2.log`, on `babd4b75`): 2,114 before W2 + ChartView's 2. + (The slice prompt's 2,112 is an older count.) The first run, on `7a538650`, was **2,115/2,116** + — the env-var registry on `TEST_WORKER_INDEX`, fixed by `babd4b75`. +- **editor unit 85/85** (`tsx --test "app/**/*.test.ts"` in `editor/`; this branch has no editor + script yet). +- **`test:scripts` 185 + 1 skip of 186.** +- **mcp 269/269.** +- **export unit (the new script) 98/98**, 11 files. **homepage unit 2/2.** +- **`pnpm --filter export exec next build`** ok, 76 s, no dangling `export/public` links before it. +- **The hub build** ok: `e2e:2origin` ran with `E2E_TWO_ORIGIN_REBUILD=1`, i.e. `archilyzer build + hub` on this tree (compiled 9.4 s, 18 pages). +- **`pnpm --filter editor exec next build`** ok, compiled in 84 s, 161 s in all (ChartView reaches + the editor's charts tab). +- **Homepage build: not run.** No homepage app code changed (only an e2e spec), and the homepage + does not import ChartView. +- **e2e**, detached, no queue wait at the time: + - export `charts.spec.ts`: **8 passed, 0 failed, 1.1 min**; + - homepage, the full suite: **31 passed, 0 failed, 1.3 min** (`no-data` among them, run by + `workers: 1`); + - homepage `no-data.spec.ts --workers=2`: **1 skipped**; + - `e2e:2origin` (rebuild): **3 passed, 0 failed**, 10.7 s of tests, 54 s with the hub build. + - The 2origin run's `compose hub` replaced seven `export/public` links with its own files (and + removed `hub-summary.json`'s), as FACTS says it does; they were relinked per path afterwards, + no dangling links, and the primary's targets kept their 00:51 mtimes. +- **Numbers tool: none.** Nothing ran against the live :3001 editor or the real corpus. + +**They bite.** +- **ChartView:** with `ChartView.tsx` as at `441bdbb2` (uncommitted), both new tests fail: `s5` is + `var(--chart-1)` and `s6` `var(--chart-2)` where `var(--chart-6)` and `hsl(105 64% 55%)` are + expected; the pie's `p5` is `var(--chart-1)` (`w2-bite-chartview.log`). +- **The stage guard,** two ways (`w2-bite-2origin.log`): loading the config under `tsx` with + `TEST_WORKER_INDEX=0` leaves `.2origin/originB/site.json`'s mtime unchanged; unset, it restages; + the OLD config with `TEST_WORKER_INDEX=0` restages. And in real runs: release 11's integration + `e2e:2origin` log (`int-e2e-2origin.log`), `o1-e2e-2origin-1.log` and `o6b-rv-2origin.log` each + show `archilyzer.ts build hub` **twice** in one run, the second after "Running 3 tests using 1 + worker" — the worker rebuilt the hub. W2's run shows it once. +- **no-data:** the old spec under `--workers=2` **ran (1 passed, 15.8 s)**; the new one skips. +- **The registry:** `5a4ec2fd` alone fails the common suite; `babd4b75` is what makes it pass. + +**Found and left.** +- **The export's public "Use with AI" page still shows the long form.** + `export/app/use-with-ai/page.tsx:22-33` builds an `mcpServers` snippet with `"--filter", + "yt-dlp-transcript-mcp", "exec", "tsx", "src/index.ts"`, registered under the site's id rather + than `archilyzer`. It is reader-facing code on every site and the hub — outside W2's files, and it + would need its own `[Unreleased]` bullet and a check of the page. For a later slice. +- **Comments that still describe the long form**, all true (the two forms run the same thing): + `common/bin/archilyzer.ts:249` (the `mcp` row's usage), `common/bin/mcp.ts:2`, and + `mcp/bench/{bench,smoke}.ts`, which say the bench spawns "the command line the client is + registered with". Records (`plans/mcp-fetch-clip.md:216`, `release-1x.md`) keep what was run. +- **From the seventh series on,** ChartView's colours are the golden-angle hues the hub chart + already uses, not a per-base validated palette (before: a repeat of 1–5). +- **`homepageChart.ts`' header** names the hub chart and the site cards as `seriesColor`'s users; + ChartView is a third. Not W2's file. +- **The editor's `/sites/<id>/charts` takes the same change.** Only the export changelog has a + bullet, as the slice prompt said; whether `editor/CHANGELOG.md` wants one is the parent's call. +- **UI mode** (`playwright test --ui`) loads test files in an out-of-process loader that evaluates + the config without `TEST_WORKER_INDEX`, so it would stage once more there. The CLI loads them + in-process. +- **`main` moved to `e6c5d2e3` during the slice** (release 12's changelog fix). Not merged: the + rules say merge `main` again only when the parent asks. + ## Rollout