Repository navigation
fix(timeline,dms,lists): restore cached home timeline rows and validate DM/List CLI inputs - #261
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 restores cached home timeline data while preserving newer records and rejects invalid DM and List CLI inputs. Example: Run sync timeline with a fresh cache containing tweet 910 after its home membership was removed.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep open: this PR fixes current cache-restoration and CLI-validation bugs, with no actionable introduced defect found. Priority: P2 Before mergeNone. FindingsNone. Tests
Agent review detailsHow this fits togetherCLI commands select an account and read cached or live transport payloads; shared ingestion stores profiles, tweets, account memberships, and searchable text in SQLite. flowchart TD
A[CLI input validation] --> B[Account and transport selection]
B --> C[Bird and Xurl]
B --> D[Response cache]
C --> E[Shared tweet ingestion]
D --> E
E --> F[SQLite archive and search index]
Technical reviewBest possible solution: Restore cached timeline data through existing ingestion owners while preserving newer stored values, numeric identity, and read-only access. Do we have a high-confidence way to reproduce the issue? Current-main source shows the missing home-cache persistence hook and auto-DM Xurl limit check, corroborated by contributor-supplied base/head CLI output. Is this the best way to solve the issue? The patch uses existing cache, ingestion, identity, and numeric-validation owners and resolves the previous preservation findings without a new user-facing setting. 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: No label 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 (3 earlier review cycles)
Reviewed November 8, 2026, 8:38 PM ET / November 9, 2026, 01:38 UTC (Revision 4). |
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
3e36a68 to
1cab905
Compare
…imit, and validate CLI/HTTP filters
…ert /api/query contract change
…ciliation and scope to CLI/sync contracts
1cab905 to
69928a5
Compare
|
@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 safe home-timeline cache restoration, transport-specific DM limits, and DM/List CLI validation 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
sync timelinecache hits viapersistCachedinrunCachedLiveSyncEffect, while preserving newer stored tweet metrics (preserveExisting: true), checkingoptions.preserveExistingbefore callingreconcileCanonicalXProfileIdentity(and disabling handle-collision reassignment during cache hydration so older cached handles never displace an existing canonical profile or rename a current owner tobirdclaw_stale_*), and skippingpersistCachedwrites whenBIRDCLAW_DEPLOYMENT_READ_ONLY=1so read-only cached archives remain readable without database writes.parseLivePageSize(limit, { min: 1, max: 100 })insidefetchViaXurlduringdms sync --mode autosolimit > 100falls back tobirdwhen available instead of sending an out-of-rangemax_resultsrequest to Xurl.--replied/--unrepliedflags and--sort(recent | followers) indms list, and validate--limit >= 1inlists membersbefore database lookup./api/queryand webroute-searchunchanged onmain(9895445ba0a24134cc6e07c327502134e18a58ea).Real Behavior Proof (
dist/cli/birdclaw.js— Basev0.17.0@9895445ba0a2vs Head @69928a5c563e)1. Home Timeline Cache Restoration, Handle-Ownership Preservation (
user 42: @sam -> @alice,user 43: @sam), & Read-Only Cache Access (BIRDCLAW_DEPLOYMENT_READ_ONLY=1)2. Auto DM Xurl Limit & CLI Input Validation (
dms sync --mode auto --limit 101,dms list,lists members)3.
v0.17.0Archive Upgrade &backup export/backup validateCompatibility{ "ok": true, "repoPath": "/private/tmp/bc-export-261", "counts": { "accounts": 2, "collections_bookmarks": 2, "collections_likes": 3, "dm_messages": 8, "dm_conversations": 4, "link_occurrences": 3, "url_expansions": 3, "profile_snapshots": 4, "profiles": 8, "timeline_edges_home": 6, "timeline_edges_mention": 2, "tweet_revisions": 2, "tweets": 8 }, "backupHash": "25fff134ee8d5a3f5c1d942704382d3b4c561ae4c3317dbd6c927a95806b6e74", "errors": [] }Verification
./node_modules/.bin/oxfmt --check src/cli/register-dms.ts src/cli/register-lists.ts src/lib/dms-live.ts src/lib/live-sync-engine.ts src/lib/timeline-live.ts src/lib/tweet-repository.ts src/lib/x-profile.ts src/cli/local-commands.test.ts src/lib/dms-live.test.ts src/lib/timeline-live.test.ts./node_modules/.bin/oxlint --deny-warnings src/cli/register-dms.ts src/cli/register-lists.ts src/lib/dms-live.ts src/lib/live-sync-engine.ts src/lib/timeline-live.ts src/lib/tweet-repository.ts src/lib/x-profile.ts src/cli/local-commands.test.ts src/lib/dms-live.test.ts src/lib/timeline-live.test.ts./node_modules/.bin/tsc --noEmitnode ./scripts/run-vitest.mjs run src/lib/timeline-live.test.ts src/lib/dms-live.test.ts src/cli/local-commands.test.ts(69/69passed)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.
☁️