Skip to content

Release v0.1.2: drop device identity, incremental scan, timezone - #4

Merged
akarineren merged 6 commits into
mainfrom
dev
Jul 26, 2026
Merged

Release v0.1.2: drop device identity, incremental scan, timezone#4
akarineren merged 6 commits into
mainfrom
dev

Conversation

@akarineren

Copy link
Copy Markdown
Member

What

Cuts CLI v0.1.2.

Device identity removed

installation_id no longer exists. Event identity is the content hash already
carried in each event, so scoping dedupe to a device demoted a globally unique
id to unique-per-device — the same event re-inserted once per device identity
and double-counted its tokens. The server now dedupes on (user, event id);
device name/platform/version remain as display metadata only.

This also removes the generated ~/.tokitoki/installation_id file and its
crypto/rand/encoding/hex machinery from the store.

Incremental scan

scanned_files records each source file's size and mtime so unchanged files are
skipped instead of reparsed on every run. Existing databases pick the table up
automatically on open.

Timezone

Uploads carry the machine's IANA zone so per-user day boundaries are correct
without the server guessing.

Verification

  • go vet ./... clean
  • go test -race ./... all pass
  • End-to-end against a dev server: 38502 events uploaded, 0 duplicate
    (user, event id) groups, per-day counts match the local queue exactly

- Updated LoadEntriesFromPaths function to accept a file filter parameter for selective file processing.
- Modified Provider struct to include a file filter and added WithFileFilter method for configuration.
- Adjusted scanning logic to skip unchanged files based on their stat snapshots.
- Added tests to verify the behavior of file filtering and unchanged file handling.
@akarineren
akarineren merged commit 3a5d9a0 into main Jul 26, 2026
1 check passed
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