Archilyzer · Source

archilyzer

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

commit 8b27b217194fd8c83baf779316b73611fdc7ef4f
parent 318c9d86d2643d89cdc65f4cbab2fe4ce8431ec4
Author: I Mean I'm Just Saying <imeanimjustsaying@kiwifarms.st>
Date:   Fri, 25 Sep 2026 11:59:32 -0400

plans: (review fix) release 7 slice C record — Pages projects must exist first, 2origin, re-gate on the merge

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

Diffstat:
Mplans/release-7.md | 58+++++++++++++++++++++++++++++++++++++++++++++++++++-------
1 file changed, 51 insertions(+), 7 deletions(-)

diff --git a/plans/release-7.md b/plans/release-7.md @@ -225,7 +225,9 @@ worktrees shifts port blocks. Reviews: Opus, read-only, `SHIP | SHIP AFTER FIXES ## Rollout at the end (releases 6 + 7 together; ONE editor restart + umtool restart) Release-5 procedure (`plans/release-5.md` "## Rollout 2026-09-24 (night)") plus: -1. Final suites on the merge sha in a detached worktree: editor full, export full, `e2e:hub`. +1. Final suites on the merge sha in a detached worktree: editor full, export full, `e2e:hub`, + and `TWO_ORIGIN_REBUILD=1 node scripts/worktree.mjs run -- pnpm --filter export run e2e:2origin` + (its globalSetup runs `pnpm run build:hub`, which slice C made `archilyzer build hub`). 2. Primary: `pnpm install --frozen-lockfile` (expected no-op; verify the three node_modules facts above). MUST precede the editor build. 3. Numbers on the live corpus: settings (1,353 paths, diff empty), files (77 `unknown keys: []`, @@ -413,7 +415,10 @@ done. `doctor`, `run` and `mcp` were not started (the cut line). | `c82aad09` | `editor/app/sites/lib/hubActions.ts`: `buildHubAction` (kind `build-hub`, queue `build`), `deployHubAction` (`deploy-hub`, `deploy`) and `buildAndDeployHubAction` (`build-deploy-hub`, `deploy`). Before any job, they refuse a bad preview, a missing project or the homepage's project, and (deploy-only) a bundle that is not the hub. `HubBuildButtons.tsx` sits under the Hub form, in a group named `Hub build`: button **Build hub**, checkbox **Deploy after build** (unchecked by default, unlike the all-sites batch, because the first hub deploy should be a choice), button **Deploy hub**, lanes **Build hub** / **Build & deploy hub** / **Deploy hub**. The Hub section's copy now says the hub and the homepage are two projects. `/api/ops/build-hub` `{deploy?, preview?}` (a preview without deploy is a 400) and `/api/ops/deploy-hub` `{preview?}` (→ `previewUrl`). `archilyzer-ops.mjs` ACTIONS + usage + test (+1). `ops-api.spec` +1: no project, `archilyzer`, and not-a-hub-build are each refused, and no job starts. Hub-URL hints → `https://archilyzer-hub.pages.dev`: `HomepageConfigForm` placeholder (plus an `archilyzer-hub` placeholder on the project field), `SiteForm` Hub URL hint, `settingsSchema` `homepageUrl` (+ `SETTINGS.md` regenerated through `archilyzer settings example`), `mcp/README.md` :457, :508 | | `c66b9d4a` | Homepage hero: **Search all archives** → `homepage.json` `siteUrl` (the field `hubSite()` reads), rendered only when set. `marketing.spec` +1, conditional like the rail test: absent is legal, and a present link must be absolute | | `baa7ef45` | Posts-only 404. When the signature is `""` but `src/manifest.json` exists, `reconcileChannelTree` (now exported) copies the tree under the constant `MANIFEST_ONLY_SIGNATURE`. `corpus.ts` is untouched and spec stays 4. New `bin/compose-site.test.ts` (3): a manifest-only tree is copied (then skipped when unchanged, re-copied once pages arrive), an unchanged tree is skipped, and a member with no manifest is removed and a non-member pruned. Two of the three fail with the fix reverted (checked) | -| *(this commit)* | this record, four `[Unreleased]` bullets | +| `e4b5376c` | this record, four `[Unreleased]` bullets | +| `bc2d9fb6` | (review fix) `DEPLOY_CLOUDFLARE.md:40-45`: every deploy path uploads to R2 and only a build stages. The review's replacement text said the credentials come from `settings.json`; only the bucket does, and the credentials come from the environment, so the text says that. Settings `homepageUrl` hint and `homepage.ts` comments → `archilyzer-hub` (never `archilyzer`). `compose site` with no id → `siteIdFrom` (one line, exit 2) | +| `d1ba90e9` | merge `main` `7b79a945` (slice Y at `2497d20b`). Only `plans/release-7.md` conflicted (both records, Y's first). `editor/CHANGELOG.md` auto-merged, and the lockfile did not move | +| *(this commit)* | (review fix) this record: the Pages-project bullet corrected, the 2origin line, rollout step 1 gains `e2e:2origin`, the found-and-left additions, the re-gate | **The CLI as shipped** (`pnpm --filter yt-dlp-transcript-common exec tsx bin/archilyzer.ts …`, or `tsx ../common/bin/archilyzer.ts …` from `export/` / `homepage/`; `--help` anywhere): @@ -454,6 +459,20 @@ No build, deploy, compose or data build ran against the real corpus. The CLI's r exercised in the worktree, which has no corpus: an unknown site, `--preview main`, no id, no project, no hub project and no homepage build. +**Re-gate after the review fixes and the merge of `main` `7b79a945`** (tree `d1ba90e9` + record; +`rm -rf editor/.next/dev`, lockfile unchanged). tsc clean. common **1789/1789** (1772 on `main` ++ 17 from this slice). Editor unit **72/72**. test:scripts **160 + 1 skip**. mcp **219/219**. +`next build`: editor ok (14.7 s), export ok (7.4 s). Numbers (the same frozen copy) against the +`6ee1d336` run: **diff empty**. EDITOR e2e, the seven specs + `pacing.spec` +(`$T/c-specs-merged.txt`, `.spec` suffixes): **51 passed, 0 failed, 3.1 min**. EXPORT full: +**192 passed, 6.0 min**. `e2e:hub`: **8 passed, 15 s**. `e2e:2origin` with +`TWO_ORIGIN_REBUILD=1`: **3 passed, 40 s** (73 s including two `archilyzer build hub` runs). +The log shows `$ tsx ../common/bin/archilyzer.ts build hub` and `compose-hub: 0 built-in pool +site(s)`. The build runs twice because `globalSetup` is called at config load in the runner and +again in the worker, and `TWO_ORIGIN_REBUILD=1` clears the cache each time. That was already +true before this slice. The primary's `export/public` files kept their mtimes (checked). +Homepage: **15 passed, 7 skipped, 25 s**. + **Found and left.** - **No export e2e pins the posts-only fix.** No spec reads `corpus.json`, and the fixture site has only `test-youtube`, with no social channel. The composer is pinned by `compose-site.test.ts`, @@ -482,11 +501,15 @@ project, no hub project and no homepage build. only stages archives. `pnpm run deploy` is now `archilyzer deploy site`, which uploads them. That doc is due to be absorbed into `PUBLISH.md` in slice 3. `settingsSchema.ts:417,433` ("basic — `pnpm run build` in export/") is still true, since that script is now the CLI. -- **`wrangler pages deploy` to a project that does not exist yet** asks whether to create it, - and cannot do that without a TTY. Neither `archilyzer-hub` nor (per the context) a deployed - `archilyzer` exists. Step 9 of the rollout should run the two first deploys from a terminal - (`archilyzer deploy hub` / `deploy homepage`), or create the projects in the dashboard first. - `pnpm ops deploy-hub` streams into a job log that has no terminal to answer. +- **A Pages project must exist before its first deploy.** *(Corrected after review; the first + version of this bullet was wrong.)* wrangler offers to create a missing project only when + `process.stdin.isTTY` is set. `runChildIntoLog` spawns it with piped stdin, both from an + editor job and from the CLI in a terminal, so it never gets that prompt. It fails at once + with wrangler's own "The Pages project … does not exist" sentence, and it never hangs. So the + projects are created first, with `pnpm dlx wrangler pages project create <name> + --production-branch main`. **Done by the parent on 2026-09-25:** `archilyzer-hub` was created + (empty). `archilyzer` already existed, with no deployment. Rollout step 9 therefore needs no + project creation. Run `pnpm dlx wrangler pages project list` first to confirm both are there. - `build homepage` does not rebuild the index. The homepage's own `pnpm run build` still does, through its `prebuild` (its twins were left as they were, as specified). Run `archilyzer index` first when the index is stale. @@ -495,6 +518,27 @@ project, no hub project and no homepage build. `deploySite` would change. - `common/lib/builtExport.test.ts` gained a test. It is the test of an owned file, but not on the ownership list by name. +- **`export/e2e-2origin/globalSetup.ts:142` runs `pnpm run build:hub`**, which is now + `archilyzer build hub`. That command removes `public/site.json` first and sets + `NODE_ENV` / `TRANSCRIPTS_DIR` / `EXPORT_PUBLIC_DIR`. The suite caches its hub bundle + (it skips the build when `hubA/sw.js` exists), so it was run with `TWO_ORIGIN_REBUILD=1` on + the merged tree (see the re-gate below). In a worktree, `export/public` entries are symlinks + into the primary, and compose-hub writes through them. For that run, the files the hub build + writes or removes (`site.json`, `hub-sites.json`, `corpus.json`, `llms.txt`, `robots.txt`, + `_headers`, `sw.js`) were replaced with real copies first, and the symlinks were restored + afterwards. The old `build:hub` wrote through them in the same way. +- **A production `deploy hub` takes its branch from the git checkout** (no `--branch`). This + matches `runDeployIntoLog` for sites, and was left as it is by the parent's decision. Run from + a non-`main` checkout, it would become a preview. `deploy homepage` passes `--branch main`. + Step 9 runs from the primary on `main`. +- **The homepage hero test was not given a positive fixture (review L7, optional).** The + homepage suite has no fixture tree. Its `next dev` reads `getPaths()` with no + `TRANSCRIPTS_DIR` override, so seeding a `homepage.json` from a spec would write + `transcripts/sites/_homepage/homepage.json`: in the primary, the real corpus's file. It stays + conditional. Step 9 checks the link live. +- **`--preview` takes the next word** (review L6): `deploy site --preview jeralyzer` reads + `jeralyzer` as the branch and takes the site from `SITE_ID`. The result is always a preview, + never production. The usage text puts `<id>` first. - **Commit trailers** name `Claude Opus 5.5 (1M context)`, as in releases 5 and 6.