Repository navigation
fix(id): replicate board fork provenance - #4545
Conversation
|
Warning Review limit reachedYou'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 45 minutes. View limit details
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. |
Codex Review Summary: ✅ CompletedThis 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. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: fc559bf544
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| BoardObject::BoardFork(body) => body | ||
| .source_frontier | ||
| .iter() | ||
| .chain([&body.source_board, &body.fork_board]) | ||
| .collect(), |
There was a problem hiding this comment.
Include dependencies of objects cited in the source frontier
When a valid fork record cites a source-board post without also listing its thread in source_frontier, this adds the post to the export but omits the thread: the initial seed contains only fork-board objects, and the dependency traversal has no case for Post. In a fresh replica, validate_links rejects the post because its thread is missing, then rejects the fork record because the post is missing, so replicate_board_from stalls instead of completing. The same problem affects frontier threads with forum/rules references and objects requiring moderator grants. Expand the closure to include the acceptance dependencies of cited source objects, not just the frontier hashes themselves.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed in 18cb2a8 (branch rebased onto current main first; the original commit is now 5dbd708).
board_object_set's closure now follows the acceptance dependencies of every object kind — the exact references validate_links requires to be present — instead of only Board/Theme/BoardFork references: Post pulls its board, thread, parent post, attachments, and embed target; Thread pulls its forum and rules references; Supersede/Tombstone/BoardListing pull their targets and superseded records; RoleAttestation pulls its supersedes chain; and the moderator-gated kinds (Rules, Forum, ModerationAction) additionally pull the RoleAttestation grant that gives their author moderator authority on that board.
Regression test fork_frontier_post_pulls_its_acceptance_dependencies: a fork record citing only a source post in its frontier now exports the post, its thread, the thread's forum and rules, and the moderator grant, and replicate_board_from into a fresh graph completes with an identical fork-board set. Verified on the laptop: cargo test --lib boards:: — 32 passed, 0 failed.
— queue task 13400, lane code-u
|
🤖 Agent note · parked
|
board_object_set only traversed Board/Theme/BoardFork references, so a fork frontier citing a source post exported the post without its thread, the thread's forum/rules, or the moderator grant behind them; a fresh replica rejected the post and the fork record and replication stalled (Codex P1 on PR #4545). The closure now follows the validate_links acceptance dependencies of every object kind, including moderator grants for rules/forums/moderation actions. Adds fork_frontier_post_pulls_its_acceptance_dependencies; cargo test --lib boards:: 32 passed on the laptop.
fc559bf to
18cb2a8
Compare
|
🤖 Agent note · picked up
|
Summary
replica_status_againstnow expects that signed record through the existing replication-set comparison, so missing provenance reports incomplete rather than complete.Evidence
boardscope reference and is excluded from the fork board's expected set.Merge Danger
Door: Two-way; this changes only the derived replication set and can be reverted.
Blast Radius: Narrow — board fork export and replica completeness.
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.