GeezerVison is showing github.com — feat(id-worlds): policy-B writer-signed admission lease for replicas (#806) by dezren39 · Pull Request #9389 · developing-today/code
Conversation
dezren39
commented
Nov 13, 2026
•
edited by blacksmith-sh
Bot
Loading
Uh oh!
There was an error while loading. Please reload this page.
Summary
F12.13 phase 5 slice for #806: the policy-B admission lease primitive.
The offline-admission decision (design doc 2026-11-01_design_id806.md section 8) is settled: policy B was adopted by the ruling on #806 (comments 6599883036 and 6634842315) — a replica may admit NEW spectators during a writer outage only under a writer-signed admission lease; at expiry new admissions stop until resync; lease duration is configurable; existing verified sessions and read serving at the last verified cursor are unaffected.
This PR adds that primitive to id-worlds as world::admission_lease:
- AdmissionLease / SignedAdmissionLease: signed by the writer key replicas already pin for the replication stream, under a dedicated domain tag (developing-today/id/world-admission-lease/v1), canonical postcard encoding of every field, verify_strict — mirroring the replication envelope rules.
- verify(pinned_source, world_id, now) enforces, in order: known version, signer equals the pinned source, lease world equals the replica world, signed duration at most MAX_ADMISSION_LEASE_DURATION_MS (7 days — policy B exists to bound revocation staleness), valid signature, and now inside [issued, expires).
- issue() refuses zero and over-max durations and window overflow, so a writer never mints a lease a verifier would refuse.
- admits_new_spectator() is the single predicate an admission path must pass; remaining_ms() supports operator staleness reporting.
- replica.rs module doc updated: the phase 4 note claiming the policy choice was open is corrected to record policy B and point at the primitive. Serving behavior is unchanged in this PR.
Tests (oracle: the policy B ruling text)
cargo test -p id-worlds admission_lease — 8 passed: valid lease admits during the window; expired lease stops new admissions (expiry instant excluded); unpinned signer refused; wrong world refused; tampered expiry invalidates the signature; not-yet-valid refused; overlong and zero durations refused at issue and at verify; unknown version refused.
Regression: cargo test -p id-worlds world::replica (plus replication matches) — 40 passed. Clippy is not installed on the build laptop; CI covers it.
Remaining phase 5 (not in this PR)
Operator CLI/configuration to follow a pinned source into a durable replica directory and serve it; wiring the lease check into the session-admission path; authenticated provision/refresh of module artifacts and directory facts tied to the pinned source and verified cursor; source/world/cursor/staleness reporting at the operator surface; resilience exercises (outage, restart, reconnect, compaction/reset). Tracked as the follow-on to queue task 6699; #806 stays open until full acceptance holds.
Queue: task 6699, lane any-a.
![Autofix with [code]smith](/api/image?u=https%3A%2F%2Fcamo.githubusercontent.com%2F33b6f70f3541c4e93f4503d29cbfec051fa1b040d8e0ae9313a51c4ece44a627%2F68747470733a2f2f70722d636f6d6d656e74732d6173736574732e626c61636b736d6974682e73682f636f6465736d6974682f6175746f6669782d776974682d636f6465736d6974682d6461726b2d33782e706e67)
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
…806)
F12.13 phase 5 slice: the offline-admission policy for NEW spectators after a writer outage is settled (policy B, adopted by the ruling on #806 comments 6599883036/6634842315), and this adds its signed primitive to id-worlds: AdmissionLease/SignedAdmissionLease in world::admission_lease, domain-separated under its own tag, signed by the writer key replicas already pin for the replication stream. Verification binds signer==pinned source, world, the [issued, expires) window, and a 7-day maximum duration bounding revocation staleness; expiry stops new admissions until resync while existing sessions and read serving are unaffected. 8 tests named to the policy-B oracle cases (valid window, expiry, unpinned signer, wrong world, tampered expiry, not-yet-valid, overlong/zero duration, unknown version) pass; replica/replication regression 40 pass. replica.rs module doc updated to record the settled policy. Remaining phase 5 (operator follow/serve CLI, wiring the lease check into session admission, authenticated module/directory refresh, resilience exercises) stays on task 6699 follow-on. Refs #806.
Codex Review Summary: ❌ Failed
This comment shows the latest Codex review activity on this pull request.
| Review |
Status |
Commit |
Review trigger |
| 📝 Code Review |
❌ Failed 2026-11-13T08:44:15.677844Z We couldn’t complete this review. Comment @codex review to try again. |
d708216 |
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.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
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 59 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:
c22716fd-91ec-41fb-b5b4-6e9b7ad7ddf7
Commits
-
Reviewing files that changed from the base of the PR and between eaec422 and d708216.
Files selected for processing: 3
-
pkgs/id/crates/id-worlds/src/world/admission_lease.rs
pkgs/id/crates/id-worlds/src/world/mod.rs
pkgs/id/crates/id-worlds/src/world/replica.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
-
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
Codex gate disposition (queue task 6699, lane any-a): the Codex code review on commit d708216 did not complete — Codex reports its usage limits for code reviews are reached, so the review run failed with zero findings produced (the summary flag reflects the failed run, not a code finding). There are no Codex findings to disposition. CodeRabbit likewise skipped on its free-review limit.
Merge basis under the standing criteria: targeted tests verified locally on the laptop (admission_lease: 8 passed; replica/replication regression: 40 passed), diff is the single-purpose slice described in the PR body, and no held restriction applies to issue #806. CI runs on main only in this repo; no PR-branch Actions runs exist.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
This was referenced Nov 13, 2026
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Milestone
No milestone
Development
Successfully merging this pull request may close these issues.
Uh oh!
There was an error while loading. Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
|