Repository navigation
Conversation
Add the magpie command: `crawl` lists the Geekhack boards down to the last run's watermark, fetches new or changed threads politely, and stores them with keyset candidates in the ingest schema; `promote` inserts complete, unmatched candidates into Keebdex as Pending keysets with the `forum` revision source. `topic` parses one thread without a database. fetch_all now takes a schema client and an order column. The workflow has no schedule until the ingest schema is applied. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Fetcher compared time.monotonic(), which counts from boot, against an initial last-request time of 0. On a machine up for less than the delay, such as a fresh CI runner, the first request (robots.txt) waited too, so test_requests_wait_for_the_delay failed in CI but passed locally. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
anhthang
left a comment
There was a problem hiding this comment.
Review notes: three issues worth fixing before merge (promotion ordering, rollback failure, retry counter) and three minor ones. A related trigger issue is commented on keebdex/supabase#7.
- promote: when the candidate was triaged after it was read, delete the keyset and kits just inserted instead of leaving an orphan; a failed rollback is logged and no longer stops the other promotions - plan: new activity in a listing resets fetch_attempts and fetch_error, so a thread that gave up gets the full backoff again - fetch: retry robots.txt; 4xx means no rules, 5xx, 429 or network errors after retries fail the run instead of crawling without rules (RFC 9309) - crawl: a unique violation on the one-running index becomes RunningError - docs: re-wrap an overlong AGENTS.md line and describe the new behavior Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
anhthang
left a comment
There was a problem hiding this comment.
Thanks for the fixes in 36c6206: all six earlier points look resolved (the magpie tests pass locally, 152 passed). The rework added one issue worth fixing before merge (a rollback after a claim that actually committed) and two minor summary-count issues.
…restored candidates - promote: run the claim outside the kits rollback; when it raises, read the candidate back and remove the keyset only when the candidate is not promoted to it (kept when it cannot be read), so no candidate points at a deleted keyset - promote: return the topics staff triaged meanwhile apart from failed ones and list them on their own line instead of under Inserted - crawl: count candidates the supersede trigger puts back to new when a first post reverts (keebdex/supabase#7), from the state read before the insert Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
anhthang
left a comment
There was a problem hiding this comment.
Thanks: 24f31c5 resolves all three points. Reading the candidate back after a failed claim covers every case, and the summary now reports triaged and restored candidates separately. Tests (250 passed), ruff, and markdownlint are clean locally. One small summary nit below; it doesn't block merging.
# Conflicts: # AGENTS.md # README.md
Keebdex now takes revision sources as `<job>.<origin>` and no longer accepts `forum`, which would record promoted keysets as `sql`. Build the source with revision_source() and drop the docs' mention of a `forum` source in the ingest migration. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
I merged |
A topic went into `triaged` before its keyset was removed, so a failed removal listed it both as "keyset removed again" and as failed while the keyset stayed in Keebdex. It is now listed as triaged only when the removal succeeds, and only as failed otherwise. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…r job apply.py and __main__.py had grown to hold every command's logic. Move the ingest-table reads and writes to ingest.py, the Keebdex reads and promotion writes to keebdex.py, and each command to its own module (crawl, promote, reextract) with summary.py for what their summaries share. __main__.py keeps only argument parsing and `topic`. Tests follow the same split, with the shared fakes in tests/magpie_fakes.py. No behavior change. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Add the magpie command:
crawllists the Geekhack boards down to the last run's watermark, fetches new or changed threads politely, and stores them with keyset candidates in the ingest schema;promoteinserts complete, unmatched candidates into Keebdex as Pending keysets with theforumrevision source.topicparses one thread without a database.fetch_all now takes a schema client and an order column. The workflow has no schedule until the ingest schema is applied.