Archilyzer · Source

archilyzer

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

commit e3b0a3f8ced78d9ad1ac5d24ea2eab0f6f75b0bb
parent 0cf2db56caac4fc876371d7de7c558870579b2fb
Author: I Mean I'm Just Saying <imeanimjustsaying@kiwifarms.st>
Date:   Wed, 18 Nov 2026 23:11:21 -0500

plans: x-followups review 3 -- the rulings as rulings (a window is X's by its URL, a saved-video window never asks X, t.co is X's, a lost count rebuilt only from records shown to cover the day, future starts count, the opening tab is Top by name, only the trend's own timelines after the page changed, no more X syncs than the cap has room for); OPERATING and the changelog say what changed

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

Diffstat:
MOPERATING.md | 14++++++++++++--
Meditor/CHANGELOG.md | 17++++++++++++++---
Mplans/x-trending.md | 31+++++++++++++++++++++++++++++++
3 files changed, 57 insertions(+), 5 deletions(-)

diff --git a/OPERATING.md b/OPERATING.md @@ -536,7 +536,12 @@ pnpm ops capture-posts --json '{"slug":"example-x","ids":["<postId>"]}' --wait - **An X channel's jobs that ask X nothing are not X's.** Its transcriptions (`transcribe-one`, whisper-video's hand-off), windows cut from a saved copy (`clips:saved-video`), an import of a local file and an archive.org import run on their own queues. Its clip windows, an import of an x.com address (into any channel) and its - kept-videos check run on X's queue. `record-live` of an X channel is refused (a recording would hold X's queue + kept-videos check run on X's queue. **A clip window is X's by the address it fetches, in any channel:** an + x.com or twitter.com page (`webpageUrl` on `fetch-window` / `fetch-windows`) is queued on X's queue and refused + on any other; a window that names no address is its channel's. A window of a copy (find-copy's archive.org or + Wayback) or of a mirror on another platform is not X's. A window on `clips:saved-video` whose saved copy is gone + by the time it runs fails ("the saved copy no longer covers this window; ask again and it runs on X's queue") + and asks X nothing. `fetch-copies` refuses a copy whose address is X's. A `t.co` short link is X's. `record-live` of an X channel is refused (a recording would hold X's queue for hours), and so is `redownload-incomplete-bucket` on one (the transcription queue). - **X's job cap: 12 in any 60 minutes, 150 in any 24 hours, on this machine.** ONE count over every kind of X job together (each channel of an X run is one), whatever the login source, cookie spec or channel. A job past @@ -552,7 +557,12 @@ pnpm ops capture-posts --json '{"slug":"example-x","ids":["<postId>"]}' --wait changing them is a code change. The count is kept in `transcripts/.x-session/job-starts.json`; if that file cannot be read no X job starts until it is repaired. If it is gone, the last 24 hours are counted again from the job records (`.jobs/<id>.meta.json`, `xStarts`); if X's queue ended a job in that time and the records - cannot be read (or none is left), no X job starts. X's own gap (5 minutes) already means 12 jobs an hour, so + cannot be read (or none is left), no X job starts. Nor does it while nothing shows the day's records are all + there: the jobs list's retention and **Clear logs** keep every X job's record for the day it can count, and + say since when in `.jobs/x-records-kept.json`; until that is a day old (or a finished job that ended over a day + ago is still on disk), a lost count is refused, at most for a day. A start stamped in the future (a clock set + back) counts until the clock has passed it by the window. The scheduler queues no more X syncs than the cap has + starts left (less the X jobs already waiting); the others wait for a later tick. X's own gap (5 minutes) already means 12 jobs an hour, so the hourly cap bites only if that gap is lowered; the daily cap bites sooner: an X run over more than 150 channels, more than 150 X channels on a daily sync, or two topics watched at 30 minutes (a tick is a read and usually a capture: about 96 jobs a day per topic) each reach it. diff --git a/editor/CHANGELOG.md b/editor/CHANGELOG.md @@ -19,7 +19,16 @@ - The numbers are constants of the code (`common/lib/xJobRule.ts`). No setting, option, environment variable, flag or queue changes them. The count survives a restart, and an unreadable count stops every X job. If the count's file is deleted, the last day's X jobs are counted again from the job records. If X jobs ran and - their records cannot be read, every X job is refused. + their records cannot be read, or cannot be shown to be all there, every X job is refused (at most for a + day). The jobs list's retention and Clear logs keep each X job's record for the day it can count. A start + stamped in the future counts, and never pushes the real ones out of the count. + - **A clip window is X's by the address it fetches, in any channel.** An x.com video filed on a YouTube channel, + a window sent to `POST /api/media/fetch-window` with an x.com `webpageUrl`, or one item of a batch across + channels runs on X's queue and counts. A window of an archive.org or Wayback copy, or of a mirror on another + platform, is not X's. A window cut from a saved copy that is gone by the time it runs fails with a sentence + and asks X nothing. A `t.co` link is X's. + - The scheduler queues no more X syncs than the cap has starts left; the others wait for a later tick instead of + each ending deferred. - An X channel's jobs that never ask X run on their own queues again: a transcription (whisper-video's hand-off to it included), clip windows cut from a saved copy, a local file's import, an archive.org import. An X clip window, an import of an x.com address and an X channel's kept-videos check now run on X's queue. Recording an X @@ -35,8 +44,10 @@ the read runs out of time inside Latest, Top's read is kept: `Top read; Latest stopped at the deadline`. - "Gone" is said per tab: gone from Latest while Top still shows it, or gone from the page. **Gone from the page** needs one read in which every tab that showed the post was read to its end without it. Marks from - different reads stay per tab. A post seen before tabs were read counts as the Top tab's, so a complete Latest - read no longer calls it gone. + different reads stay per tab. A post seen before tabs were read counts as the Top tab's (the tab named Top, + wherever the page lists it), so a complete Latest read no longer calls it gone. + - When a press takes the page elsewhere, what that other page sends stays in the capture and is not added to the + topic: only the trending page's own tabs are read, on the read and on a reparse. - The caps are higher so a read can reach the end, which is what lets it say a post is gone: 20 scrolls and 200 posts per tab by default (were 8 and 60), at most 40 and 400. A read's deadline is 2 minutes plus 12 s per scroll per tab: 10 minutes for both tabs at the defaults. diff --git a/plans/x-trending.md b/plans/x-trending.md @@ -470,6 +470,37 @@ These are rulings, not reasons. channel stays refused (it would hold X's queue for hours), and so does `redownload-incomplete-bucket` on one. A caller's `network: false` (fetch-chat's replay on disk) still skips the guard, as before. +## Review 3 (19 Nov), as built in `lane/x-followups` + +These are rulings, not reasons. + +- **A WINDOW ON `clips:saved-video` NEVER ASKS X.** It passes X's queue rule because it cuts from disk. If its + saved copy is gone or short when it runs, an X source's window fails ("the saved copy no longer covers this + window; ask again and it runs on X's queue"). Any other X window in a batch asks `xJobContextRefusal` before it is + fetched, and so does the single window's job. +- **A WINDOW IS X'S BY ITS URL, ON ANY CHANNEL.** `xJobAsksX` reads `params.webpageUrl` and + `params.items[].webpageUrl`: an X address makes the job X's (X's queue, the jar rule, the cap). A window with no + URL is its channel's (each item's channel, in a batch across channels). "No URL" never passes by itself. A copy's + or a mirror's address on another platform passes. `fetch-copies` passes, and its controller refuses a copy + whose address is X's. The single window and the batch queue an X address on X's queue. +- **X'S ADDRESSES** (`isXUrl`): x.com, twitter.com and their subdomains, and `t.co`. A host that merely ends in + "twitter.com" is not X's. +- **A LOST COUNT IS REBUILT ONLY FROM RECORDS SHOWN TO COVER THE DAY.** Retention never deletes an X job's + record while it may count. That covers retention by count and by age, and Clear logs. Since when it has kept + them is in `.jobs/x-records-kept.json`, written once. A rebuild that finds X activity in the day counts only + when that is over a day old, or when a finished job that ended over a day ago is still on disk (retention + deletes the oldest finished first). Otherwise it refuses and writes nothing. The refusal ends by itself within + a day. +- **THE WINDOWS ARE NOW MINUS THEIR LENGTH.** A start stamped after now counts in both windows. It never moves + the windows off the real starts and never prunes them. A start is recorded at the clock's time. +- **THE OPENING TAB IS THE ONE NAMED TOP**, wherever the page's answer lists it, else its first tab. +- **AFTER THE PAGE CHANGED, ONLY THE TREND'S OWN TIMELINES ARE READ.** Before this, the parser's filter was by + operation only. Now a tab not read because the page changed sets `pageTabsOnly` (on the read and on a + reparse). Only the timelines the trend answer names as its tabs are then ingested. The other answers stay + counted in the capture. +- **THE SCHEDULER QUEUES NO MORE X SYNCS THAN THE CAP HAS STARTS LEFT**, less the X jobs already waiting on X's + queue. It looks at the count and records nothing. + ## Open - The END of a timeline is confirmed by no capture yet (above). The parser is built so that a change is