Archilyzer · Source

archilyzer

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

commit 89481a2c8e0adc91a12fb2945b28734fc73c4957
parent 71b525a78d8c10e12b45e1b2e65f7ca068a8b4fa
Author: I Mean I'm Just Saying <imeanimjustsaying@kiwifarms.st>
Date:   Wed, 18 Nov 2026 20:33:36 -0500

posts: a walk that is not at its place stops reading at once, and writes nothing from a place it was not sent to

What gallery-dl still printed between the stop and its death was read, so how many posts were written
depended on the machine. From the top the posts read before the stop are the timeline's newest and are
kept; above a search-phase place nothing is written. Two editor tests state the trending caps' new range.

Co-Authored-By: Claude <noreply@anthropic.com>

Diffstat:
Mcommon/social/xGalleryDlFetcher.ts | 10+++++++++-
Meditor/app/api/ops/read-x-trending/route.test.ts | 4++--
2 files changed, 11 insertions(+), 3 deletions(-)

diff --git a/common/social/xGalleryDlFetcher.ts b/common/social/xGalleryDlFetcher.ts @@ -1535,6 +1535,10 @@ export const xGalleryDlFetcher: SocialFetcher = { input.drain?.addEventListener("abort", onDrain, { once: true }); const stdoutDone = readLines(subprocess.stdout, (line) => { + // Once the walk is known not to be at its place, what gallery-dl still + // prints before it dies is not read: how much that is depends on the + // machine, and none of it is wanted. + if (stoppedAtTop) return; if (line.trim()) betweenPages = false; stream.pushStdout(line); if ((stream.restartedFromTop || stream.resumeNotHonoured) && !stoppedAtTop && !stoppedAtKnown) { @@ -1622,8 +1626,12 @@ export const xGalleryDlFetcher: SocialFetcher = { // The walk began again from the top: its saved place is kept, and what it // read of the top (new posts, if any) is written like any other. if (stoppedAtTop) { + // From the top, what was read is the timeline's newest: new posts among + // them are kept. Above a search-phase place the walk is somewhere it was + // not sent: nothing of it is written (a post from there would sit apart + // from the rest of the archive, below its oldest). return { - posts, + posts: stream.resumeNotHonoured ? [] : posts, complete: false, cursor: input.cursor, error: stream.resumeNotHonoured ? X_RESUME_POINT_NOT_HONOURED : X_BACKFILL_RESTARTED_FROM_TOP, diff --git a/editor/app/api/ops/read-x-trending/route.test.ts b/editor/app/api/ops/read-x-trending/route.test.ts @@ -119,7 +119,7 @@ test("read-x-trending refuses, before any job, with a sentence", async () => { assert.match(await refused({ slug: "account-x", url: TREND }), /account-x is not an X trending library/); assert.match(await refused({ slug: "trending" }), /Give "url" .* or "reparse"/); assert.match(await refused({ slug: "trending", url: "https://x.com/example/status/1" }), /not a trending page URL/); - assert.match(await refused({ slug: "trending", url: TREND, scrolls: 21 }), /"scrolls" is a whole number, 1–20/); + assert.match(await refused({ slug: "trending", url: TREND, scrolls: 41 }), /"scrolls" is a whole number, 1–40/); assert.match(await refused({ slug: "trending", url: TREND, posts: 0 }), /"posts" must be a whole number above zero/); assert.match(await refused({ slug: "trending", url: TREND, probe: "yes" }), /"probe" must be a boolean/); assert.match(await refused({ slug: "trending", url: TREND, pages: 3 }), /pages/); @@ -171,7 +171,7 @@ test("create-channel refuses a library on a site and a library with a URL; nothi assert.equal(withUrl.status, 400); assert.match(String(withUrl.json.error), /^An X trending library has no URL/); const badCap = await call(create, { fields: { ...fields, xTrendingMaxPosts: 500 } }); - assert.match(String(badCap.json.error), /post cap is a whole number, 1–200/); + assert.match(String(badCap.json.error), /post cap is a whole number, 1–400/); assert.equal(await exists(path.join(ROOT, "channels", "made-trending")), false); });