Skip to content

[codex] collect cursor usage events#27

Merged
Miss-you merged 1 commit into
mainfrom
codex/ebta-006-cursor-events
Apr 16, 2026
Merged

[codex] collect cursor usage events#27
Miss-you merged 1 commit into
mainfrom
codex/ebta-006-cursor-events

Conversation

@Miss-you

Copy link
Copy Markdown
Owner

Summary

  • add native Cursor CollectUsageEvents support by mapping existing CSV rows to provider.UsageEvent
  • preserve current Cursor CSV semantics, row-based identity, bad-data skipping, and default/explicit directory behavior
  • record EBTA-006 workspace artifacts, verification, and multi-agent review notes

Validation

  • go test ./provider/cursor -run 'TestCollectUsageEvents'
  • go test ./provider/cursor -run 'Test(CollectUsageEvents|ParseUsageCSV|CollectSessions)'
  • go test ./provider/cursor ./cursor
  • go test ./stats -run TestAggregateEvents
  • make fmt
  • make test
  • make vet
  • make build
  • make lint

Review Notes

Multi-agent review found one path-spelling-dependent EventID issue in the first implementation. The final patch fixes it by keeping EventID row-based (SessionID) and SourcePath separate.

- Add native Cursor UsageEvent collection that reuses the existing CSV parser and preserves row-based identity.

- Cover event mapping, malformed local data, and default versus explicit Cursor directory rules.

- Record EBTA-006 workspace review and verification evidence.
Copilot AI review requested due to automatic review settings April 16, 2026 09:37

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds native Cursor CollectUsageEvents support so Cursor CSV usage rows can be emitted as provider.UsageEvent records (enabling event-based aggregation flows later) while preserving existing Cursor CSV parsing and collection semantics.

Changes:

  • Implement (*cursor.Provider).CollectUsageEvents by reusing existing CSV discovery + parseUsageCSV and mapping each parsed row to a provider.UsageEvent.
  • Add focused provider tests covering row→event mapping, invalid CSV skipping, deterministic ordering, and default-root vs explicit-dir scan rules.
  • Record EBTA-006 workspace artifacts (review notes, test strategy, verification) and mark EBTA-006 as done in the EBTA plan doc.

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated no comments.

Show a summary per file
File Description
provider/cursor/parser.go Adds CollectUsageEvents and row→event mapping (SourcePath, EventID) while keeping existing CSV behavior.
provider/cursor/parser_test.go Adds tests for event collection/mapping, invalid-data skipping, deterministic ordering, and directory resolution rules; asserts interface implementation.
docs/plans/2026-04-16-event-based-token-aggregation-task.md Updates EBTA task board entry to mark EBTA-006 complete with verification notes.
workspace/EBTA-006/verification.md Documents executed gates and verification evidence for EBTA-006.
workspace/EBTA-006/test_strategy.md Captures the intended test plan and verification commands for EBTA-006.
workspace/EBTA-006/review.md Records multi-agent review findings and the resolved EventID stability concern.
workspace/EBTA-006/original_impl.md Summarizes pre-change Cursor provider semantics and the identified gap.
workspace/EBTA-006/new_impl.md Documents considered implementation options and rationale.
workspace/EBTA-006/final_impl_v1.md Documents the final implementation plan and acceptance criteria details.
workspace/EBTA-006/final_impl.md Points to the final plan used for the implementation.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Miss-you
Miss-you merged commit 0b83f6a into main Apr 16, 2026
11 checks passed
@Miss-you
Miss-you deleted the codex/ebta-006-cursor-events branch April 16, 2026 09:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants