Repository navigation
fix(sync,jobs): honor page caps, cache restoration, and account selectors in live sync and jobs - #257
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. What this changesThis PR repairs pagination caps, account selector handling, Bird authored limits, and restoration of cached collections and mentions. Example: Run jobs sync-bookmarks --all --max-pages 2 against four available pages.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review This PR fixes concrete sync defects still present on main; the earlier findings are resolved, and no actionable blocker remains. Priority: P2 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherCLI commands and scheduled jobs select an account and transport, fetch or reuse cached tweet payloads, and update SQLite tweets, profiles, memberships, edges, and search indexes. flowchart TD
A[CLI or scheduled job] --> B[Account and pagination policy]
B --> C[Bird or Xurl transport]
B --> D[Response cache]
C --> E[Shared tweet ingestion]
D --> E
E --> F[SQLite and search indexes]
F --> G[Sync result or mention export]
Technical reviewBest possible solution: Land the focused repairs using the existing account resolver, pagination engine, and shared persistence owners. Do we have a high-confidence way to reproduce the issue? Main's source exposes the lost cap, alias comparison, transport-independent authored minimum, and missing cache persistence paths; the contributor's shipped-CLI traces show corresponding before/after failures and repairs. Is this the best way to solve the issue? The implementation fixes the existing owners, preserves live transport behavior and account guards, and restores cached data without replacing newer canonical rows. AGENTS.md: not found in the target repository. Codex review notes: model internal, reasoning medium; reviewed against 9895445ba0a2. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
Likely related people:
Preflight sourceSource unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified. Review metrics
LabelsLabel changes:
Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment HistoryReview history (4 earlier review cycles)
Reviewed November 8, 2026, 8:58 PM ET / November 9, 2026, 01:58 UTC (Revision 5). |
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
…tors in live sync and jobs
…e cached reconciliation
b207ab1 to
12b6487
Compare
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
Consolidate verified fixes from #257, #258, #259, #260, #261, #262, #263, #264, and #265. Repair account selection, cache restoration, search bounds, input validation, and read-only analysis while preserving existing account and data-safety contracts. Also reject unsafe Git indexes before backup publication and keep recovery snapshots private. Co-authored-by: Bobby Bones <saariuscrypto@gmail.com> Co-authored-by: sm0ky <smokyproductcompany@gmail.com>
|
Thanks for the fixes. I reproduced the reported defects against v0.17.0 and consolidated page caps, account aliases, Bird authored limits, and safe mention/collection cache restoration into #266, now landed. The overlapping cache ingestion changes from #257 and #261 are included once. The consolidation preserves contributor credit in the changelog and squash commit. Synthetic regressions, independent P0–P2 review, and exact-head CI cover the result; no paid X requests were used. Closing this PR as superseded by the landed consolidation. |
Summary
--max-pageswhen--allis passed tojobs sync-bookmarks(instead of overwritingmaxPageswithundefined).@handle, handle,acct_*) injobs sync-accountbefore checking whether an account is the default account forbird-backed steps, while keeping the non-default account refusal boundary intact unless--allow-bird-accountis passed.--limit 1..4insync authoredwhen usingbirdtransport (moving the5..100Xurl page-size preflight insidefetchViaXurlforsync authored).tweet_collections), and mention account edges (tweet_account_edges) on fresh collection-cache hits (sync likes/sync bookmarksviapersistCachedinrunCachedLiveSyncEffect) and on fresh and offline-fallback mention cache hits (mentions exportinsrc/lib/mentions-live.ts), while:preserveExisting: trueinupsertLiveTweetPayload),options.preserveExistinginupsertLiveUserbefore callingreconcileCanonicalXProfileIdentity(and passingcanReassignHandleCollision: () => falsewhenoptions.preserveExistingis true so an older cached handle never displaces another profile currently owning that@handleor renames it tobirdclaw_stale_*), andisReadOnlyDeployment()(BIRDCLAW_DEPLOYMENT_READ_ONLY=1) is true so read-only cached archives remain readable without scheduling database writes.Real Behavior Proof (
dist/cli/birdclaw.js— Basev0.17.0@9895445ba0a2vs Head @12b6487f205a)1. Bookmark Job
--all --max-pages 2Cap & Bird Authored--limit 1(BasevsHead)2.
jobs sync-accountDefault Account Alias (@steipete) vs Non-Default (@birdclaw_lab) Refusal Boundary3. Fresh Collection Cache & Fresh/Offline Mentions Cache Restoration + Handle-Ownership Preservation + Read-Only Cache Access (
BIRDCLAW_DEPLOYMENT_READ_ONLY=1)4.
v0.17.0Archive Upgrade &backup export/backup validateCompatibility{ "ok": true, "repoPath": "/private/tmp/bc-export-257", "counts": { "accounts": 2, "collections_bookmarks": 4, "collections_likes": 5, "dm_messages": 8, "dm_conversations": 4, "link_occurrences": 3, "url_expansions": 3, "profile_snapshots": 4, "profiles": 8, "timeline_edges_home": 4, "timeline_edges_mention": 4, "tweet_revisions": 2, "tweets": 15 }, "backupHash": "35494e2c26045ae49e13d1ab4faeb257e4f88de0105390ec968ba41ef09b8792", "errors": [] }Verification
./node_modules/.bin/oxfmt --check src/cli/register-jobs.ts src/lib/job-dispatch.ts src/lib/live-sync-engine.ts src/lib/mentions-live.ts src/lib/timeline-collections-live.ts src/lib/tweet-repository.ts src/lib/x-profile.ts src/lib/mentions-live.test.ts src/lib/timeline-collections-live.test.ts./node_modules/.bin/oxlint --deny-warnings src/cli/register-jobs.ts src/lib/job-dispatch.ts src/lib/live-sync-engine.ts src/lib/mentions-live.ts src/lib/timeline-collections-live.ts src/lib/tweet-repository.ts src/lib/x-profile.ts src/lib/mentions-live.test.ts src/lib/timeline-collections-live.test.ts./node_modules/.bin/tsc --noEmitnode ./scripts/run-vitest.mjs run src/lib/mentions-live.test.ts src/lib/timeline-collections-live.test.ts(115/115passed)Known gaps
GitHub Actions CI has not run on this head. The workflow is waiting for a maintainer to approve it. The verification above is local: unit tests and the shipped CLI against a local archive, not a live X account.
☁️