feat(stats): add Cursor attribution parity#936
Conversation
roborev: Combined Review (
|
roborev: Combined Review (
|
|
fixing windows CI |
roborev: Combined Review (
|
A foreground serve startup can finish between the first runtime probe and the later start-lock check. In that window the old runtime object is stale, and auto-start replacement can stop the daemon that just lost the race instead of adopting the newly published runtime. Re-reading the current compatible or incompatible replacement target before stopping keeps the replacement decision tied to current runtime state, and the regression test forces the interleaving that made Windows CI flaky.
c7021fc to
3c85e57
Compare
roborev: Combined Review (
|
|
This PR has cleared review but I think we need to take a step back and think about how this API is realistically going to evolve to support many harnesses and providers. Since I need to get a release out to fix bugs in 0.35.0 I'm going to cut that now and then take time to give this appropriate consideration |
tkmx-client still needs Cursor attribution parity before it can retire the last legacy Cursor collector. AgentsView already ingests Cursor transcripts, but it still ignores
~/.cursor/ai-tracking/ai-code-tracking.db, so the stats payload has no commit-level tab, composer, human, or conversation-count attribution from Cursor itself.This keeps the scope to the surviving Cursor attribution slice from #358. The new reader lives beside the existing Cursor parser, can be redirected with
AGENTSVIEW_CURSOR_ATTRIBUTION_DB, follows Cursor's live schema by windowing scored commits onscoredAtwhile leaving the textcommitDatecolumn as metadata, and leaves transcript discovery untouched. Aggregation stays owned by service stats code, and the result lands in a dedicated top-levelcursor_attributionblock rather than being mixed into git-derivedoutcome_statsor folded into the session-derivedagent_portfoliomaps. That preserves the meaning of the existing stats owners while giving downstream consumers one explicit Cursor attribution surface to read.Project include and exclude filters still suppress the block because Cursor's local attribution DB has no project key, and non-Cursor agent filters keep it nil for the same reason. The human-readable stats output only renders the section when the service-owned block is present.
PR #413 stays separate. It covers Cursor
state.vscdbsession ingestion, which is a different Cursor data source fromai-code-tracking.dband does not provide the line-attribution totals required here.Closes #358