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 — id: note reference edges in the native graph + backlink query (#7587) by dezren39 · Pull Request #13233 · 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 44 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 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. |
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: b86e5acfb7
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.
| #[test] | ||
| fn note_anchors_discussions_and_backlinks_cover_all_three_edge_kinds() { |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Add property-based coverage for the note-edge invariants
The new edge projections promise meaningful invariants—backlinks are exactly the inverse of forward edges, removed posts contribute no edges, and superseded tombstones restore their targets—but the added tests exercise only fixed graphs. This does not satisfy the testing doctrine in AGENTS.md, which requires property-based coverage where code has invariants. Add generated graph/withdrawal histories with a named oracle for edge membership and the forward/backlink equivalence; retain these examples as acceptance coverage.
AGENTS.md reference: AGENTS.md:L34-L39
Useful? React with 👍 / 👎.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| if !removed.contains(hash) { | ||
| removed.insert(value.target.clone()); |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Separate tombstone eligibility from accumulated removed targets
When a post P is targeted by tombstone T1 and another valid tombstone T2 targets T1, visiting T2 first adds T1 to removed, so this condition skips T1 and incorrectly restores P's reference edges and backlinks. Tombstones targeting tombstones are permitted by validate_links, but compose_view checks tombstone eligibility only against the superseded set, so it still hides P. The new query therefore disagrees with the board projection depending on the tombstones' content-hash ordering. Determine tombstone eligibility from the immutable superseded set, separately from accumulating removed targets.
Useful? React with 👍 / 👎.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| self.note_discussions() | ||
| .into_iter() | ||
| .filter(|(_, target)| target == note) |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Filter discussion edges before materializing the entire relation
For a thread containing N posts that each embed a distinct note, note_discussions() allocates N×(N−1) pairs of cloned, string-backed hashes before this filter runs. Consequently, even querying backlinks for an absent note produces quadratic work and memory usage: 5,000 valid sharing posts generate roughly 25 million temporary pairs and several gigabytes of allocations just to return an empty result. There is no post-count limit preventing this input. note_edges_from() has the same issue when filtering the complete relation for one post. Traverse discussions with the requested note/post constraint before allocating edges, rather than materializing every unrelated edge.
Useful? React with 👍 / 👎.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
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.
id: implement the note→board sharing model (decision on #5830)
There was an error while loading. Please reload this page.