Skip to content

Conversation

@CSRessel
Copy link
Collaborator

No description provided.

- Bump schema_version from 1 to 2
- Add opt_out field to InstallState (defaults to false via serde)
- Change client_id from static "nori-cli" to deterministic UUID
- Implement generate_client_id() using SHA256 hash of "nori_salt:hostname:username"
- Format client_id as UUID: 8-4-4-4-12 (matches JS/Python implementation)
- Update new_first_install() to accept client_id parameter
- Maintain backward compatibility: v1 state files deserialize correctly
- All tests pass (36/36)
…ing, and flat event schema

Analytics Opt-Out:
- Add NORI_NO_ANALYTICS environment variable (highest priority)
- State file opt_out field respected (defaults to false)
- State file still updates even when opted out

Session ID:
- Generate ephemeral UUID for each process run
- Pass to all analytics events via session_id field
- Never persisted to disk

User Resurrection:
- Detect when last_launched_at > 30 days ago
- Send user_resurrected event before main event
- Resurrection event has same properties as session_start

Flat Event Schema:
- New FlatEventRequest structure: event, client_id, session_id, timestamp, properties
- Event names: app_install, app_update, session_start, user_resurrected
- EventProperties: version, os, arch, is_ci
- Replaces nested event_params structure
- Analytics endpoint: https://noriskillsets.dev/api/analytics/track
- Timeout reduced to 5 seconds

All tests pass (43/43)
- Remove @current-session markers from 12 permanent tests
- Delete test_generate_client_id_uses_nori_salt (tests implementation detail rather than behavior)
- Remaining tests validate real behavior and API contracts
@CSRessel
Copy link
Collaborator Author

Closing in favor of #226

@CSRessel CSRessel closed this Jan 20, 2026
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.

3 participants