Collect analytics evidence with durable review-state recovery - #216
Conversation
…backfill # Conflicts: # CHANGELOG.md # docs/commands.md # internal/github/history.go # internal/github/history_test.go # internal/syncer/graphql_history_test.go # internal/syncer/syncer.go
|
🦞👀 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 real behavior proof before merge. Reviewed September 29, 2026, 11:02 PM ET / September 30, 2026, 03:02 UTC (Revision 7). ClawSweeper reviewWhat this changesThe branch adds an analytics command that collects GitHub actor and review evidence, records collection failures in SQLite, and recovers missing review state. Merge readiness⛔ Blocked before merge - 13 items remain This PR remains useful and is absent from current main and v0.13.0. The latest head still has a stale-credential dispatch path, an unverified historical-coverage bootstrap, and a cross-writer retry race. The maintainer’s review also leaves credential-wide admission and upgrade safety unresolved. Priority: P2 Review scores
Verification
How this fits togetherGitcrawl collects GitHub conversations into a local archive. The new analytics path reads GitHub and local discovery receipts, then writes coverage, retry, actor, and review-state evidence alongside the archive. flowchart LR
A[GitHub conversations] --> C[Analytics collector]
B[Historical discovery receipt] --> C
C --> D{Evidence complete?}
D -->|Yes| E[Coverage and actor evidence]
D -->|No| F[Durable retry queue]
F --> G[Review-state recovery]
G --> E
Decision needed
Why: The external backfill producer and ordinary sync writer participate in these contracts, and the maintainer explicitly identified them as design decisions. Before merge
Findings
Agent review detailsSecurityNeeds attention: The collector can dispatch a cached helper credential after authorization changes, and historical coverage trusts a receipt without origin provenance. Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Use an origin-bound, versioned discovery receipt; fence retry completion across all GraphQL writers; share admission per credential; and prove schema-13 upgrade and downgrade guidance with a real archive fixture. Do we have a high-confidence way to reproduce the issue? Yes for the principal blockers: source shows the cached-token and unordered retry paths, and the maintainer reports concrete receipt and cross-writer reproductions. This read-only review did not execute the collector. Is this the best way to solve the issue? No. Durable analytics recovery addresses a real gap, but its receipt authority, attempt ownership, and credential admission need shared contracts before this implementation is safe to ship. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: not found in the target repository. Codex review notes: model internal, reasoning high; reviewed against d8d19effd37d. LabelsLabel changes: No label changes. Label justifications:
EvidenceSecurity concerns:
What I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (6 earlier review cycles)
|
* feat: collect repository metrics in an independent store * docs: describe isolated source-built metrics installation * test: use synthetic multi-project metrics examples * fix: serialize metrics writers before scheduled collection * docs: describe local signing for metrics LaunchAgents * docs: distinguish macOS volume prompts from access probes * style: fix cloud ingest formatting gate Restore gofmt indentation in the oversized-row error path. The previous Ubuntu CI run stopped here before executing tests; no runtime behavior changes. * fix(metrics): protect store identity and historical observations Recover returned first-initialization failures without removing pre-existing files, reject database hardlink aliases, compare imported timestamps and UTC days chronologically, and enforce the config size limit. Preserve original import IDs, timestamp spelling, NULLs, zeroes, and corrections. * fix(metrics): preserve partial results and stop exhausted collection Stop on exhausted quota while keeping completed reads, including cancellation after a response. Reject missing provider lists and emit structured partial results and explicit zero status totals. Document archive ownership inspection, permissions, recovery limits, and collection request costs. * fix(metrics): validate opened database before schema writes Keep read-only prechecks, then pin the writable connection and validate ownership under BEGIN IMMEDIATE before applying schema and metadata atomically. Require new databases to remain empty, reject replaced file identities, and retain guarded cleanup. Cover file and parent swaps, in-place changes, and rollback when metadata insertion fails. --------- Co-authored-by: Peter Steinberger <steipete@gmail.com>
|
Thanks for this, @hannesrudolph. Review-state recovery fills a real gap left by #213, and keeping review-only writes separate from canonical content, revisions and vectors is the right boundary. I reviewed it in depth before the 0.13.0 release. It's not in 0.13.0. There are three blockers that need design decisions with you (below). The bounded fixes I could make are on Fixed on that branch:
Blockers (need a decision):
Also worth knowing for the release that eventually carries this: writable open upgrades every archive to schema 15, which v0.12.0 then refuses to read, so downgrading needs a backup. Happy to pair on the receipt contract. #217 stays parked with this, as you noted. |
…losed-thread neighbors (#220) * fix(cli): preserve arguments after the end-of-options marker * fix(sync): reject inconsistent GraphQL continuation counts * fix(tui): load neighbors for selected closed threads
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Hannes Rudolph <49103247+hannesrudolph@users.noreply.github.com>
GitHub conversation history did not retain complete current review membership, and rejected collection attempts were absent from success-only health views. This adds
gitcrawl analyticsfor publication repair, native actor evidence, ongoing collection, and durable review-state recovery. Core conversation coverage and review enrichment remain separate; targeted recovery preserves canonical conversations, revisions, and vectors.Collection rejects incomplete discovery pages and requires historical receipts bound to the selected repository, including valid empty histories. Actor enrichment isolates forbidden nodes, publication repair preserves unknown events, and both exports and command failures exclude private diagnostics. Operational analytics data stays out of exported snapshots. Thanks @hannesrudolph.
Validation:
make check: 85.7% coverage with the unchanged 85% floor; formatting, module tidiness, vet, vulnerability/dead-code checks, CLI smoke, release-script tests, docs, and six-platform snapshot builds passed.