Archilyzer · Source

archilyzer

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

commit ef64d32632ce18302699afbe5c7a7dba3250dc87
parent dc9dc0bc8e905200aad12ebd7032d3cd687090f5
Author: I Mean I'm Just Saying <imeanimjustsaying@kiwifarms.st>
Date:   Tue,  3 Nov 2026 09:29:41 -0500

umtool: e2e -- the post bench paraphrases a context post: the card draws it labelled (never the original words), the read counts it, the original kept; posts set-item parent.0.paraphrase=off brings the words back

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

Diffstat:
Mumtool/e2e/post-items.spec.ts | 30++++++++++++++++++++++++++++++
1 file changed, 30 insertions(+), 0 deletions(-)

diff --git a/umtool/e2e/post-items.spec.ts b/umtool/e2e/post-items.spec.ts @@ -129,6 +129,36 @@ test("the post bench trims the video attachment and saves it; the cut's seconds await expect(page.locator('[data-entry="p-vid"] [data-post-seconds]')).toHaveText("4.7s"); }); +test("the post bench paraphrases a context post: the card draws it labelled, the read counts it, the original kept", async ({ page }) => { + await page.setViewportSize({ width: 1366, height: 1000 }); + await page.goto(urls.postBenchHref(PROJECT, "p-txt")); + await expect(page.locator('[data-post-bench="p-txt"]')).toBeVisible(); + // 12 words (5 s) + its parent's 7 (2.33 s). + await expect(page.locator("[data-post-bench-rule]")).toHaveText("7.3 s"); + const block = page.locator('[data-post-bench-context="parent.0"]'); + await expect(block.locator('[data-post-bench-original="parent.0"]')).toHaveText("The first thing I said about it."); + await block.locator('[data-post-bench-paraphrase="parent.0"]').fill("He said it first."); + // The read counts the paraphrase's 4 words (1.33 s), at once. + await expect(page.locator("[data-post-bench-rule]")).toHaveText("6.3 s"); + await page.locator("[data-post-bench-save]").click(); + await expect(page.locator("[data-post-bench-status]")).toHaveText("saved"); + const saved = timeline().find((e) => e.id === "p-txt") as Entry & { parents: { text: string; paraphrase?: string }[] }; + expect(saved.parents[0]).toMatchObject({ text: "The first thing I said about it.", paraphrase: "He said it first." }); + // The card (the build's page, drawn again after the save): the paraphrase, labelled; never the original words. + const card = page.frameLocator('[data-post-card-frame="read"]'); + await expect(card.locator('[data-post-parent="0"] [data-post-paraphrase]')).toHaveText("He said it first."); + await expect(card.locator('[data-post-parent="0"] [data-post-paraphrased]')).toHaveText(/paraphrased/i); + await expect(card.locator("body")).not.toContainText("The first thing I said about it."); + if (SHOTS) await page.screenshot({ path: path.join(SHOTS, "post-items-paraphrase.png") }); + // Cleared (the terminal's writer): its own words again, no label. + umtool(["posts", "set-item", PROJECT, "p-txt", "parent.0.paraphrase=off"]); + expect((timeline().find((e) => e.id === "p-txt") as Entry & { parents: Record<string, unknown>[] }).parents[0].paraphrase).toBeUndefined(); + await page.reload(); + await expect(page.frameLocator('[data-post-card-frame="read"]').locator('[data-post-parent="0"]')).toContainText("The first thing I said about it."); + await expect(page.frameLocator('[data-post-card-frame="read"]').locator("[data-post-paraphrased]")).toHaveCount(0); + await expect(page.locator("[data-post-bench-rule]")).toHaveText("7.3 s"); +}); + test("umtool posts reel adds only what the cut does not play yet, in one write", async () => { const dry = JSON.parse(umtool(["posts", "reel", PROJECT, "--channel", "postchan-x", "--own", "--dry-run", "--json"])) as { entries: { id: string }[]; already: number }; // 0 is p-txt's parent (not an item yet), 1-3 are in the cut, 4 is new; 9 is not the subject's.