ox index github keeps every comment and PR state
Imports from ox index github and the daemon GitHub sync feed the members-only issue/PR reader and issue-driven plans. Four defects lose data.
| # | Defect | Fix | Test (red first) |
|---|---|---|---|
| 1 | A failed comment fetch writes a comment-less snapshot and marks the item known, so it is never retried until it changes upstream | On comment-fetch failure: write nothing, keep the previous KnownItem, hold the since cursor at the failed item's updated_at so the next sync re-lists and retries it; report a failed count | TestSyncPRs_CommentFetchFailureRetriesNextSync, TestSyncIssues_CommentFetchFailureRetriesNextSync |
| 2 | Fetcher drops PR draft and closed_at | Carry both through FetchedPR into PRFile (draft omitempty) | TestFetcher_ListPullRequestsKeepsDraftAndClosedAt + sync writes them |
| 3 | --days is ignored once a cursor exists (since = max(now-days, last_sync)) | Record the oldest window start covered (covered_since) in the sync state; when the requested window reaches further back, fetch from it | TestSyncPRs_WiderDaysAfterFirstSyncBackfills |
| 4 | CLI ox index github never indexes CodeDB (daemon does after every sync) | After sync, index via the daemon's code index (same pipeline), falling back to in-process IndexGitHubData | cmd/ox test: synced PR is searchable in CodeDB |
Files: cmd/ox/index.go, internal/ledger/github_sync.go, internal/ledger/github_data.go, internal/github/fetcher.go.
Checks: make lint, make test.

