Skip to content

id-worlds: record join and revoke times for the owner report - #11999

Merged
dezren39 merged 1 commit into
mainfrom
claude/id-join-times-11960
Nov 19, 2026
Merged

dezren39 merged 1 commit into
mainfrom
claude/id-join-times-11960

Conversation

@dezren39

@dezren39 dezren39 commented Nov 19, 2026 •

Copy link
Copy Markdown
Member

Refs #11960

Before:

The owner report could not say how many people joined or were revoked in a time window. The world journal recorded who was issued and revoked, but not when, so joins in window was always reported as unavailable.

After:

New Issued and Revoked journal entries carry the time they happened (issued_at, revoked_at, unix ms). The owner report counts joins and revokes in the requested window from those times, and says plainly when it can't be exact: it reports when join times start, how many older joins have no time, and marks a window that starts before the first recorded time as incomplete. id world owner prints the counts and the join and revoke time next to each recent join.

How:

  • JournalEntry::Issued gains issued_at and Revoked gains revoked_at, both optional and skipped when absent, so older entries keep their bytes. An entry that carries a time needs journal version 12 (JOURNAL_VERSION_JOIN_TIMES); restore refuses one under an older header, like every earlier format bump.
  • Mint stamps issued_at from the world clock; both actor revoke paths stamp revoked_at on every capability the revoke takes down (revoke_tree_at). Checkpoints carry both times through compaction, and restore puts them back, including on delegates revoked by an ancestor.
  • world_owner_report: JoinsSection gains in_window_complete, untimed, revoked_in_window and revoked_untimed; new unavailable reasons RevokeTimeNotRecorded and NoJoins. Zero joins is a measured zero.
  • Tests: exact window counts, pre-upgrade journals staying untimed, an untimed join after timed ones moving available_since, version refusal, a checkpoint and restore round trip of both times, and a proptest that window counts match a direct count. Test journals that splice in freshly minted entries now raise their header the way FileJournal does.

Rollback note: once a binary with this change mints or revokes in a world, that world's journal header moves to version 12, and older binaries will refuse to open it. Same shape as earlier journal format bumps.


Generated by Claude Code


Autofix with [code]smith
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

Issued and Revoked journal entries carry optional issued_at and
revoked_at (journal version 12). The owner report counts joins and
revokes in a window from them and says when the count is incomplete;
`id world owner` prints the counts and times.

Refs #11960

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@dezren39
dezren39 requested a review from a team as a code owner November 19, 2026 03:08
@coderabbitai

coderabbitai Bot commented Nov 19, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 15 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: aae40217-9697-4401-9ad4-7af0725eb42c
Commits

Reviewing files that changed from the base of the PR and between 42efc27 and 2f7defe.

Files selected for processing: 15

  • pkgs/id/benches/world_bench.rs
  • pkgs/id/crates/id-cli/src/commands/world/owner.rs
  • pkgs/id/crates/id-worlds/src/world/actor.rs
  • pkgs/id/crates/id-worlds/src/world/core.rs
  • pkgs/id/crates/id-worlds/src/world/core/operations.rs
  • pkgs/id/crates/id-worlds/src/world/journal.rs
  • pkgs/id/crates/id-worlds/src/world/mod.rs
  • pkgs/id/crates/id-worlds/src/world/replica.rs
  • pkgs/id/crates/id-worlds/src/world/tests.rs
  • pkgs/id/crates/id-worlds/src/world_owner_report.rs
  • pkgs/id/crates/id-worlds/src/world_owner_report_tests.rs
  • pkgs/id/crates/id-worlds/src/world_session/tests.rs
  • pkgs/id/crates/id-worlds/src/world_store.rs
  • pkgs/id/tests/probe_restoreid0.rs
  • pkgs/id/tests/world_roles.rs
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@dezren39
dezren39 merged commit b932474 into main Nov 19, 2026
1 check passed
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 19, 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-19T03:09:54.090420Z 2f7defe 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.

2 participants