Repository navigation
id: F12.13 phase 5 slice 4 — operator replica follow/serve CLI (#806) - #9806
Conversation
Codex Review Summary: ❌ FailedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
agent-note:v1 — Codex gate disposition for PR #9806 (task 15853) The Codex code review on commit dedf133 FAILED TO RUN (Codex usage limits, per the connector's own summary comment: status failed, review not completed) and produced ZERO findings — there are no review comments on any file (verified via the pulls comments API: []). Nothing exists to disposition. Same failure mode and disposition as slices 2 (PR #9400) and 3 (PR #9407) of this task. Merging on the strength of: id-worlds lib 640/640, id-cli lib 671/671, and a live writer/replica end-to-end run recorded in the PR body. |
|
Caution Review failedThe pull request is closed.
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. |
What
Slice 4 of F12.13 phase 5 for #806 (task 15853): the operator CLI for durable replicas. Slices 1–3 (lease primitive #9389, admission enforcement #9400, durable-open admission +
ReplicaStatus#9407) had no CLI caller; this slice wires them together.Library (
id-worlds,world_replication_net) — the test-only feed client pattern is promoted into a real client:sync_replica_once(endpoint, addr, world, admin_token, receiver)— one replication session, absorbs the writer's snapshot into aDurableReceiver, returns the verified chain cursor. Any failure aborts the session and leaves the previous committed cursor standing.follow_replica_session(...)— same session kept open for live tail batches,on_commitper durable cursor; a session that committed at least once returns its count instead of the stream error, so follow loops can reconnect (every new session re-snapshots — a reconnect cannot lose a batch).CLI (
id-cli) — newid world replica <NODE>:--dirfrom the pinned writer (--sourcedefaults to the writer's node ID, the key it signs the feed with), opens it viaopen_replica_with_admissionwith an optional--lease <FILE>(JSONSignedAdmissionLease), and prints one status JSON object: source, world, cursor (entries/sequence/header_version), chain cursor (ordinal/digest), lease expiry + remaining admission window,admits_new_spectators.WorldProtocolover a single-world hub) until Ctrl-C. The replica deliberately does not re-export the replication ALPN — it cannot sign for the pinned source.--oncesyncs + reports only;--followkeeps the journal current across reconnects, one JSON line per commit, without serving.Oracle / tests
sync_replica_once_absorbs_the_writer_snapshot(oracle: acceptance item 1 of id: F12.13 journal replication (read replicas over a signed stream) #806 phase 5): a client session absorbs a live writer's snapshot into a durable receiver; a wrong admin token commits nothing and the prior cursor stands.cargo test -p id-worlds --lib— 640 passed;cargo test -p id-cli --lib— 671 passed.id serve --world --world-name lobby+id world replica <node> --once→{"admits_new_spectators":false,"chain_cursor":{"digest":"df4f4a42…","ordinal":1},"cursor":{"entries":1,"header_version":1,"sequence":0},…,"source":"322034fb…","world":"lobby"}— gated with no lease held, exactly the policy-B posture; a second run resyncs in place to the identical cursor; a wrong admin token fails withreplication stream closed by the writerand commits nothing.Remaining on #806 (stays open)
effective_scopesdirectory facts tied to the pinned source/cursor (todayopen_replicaconsumes local sidecars fixed at open).Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.