Support FEP-f228 activity collection backfill#801
Conversation
|
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: Repository UI Review profile: ASSERTIVE Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
📝 WalkthroughWalkthroughThe backfill package extends its traversal capability from a single hardcoded strategy to a configurable, multi-strategy system. The change introduces three strategies (context-objects, context-activities, context-auto) as a type union, refactors the core logic into composable generators that handle strategy selection and Create activity unwrapping, and adds comprehensive test coverage validating all strategy combinations and edge cases. ChangesMulti-Strategy Backfill System
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Suggested labels
Suggested reviewers
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 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 |
There was a problem hiding this comment.
Code Review
This pull request introduces multiple backfill strategies (context-objects, context-activities, and context-auto) to the backfill utility, replacing the previous single context-posts strategy. The default strategy is now context-auto, which automatically handles both plain objects and embedded Create activities. The changes also include comprehensive unit tests for the new strategies and updated documentation in the README. I have no feedback to provide as there are no review comments.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
Codecov Report❌ Patch coverage is
... and 1 file with indirect coverage changes 🚀 New features to boost your workflow:
|
|
@gemini review |
There was a problem hiding this comment.
Code Review
This pull request introduces new backfill strategies (context-objects, context-activities, and context-auto) to the @fedify/backfill package, replacing the previous context-posts strategy. It updates the documentation, types, and implementation to support these strategies, with context-auto acting as the default. Extensive unit tests are added to cover the new behaviors, deduplication, and request limits. The reviewer feedback highlights that removing context-posts is a breaking change. They suggest keeping context-posts as a deprecated alias of context-objects in the BackfillStrategy type and updating normalizeStrategies to map context-posts to context-objects while ensuring null-safety.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
|
@gemini review |
There was a problem hiding this comment.
Code Review
This pull request introduces configurable backfill strategies (context-objects, context-activities, and context-auto) to the backfill package, replacing the previous hardcoded context-posts strategy. The default strategy is now context-auto, which automatically handles both activities and objects. The changes include updating the backfill function and options to support these strategies, adding helper functions for processing activities and loading documents, updating the README documentation, and adding comprehensive unit tests covering the new strategies and their limits. No review comments were provided, and I have no feedback to offer.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
|
@coderabbitai review |
✅ Action performedReview finished.
|
|
It's trivial, but I think the … instead of: |
Add context-auto, context-objects, and context-activities strategy handling for context collection backfill. The auto strategy classifies ordinary objects directly and extracts objects from supported Create activities while preserving shared request budgets, deduplication, abort, and interval behavior. Document the strategy behavior and add coverage for explicit, automatic, empty, overlapping, and duplicate strategy configurations. Assisted-by: Codex:gpt-5.5
Summary
This PR adds the next FEP-f228 context collection path for
@fedify/backfill: context collections whose items are Activity objects.The new strategy handling keeps
BackfillItem.objectfocused on conversation objects. When a supportedCreateactivity is found, backfill extracts and yields the activity's object rather than yielding the activity itself.Related to #275
Included
context-auto,context-objects, andcontext-activitiesstrategy handlingcontext-autothe default classifier for direct objects and supported activitiesCreate.objectvalues from activity collections@fedify/backfillValidation
deno task -f @fedify/backfill checkdeno task -f @fedify/backfill testpnpm --filter @fedify/backfill testAI assistance disclosed in commit message with
Assisted-by: Codex:gpt-5.