Archilyzer · Source

archilyzer

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

commit 0b9cff4b734579d44e76396046c25887db72c5e0
parent 71915d6677bede17facf609e5362ad7c8fe86ed0
Author: I Mean I'm Just Saying <imeanimjustsaying@kiwifarms.st>
Date:   Fri,  6 Nov 2026 01:05:34 -0500

scripts: the ops usage test knows resume-backfill

The action list now reads "fetch-posts, resume-backfill, capture-posts".
A new test checks that resume-backfill POSTs to its own route and that the
usage calls a plain fetch-posts sync new.

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

Diffstat:
Mscripts/archilyzer-ops.test.mjs | 14+++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/scripts/archilyzer-ops.test.mjs b/scripts/archilyzer-ops.test.mjs @@ -607,6 +607,18 @@ test("fetch-posts is a POST to its route, named in the usage", () => { assert.match(usage(), /read none\) is refused unless "force": true/); }); +// SYNC NEW and RESUME BACKFILL are two named actions (operator, 6 Nov 2026): +// a plain fetch-posts syncs new posts; resume-backfill is its own POST. +test("resume-backfill is a POST to its own route, and the usage says a plain fetch-posts is sync new", () => { + const p = parseArgs(["resume-backfill", "--json", '{"slug":"example-x"}']); + assert.equal(p.method, "POST"); + assert.equal(p.path, "/api/ops/resume-backfill"); + assert.deepEqual(p.body, { slug: "example-x" }); + assert.match(usage(), /fetch-posts fetches a social channel's new posts: \{"slug"\} is SYNC NEW/); + assert.match(usage(), /"backfill": true\s+is RESUME BACKFILL instead/); + assert.match(usage(), /resume-backfill continues a social channel's unfinished full-history/); +}); + // A post capture: a POST to its route, the body passed through untouched — the // route and the action judge it (ids in the archive, both halves off). test("capture-posts is a POST to its route, named in the usage", () => { @@ -618,7 +630,7 @@ test("capture-posts is a POST to its route, named in the usage", () => { assert.equal(p.method, "POST"); assert.equal(p.path, "/api/ops/capture-posts"); assert.deepEqual(p.body, { slug: "example-x", ids: ["123"], media: false }); - assert.match(usage(), /Actions:.*fetch-posts, capture-posts/); + assert.match(usage(), /Actions:.*fetch-posts, resume-backfill, capture-posts/); assert.match(usage(), /Every id must be in the channel's posts archive/); assert.match(usage(), /unless\s+"articles": false/); });