Skip to content

[leas code] Share usage event attribution - #13574

Open
nwparker wants to merge 1 commit into
nwparker/leas-code-usage-store-lifecyclefrom
nwparker/leas-code-usage-event-attribution
Open

[leas code] Share usage event attribution#13574
nwparker wants to merge 1 commit into
nwparker/leas-code-usage-store-lifecyclefrom
nwparker/leas-code-usage-event-attribution

Conversation

@nwparker

Copy link
Copy Markdown
Contributor

Summary

  • Shares Codex/OpenCode worktree canonicalization, local-day attribution, containment, project keys, and fallback labels.
  • Reuses generic session/daily record shapes and removes six unused provider breakdown exports.
  • Makes attribution synchronous while preserving provider-specific event fields and ownership ordering.
  • Fixes POSIX/WSL case handling on Windows, drive/UNC containment, forward-slash UNC recognition, non-native realpath resolution, and POSIX relative backslashes.
  • Advances the local cache schemas so old projections are reparsed while preserving the user's tracking opt-in.

Size

  • 376 additions, 660 deletions: 284 fewer lines overall
  • Production code: 182 additions, 463 deletions: 281 fewer lines

Validation

  • 11 focused Vitest suites / 72 tests
  • pnpm run typecheck
  • pnpm run build:electron-vite
  • Focused oxlint and oxfmt checks
  • Changed-code quality, reliability, max-lines, and diff checks
  • Three independent reviews found no remaining P0-P2 correctness, migration, cross-platform, remote, or security findings

Compatibility

No RPC/wire, persisted record shape, dependency, network, auth, or UI changes. Cache schema bumps only invalidate local derived projections.

No visual change.

Stack

Stacked on #13558 (nwparker/leas-code-usage-store-lifecycle). Retarget to main after the base lands.

The bounded-memory usage work should restack scanner call sites onto attributeUsageEvent while preserving provider ownership order and lifecycle writer/generation-veto behavior.

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.

1 participant