Skip to main content
← Back to list
01Issue
FeatureShippedSwamp CLI
Assigneesstack72

Relationships

#444 Docs: update datastore reference for lazy hydration, SyncContext, and SyncCapabilities

Opened by stack72 · 5/25/2026· Shipped 5/25/2026

What needs updating

The datastore efficiency overhaul shipped several new interfaces and features that need documentation in the swamp-club reference docs.

1. Datastore configuration reference

Document the new hydrationStrategy field on datastore config:

```yaml datastore: type: "@swamp/s3-datastore" hydrationStrategy: lazy # or "full" (default) config: bucket: my-bucket region: us-east-1 ```

And the CLI flag: `swamp datastore setup extension @swamp/s3-datastore --hydration-strategy lazy --config '...'`

2. DatastoreSyncService interface reference

New methods and fields added across Phase 1-3:

  • `capabilities?(): SyncCapabilities` — advertise scopedSync, lazyHydration
  • `hydrateFile?(relPath, options?): Promise` — on-demand single file download
  • `context?: SyncContext` on `DatastoreSyncOptions` — domain context with models array
  • `metadataOnly?: boolean` on `DatastoreSyncOptions` — metadata-only pull filter
  • `SyncContext` interface — `{ models?: ReadonlyArray<{ modelType, modelId }> }`
  • `SyncCapabilities` interface — `{ scopedSync?, lazyHydration? }`

3. Extension author guide

How to implement scoped sync and lazy hydration in a custom datastore extension:

  • Implement `capabilities()` returning `{ scopedSync: true, lazyHydration: true }`
  • Handle `options?.context?.models` in `pullChanged`/`pushChanged` for scoped sync
  • Handle `options?.metadataOnly` in `pullChanged` for lazy setup
  • Implement `hydrateFile` for on-demand content download
  • Per-path dirty tracking via `markDirty(options?.relPath)`

4. Conformance test reference

Document `assertSyncServiceConformance()` from `@systeminit/swamp-testing`.

Reference implementations

  • `@swamp/s3-datastore` and `@swamp/gcs-datastore` have all features implemented
  • `design/datastores.md` in the swamp repo has the technical design doc
02Bog Flow
OPENTRIAGEDIN PROGRESSSHIPPED+ 1 MOREASSIGNED+ 5 MOREFINDINGS+ 3 MOREPR_MERGED+ 1 MORENOTIFICATION_SKIPPED

Shipped

5/25/2026, 11:31:56 PM

Click a lifecycle step above to view its details.

03Sludge Pulse
stack72 assigned stack725/25/2026, 10:57:31 PM

Sign in to post a ripple.