Skip to content

fix(id): reject unsupported replication journal versions (#4471) - #4540

Merged
dezren39 merged 6 commits into
mainfrom
queue/6418-4471-reject-repl-version
Nov 3, 2026
Merged

dezren39 merged 6 commits into
mainfrom
queue/6418-4471-reject-repl-version

Conversation

@dezren39

@dezren39 dezren39 commented Nov 2, 2026 •

Copy link
Copy Markdown
Member

Summary

ReplicationTracker::new
-  -> Self
+  -> Result<Self, ReplicationError> // validates JOURNAL_VERSION..=MAX_JOURNAL_VERSION

accept(header_version)
-  reject only versions above MAX_JOURNAL_VERSION
+  reject versions outside JOURNAL_VERSION..=MAX_JOURNAL_VERSION before mutation

Adds signed v0 Snapshot/Tail/Terminal regressions, invalid constructor controls, and v1/v2/v3 acceptance coverage. Closes #4471; queue task 6418.

Evidence

  • Before: the signed v0 Snapshot regression was accepted and rebased the tracker.
  • After: cargo test -p id --lib world::replication on this PR head — 13 passed, 0 failed.
  • GitHub CI coverage is incomplete on this PR: the required basic proxy-port check and id PR matrix were not triggered. Details are in the CI coverage comment below.

Merge Danger

Door: Two-way; the validation change can be reverted. ReplicationTracker::new now returns Result, and all in-repo callers were updated.

Blast Radius: Low — replication tracker construction and frame acceptance only.

@dezren39
dezren39 requested a review from a team as a code owner November 2, 2026 18:57
@coderabbitai

coderabbitai Bot commented Nov 2, 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 48 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: f5bcef52-90ac-46b3-bb58-b365118d8696
Commits

Reviewing files that changed from the base of the PR and between b9e2eaf and 094914b.

Files selected for processing: 2
  • pkgs/id/src/world/replication.rs
  • pkgs/id/src/world/replication_receiver.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

CodeRabbit Verify

  • Run CodeRabbit Verify to test the changes in this pull request.

@chatgpt-codex-connector

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

Copy link
Copy Markdown

Codex Review Summary

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

Review Status Commit Review trigger
📝 Code Review ⚠️ Failed 2026-11-03T15:13:45.539376Z
We couldn’t complete this review. Comment @codex review to try again.
094914b New commits
ℹ️ 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.

@dezren39

dezren39 commented Nov 2, 2026

Copy link
Copy Markdown
Member Author

CI coverage gap

Fresh gh pr checks / gh run list --event pull_request on this PR showed only basic: OpenCode metered-provider guard queued/pending (CodeRabbit skipped). The policy-required basic: proxy port fallbacks check did not run. Inspection confirms .github/workflows/nix-ci.yml has only push to main, schedule, and workflow_dispatch triggers, despite comments describing PR coverage.

The id PR matrix also did not run: .github/workflows/id-check.yml likewise has no pull_request trigger, so the checks listed in .github/scripts/id-pr-checks.txt were not exercised by GitHub. The local cargo test -p id --lib world::replication passed 13/13 on this PR head. Workflow changes are outside task 6418; reporting the missing CI coverage rather than treating it as passed.

@dezren39

dezren39 commented Nov 2, 2026

Copy link
Copy Markdown
Member Author

Fresh on head 53a424d: (cd pkgs/id && ~/tools/fleet-build-lock cargo test --lib world::replication) — 14 passed, 0 failed. One pre-existing supported-version control needed its Created payload header to match the exercised version after #4486's header validation landed on main. Current basic OpenCode guard is still pending. Coverage gap remains: nix-ci.yml and id-check.yml lack pull_request/merge_group triggers, so required basic proxy-port and id PR matrix checks were not run; inspect these fresh on resume before merge.

…ange check plus header context

Packet acceptance (task 6418) against origin/main 745c8b7:
envelope accept keeps the PR #4540 range form
`!(JOURNAL_VERSION..=MAX_JOURNAL_VERSION).contains(...)` with the
commit-comment explaining the v0 bricking hazard; receiver
begin_session keeps the checked constructor with .ok() fallthrough
and unwrap_or(JOURNAL_VERSION).
@chatgpt-codex-connector

Copy link
Copy Markdown

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, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@dezren39
dezren39 merged commit 77f911f into main Nov 3, 2026
2 checks passed
@dezren39
dezren39 deleted the queue/6418-4471-reject-repl-version branch November 3, 2026 17:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant