Skip to content

Commit 9776f2d

Browse files
committed
Clarify backfill strategy docs
Document the behavior of each context backfill strategy and make the context-auto precedence explicit in the public options comments. Tighten the README wording so it describes the currently supported Create activity handling instead of implying support for every Activity type. Assisted-by: Codex:gpt-5
1 parent 9eb5d60 commit 9776f2d

2 files changed

Lines changed: 11 additions & 1 deletion

File tree

packages/backfill/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,8 @@ collection, it is skipped by ID.
6464

6565
By default, `backfill()` uses the `context-auto` strategy. In this mode,
6666
collection items are treated as backfillable objects by default. If an item is
67-
recognized as an Activity, `backfill()` extracts the activity's object instead.
67+
recognized as a supported `Create` activity, `backfill()` extracts the
68+
activity's object instead.
6869

6970
To read only FEP-f228 activity collections, enable the `context-activities`
7071
strategy:

packages/backfill/src/types.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,14 @@ import type { Object as APObject } from "@fedify/vocab";
33
/**
44
* Backfill traversal strategy used to discover the returned object.
55
*
6+
* - `"context-objects"` yields post-like objects directly from the context
7+
* collection.
8+
* - `"context-activities"` yields objects extracted from supported `Create`
9+
* activities in the context collection.
10+
* - `"context-auto"` classifies context collection items automatically,
11+
* handling direct post-like objects and supported `Create` activities.
12+
* If included, it absorbs all other strategies.
13+
*
614
* @since 2.x.0
715
*/
816
export type BackfillStrategy =
@@ -63,6 +71,7 @@ export interface BackfillOptions<
6371
* Backfill strategies to run.
6472
*
6573
* Defaults to `["context-auto"]`.
74+
* If `"context-auto"` is included, it absorbs all other strategies.
6675
*
6776
* @since 2.x.0
6877
*/

0 commit comments

Comments
 (0)