Skip to content

Bound service usage retention and make record replays idempotent - #1457

Open
appergb wants to merge 1 commit into
betafrom
fix/usage-sync-compat
Open

appergb wants to merge 1 commit into
betafrom
fix/usage-sync-compat

Conversation

@appergb

@appergb appergb commented Nov 18, 2026

Copy link
Copy Markdown
Collaborator

What changed

  • Keep the v1 local usage ledger within both its 10,000-record and 8 MiB read limits. Resolve retention ties by UUID so insertion order cannot change which records survive.
  • Merge immutable UUIDs before the atomic write, reject same-ID conflicts without touching disk, and skip identical or already-evicted replays.

Verification

  • cargo test --locked --manifest-path openless-all/app/Cargo.toml -p openless-core --lib usage_ledger::tests --no-default-features (12 passed).
  • File-backed tests cover 10 + 7 = 17, repeated/reversed merges after reopening, concurrent +4 and +2 converging to 23, transactional conflict rejection, and bounded retention.

Scope

This is a local ledger prerequisite, not an encrypted sync rollout. No cloud route, disclosure, v1 snapshot, account/key lifecycle, marketplace contract, or deployment changes.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-18T16:44:14.913040Z 81cc300 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

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