GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — feat(id): signed board object graph v1 (#2812) by dezren39 · Pull Request #3892 · developing-today/code 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 56 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. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Codex Review SummaryThis 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. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Here are some automated review suggestions for this pull request.
Reviewed commit: 96ff01180e
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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".
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| fn require_moderator(&self, board: &ArtifactHash, author: &str) -> Result<()> { | ||
| let root = self.require_board(board)?; | ||
| if root.artifact.author == author || self.has_role(board, author, BoardRole::Moderator) { | ||
| return Ok(()); |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Validate moderator authority against signed causal history
When a moderator's objects are imported after their role revocation, this check rejects legitimate historical objects because has_role uses the graph's current role frontier. For example, inserting root → grant → moderator-authored forum → revocation succeeds, but inserting root → grant → revocation → the same forum fails, even though all of the forum's explicit references are present. Consequently, peers replaying the same signed objects in different cross-author arrival orders cannot reconstruct the same graph. Authority needs to be evaluated against a verifiable causal context for the object, rather than whichever attestations happened to arrive first.
Useful? React with 👍 / 👎.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Fixed in 03e320f, with the semantics made explicit: a signed object carries no causal pointer to the grant/revocation that would order it, so frontier-based authority made graph reconstruction arrival-order dependent — the defect named here. Acceptance now rests on grant existence in the graph (has_role: any granted attestation for board/member/role present), which every peer holding the grant evaluates identically in any arrival order; your scenario root -> grant -> revocation -> forum now inserts, matching root -> grant -> forum -> revocation. Revocations remain signed history in the graph and are enforced by the view/serving layers that decide what is served now; this substrate (per #2812 scope) records and validates objects and does not enforce moderation — that boundary is documented on has_role. Regression test: moderator_acceptance_does_not_depend_on_revocation_arrival_order (both orders reconstruct; no-grant still rejects).
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| if let Some(parent) = &value.parent_post { | ||
| self.require_scoped(parent, &value.board, "post")?; | ||
| } |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Check that a reply's parent belongs to its thread
When a board contains multiple threads, a post can name one thread in thread while naming a post from another thread in parent_post: require_scoped checks only the board and object kind. Both references therefore pass validation, leaving an accepted reply whose ancestry crosses thread boundaries. Check that the referenced parent post's thread equals the new post's thread so thread membership also bounds reply ancestry.
Useful? React with 👍 / 👎.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Fixed in 03e320f: Post validation now resolves the parent post and requires parent_post.thread == the reply thread, so reply ancestry cannot cross thread boundaries. Regression test: reply_parent_must_belong_to_the_same_thread (accepts a same-thread reply, rejects a cross-thread one).
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| Self::Supersede(value) => ensure!( | ||
| value.previous != value.replacement, | ||
| "an object cannot supersede itself" | ||
| ), |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Reject cycles in supersede relationships
For two same-author posts A and B in the same board, both Supersede(A, B) and a subsequent Supersede(B, A) pass validation: this inequality rejects only direct self-supersession, and validate_links never checks existing replacement paths. The accepted history therefore contradicts the documented earlier/new version relationship and has no terminal replacement for either post. Reject a supersede edge when its replacement already reaches its previous object, or otherwise enforce a strictly forward version ordering.
Useful? React with 👍 / 👎.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Fixed in 03e320f: Supersede validation now walks the existing replacement chain from the new replacement (via BoardGraph::supersede_replacement) and rejects the edge if it reaches the previous object, so A->B followed by B->A is refused; the walk is visited-set guarded. Regression test: supersede_cycles_are_rejected.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
- reply parent post must belong to the same thread as the reply (P2) - reject supersede edges that would close a replacement cycle (P2) - moderator acceptance is based on grant existence in the graph, not the current role frontier, so reconstruction is arrival-order independent; revocations remain signed history for view/serving layers to enforce (P1) - regression tests for all three findings
|
@codex review — new commit 03e320f dispositions all three findings from the 96ff011 round (see replies on each thread); please re-review the updated boards.rs. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Here are some automated review suggestions for this pull request.
Reviewed commit: 03e320f9f3
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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".
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| .find_map(|signed| match &signed.object { | ||
| BoardObject::Supersede(value) if &value.previous == previous => { | ||
| Some(value.replacement.clone()) | ||
| } |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Traverse every supersede successor when checking for cycles
When a version has multiple replacements, find_map follows only the supersede record with the smallest artifact hash, although insertion does not prohibit multiple outgoing edges. For example, after accepting same-author post relationships A→B and A→C, if A→B sorts first, inserting C→A follows A→B and succeeds despite creating the cycle A→C→A. The fresh evidence beyond the earlier cycle finding is that the new helper silently discards alternate replacement paths. Traverse all successors when checking reachability, or explicitly enforce one replacement per previous object.
Useful? React with 👍 / 👎.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Fixed in e01791c: the cycle check is now a full reachability traversal — BoardGraph::supersede_replacements returns every successor and the check DFS-walks all of them (visited-set guarded), so A->B, A->C, then C->A is rejected regardless of hash order. The regression test supersede_cycles_are_rejected now includes exactly that multi-successor case.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Codex re-review of 03e320f: find_map followed only the first supersede successor, so a cycle through an alternate replacement (A->B, A->C, then C->A) passed. Cycle check is now a full reachability traversal over all supersede successors, with a multi-successor regression case.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.