Add mocked core flow test#20
Conversation
Assisted-by: Codex:gpt-5.5
Assisted-by: Codex:gpt-5.5
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
📝 WalkthroughWalkthrough
ChangesConditional StoreFollower emission and test coverage
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested labels
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
Assisted-by: Codex:gpt-5.5
|
@coderabbitai review |
✅ Action performedReview finished.
|
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@crates/feder-core/src/lib.rs`:
- Around line 132-139: The StoreFollower action is only pushed inside the
condition checking for new followers (when relation is not already in
self.followers), but inbox refreshes for existing followers may occur elsewhere
in the code. This creates a gap where updated delivery targets are not persisted
to storage. Refactor the code so that inbox/delivery target updates for existing
followers are also exposed through actions: either make the StoreFollower action
explicitly idempotent and push it regardless of whether the relation already
exists, or create a separate action variant to handle actor metadata updates
(like inbox refreshes) that is pushed independently from the new follower check.
- Around line 472-480: The test for the second_result.actions matching the
Accept shape is incomplete and doesn't verify that the Accept was sent to the
refreshed inbox. After the current assert_eq and matches assertions for
second_result.actions, add specific assertions that extract the SendActivity and
Accept from second_result.actions[0], then verify both the inbox field value
matches the refreshed inbox URL (not the stale one) and the Accept ID matches
the expected refreshed state's Accept ID to ensure the test would catch
regressions where the state is refreshed but the immediate Accept is still sent
to an outdated inbox.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 9757f40c-699d-4712-95de-69c7028c1d9d
📒 Files selected for processing (2)
crates/feder-core/src/lib.rscrates/feder-vocab/src/lib.rs
Assisted-by: Codex:gpt-5.5
Assisted-by: Codex:gpt-5.5
|
@codex review |
|
Codex Review: Didn't find any major issues. Swish! Reviewed commit: ℹ️ About Codex in GitHubYour 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". |
Summary
ReceivedFollowproducing follower relation storage, delivery-target storage, andAcceptdelivery.UserCreateNoteproducing object storage plusCreate(Note)delivery to the known follower inbox.StoreFolloweronly when the follower relation is newly recorded, while emittingStoreDeliveryTargetwhen embedded actor inbox data is new or refreshed.Notes
This stays inside
feder-core: no HTTP server, real storage, async runtime, signing, or delivery implementation is introduced.Refs #10
Validation
cargo test -p feder-coremise run check