Skip to content

 feat(odsp-driver): support point-in-time loading in factory core - #28007

Merged
Sonali Deshpande (sonalideshpandemsft) merged 8 commits into
microsoft:mainfrom
sonalideshpandemsft:pointInTime/mv-beta
Aug 21, 2026
Merged

Sonali Deshpande (sonalideshpandemsft) merged 8 commits into
microsoft:mainfrom
sonalideshpandemsft:pointInTime/mv-beta

Conversation

@sonalideshpandemsft

@sonalideshpandemsft Sonali Deshpande (sonalideshpandemsft) commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

Adds optional point-in-time loading support to OdspDocumentServiceFactoryCore. The standard OdspDocumentServiceFactory inherits this capability, while LocalOdspDocumentServiceFactory leaves it undefined.

This removes the separate point-in-time factory implementation while preserving the existing factory function, interface, and package exports.

This change would make it easier for bohemia to consume point-in-time load since OdspDocumentServiceFactory will support point-in-time loading directly.

@github-actions github-actions Bot added area: tools area: driver Driver related issues area: repo Repo related work area: website area: odsp-driver public api change Changes to a public API changeset-present base: main PRs targeted against main branch labels Aug 18, 2026
@sonalideshpandemsft
Sonali Deshpande (sonalideshpandemsft) marked this pull request as ready for review August 18, 2026 21:47
Copilot AI lite review requested due to automatic review settings August 18, 2026 21:47

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds optional point-in-time (sequence-number-based) loading support directly to OdspDocumentServiceFactoryCore, so the standard OdspDocumentServiceFactory can be used for both normal and point-in-time loads without a separate point-in-time factory class.

Changes:

  • Moves the point-in-time factory capability into OdspDocumentServiceFactoryCore via an optional createPointInTimeDocumentService function property.
  • Updates exports so getOdspPointInTimeDocumentServiceFactory and IPointInTimeDocumentServiceFactory remain available from the public package surface, while removing the dedicated point-in-time factory implementation file.
  • Adds coverage to ensure the local ODSP factory explicitly does not expose point-in-time loading.

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated no comments.

Show a summary per file
File Description
packages/drivers/odsp-driver/src/test/odspPointInTimeDocumentServiceFactory.spec.ts Updates imports and adds a test asserting the local factory does not expose PIT loading.
packages/drivers/odsp-driver/src/pointInTimeDriver/odspPointInTimeDocumentServiceFactory.ts Removes the dedicated PIT factory implementation (logic now lives in the core factory).
packages/drivers/odsp-driver/src/odspDocumentServiceFactoryCore.ts Introduces IPointInTimeDocumentServiceFactory and implements optional PIT creation on the core factory.
packages/drivers/odsp-driver/src/odspDocumentServiceFactory.ts Re-exports the PIT interface and preserves getOdspPointInTimeDocumentServiceFactory on the main factory module.
packages/drivers/odsp-driver/src/localOdspDriver/localOdspDocumentServiceFactory.ts Explicitly overrides createPointInTimeDocumentService to undefined for the local factory.
packages/drivers/odsp-driver/src/index.ts Updates public exports to surface PIT factory function/type from odspDocumentServiceFactory.
packages/drivers/odsp-driver/api-report/odsp-driver.legacy.beta.api.md Updates API report to include the new optional PIT capability on the core factory.
packages/drivers/odsp-driver/api-report/odsp-driver.legacy.alpha.api.md Updates API report to include the new optional PIT capability on the core factory.
.changeset/ready-peaches-juggle.md Adds a changeset documenting the new PIT capability on the standard ODSP factory.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@github-actions

github-actions Bot commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

Hi! Thank you for opening this PR. Want me to review it?

Based on the diff (569 lines, 10 files), I've queued these reviewers:

  • Correctness — logic errors, race conditions, lifecycle issues
  • Security — vulnerabilities, secret exposure, injection
  • API Compatibility — breaking changes, release tags, type design
  • Performance — algorithmic regressions, memory leaks
  • Testing — coverage gaps, hollow tests

How this works

  • Adjust the reviewer set by ticking/unticking boxes above. Reviewer toggles alone don't trigger anything.

  • Tick Start review below to dispatch the review fleet.

  • After review finishes, tick Start review again to request another run — it auto-resets after each dispatch.

  • This comment updates as new commits land; your reviewer selections are preserved.

  • Start review

Comment thread .changeset/ready-peaches-juggle.md Outdated
Comment thread packages/drivers/odsp-driver/src/odspDocumentServiceFactory.ts Outdated
Comment thread packages/drivers/odsp-driver/src/odspDocumentServiceFactoryCore.ts Outdated
Comment thread packages/drivers/odsp-driver/src/odspDocumentServiceFactoryCore.ts Outdated
Comment thread packages/drivers/odsp-driver/src/odspDocumentServiceFactory.ts Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-opened one existing comment, and left 1 new question. Otherwise, API and docs changes look good to me. Someone who knows this space better than I do should probably approve too before merging though 😋

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 028eb841-af27-4aab-90b2-0b5a15609063
@github-actions github-actions Bot added the area: loader Loader related issues label Aug 19, 2026
@github-actions

Copy link
Copy Markdown
Contributor

🔗 Found some broken links! 💔

Run a link check locally to find them. See Checking for Broken Links for more information.

linkcheck output

1: starting server using command "npm run serve -- --no-open"
and when url "[ 'http://127.0.0.1:3000' ]" is responding with HTTP status code 200
running tests using command "npm run check-links"


> fluid-framework-website@0.0.0 serve
> docusaurus serve --no-open

[SUCCESS] Serving "build" directory at: http://localhost:3000/
[ELIFECYCLE] Command failed with exit code 1.

@github-actions

Copy link
Copy Markdown
Contributor

Bundle size comparison

Base commit: 28be1d33e075a0fdb1df77db2adfd0f81140e4ae
Head commit: 18387abbacd2799cb2cf1350fa213fc917d46b97

Notable changes

  • 🔴 odspClient.js: parsed 598372 → 604414 (+6042), gzip 159991 → 161679 (+1688)
  • 🔴 odspDriver.js: parsed 104220 → 114159 (+9939), gzip 32424 → 35202 (+2778)
  • 🟢 createNewModule.js: parsed 12474 → 8527 (-3947), gzip 4797 → 3567 (-1230)
Per-bundle deltas

@fluid-example/bundle-size-tests

  • fluidFrameworkAllAlpha.js: parsed 784966 → 785022 (+56), gzip 215205 → 215291 (+86)
  • azureClient.js: parsed 626030 → 626027 (-3), gzip 166905 → 166975 (+70)
  • 🔴 odspClient.js: parsed 598372 → 604414 (+6042), gzip 159991 → 161679 (+1688)
  • aqueduct.js: parsed 532212 → 532223 (+11), gzip 142397 → 142426 (+29)
  • fluidFramework.js: parsed 403763 → 403796 (+33), gzip 114459 → 114501 (+42)
  • sharedTree.js: parsed 393169 → 393195 (+26), gzip 111914 → 111938 (+24)
  • containerRuntime.js: parsed 310147 → 310129 (-18), gzip 84853 → 84855 (+2)
  • sharedString.js: parsed 176534 → 176541 (+7), gzip 49805 → 49810 (+5)
  • experimentalSharedTree.js: parsed 160691 → 160691 (0), gzip 46272 → 46272 (0)
  • matrix.js: parsed 160363 → 160372 (+9), gzip 45803 → 45810 (+7)
  • loader.js: parsed 145719 → 145735 (+16), gzip 39281 → 39303 (+22)
  • 🔴 odspDriver.js: parsed 104220 → 114159 (+9939), gzip 32424 → 35202 (+2778)
  • directory.js: parsed 67134 → 67141 (+7), gzip 18866 → 18872 (+6)
  • 578.js: parsed 58686 → 58686 (0), gzip 17657 → 17657 (0)
  • map.js: parsed 47229 → 47236 (+7), gzip 14460 → 14467 (+7)
  • odspPrefetchSnapshot.js: parsed 45780 → 45761 (-19), gzip 15260 → 15266 (+6)
  • 252.js: parsed 44362 → 44362 (0), gzip 13735 → 13735 (0)
  • summarizerDelayLoadedModule.js: parsed 30717 → 30717 (0), gzip 7716 → 7716 (0)
  • socketModule.js: parsed 26504 → 26474 (-30), gzip 7868 → 7901 (+33)
  • 🟢 createNewModule.js: parsed 12474 → 8527 (-3947), gzip 4797 → 3567 (-1230)
  • summaryModule.js: parsed 3789 → 3789 (0), gzip 1857 → 1857 (0)
  • connectionState.js: parsed 909 → 909 (0), gzip 500 → 500 (0)
  • sharedTreeAttributes.js: parsed 845 → 852 (+7), gzip 493 → 503 (+10)
  • debugAssert.js: parsed 429 → 429 (0), gzip 299 → 299 (0)
  • FluidFramework-HashFallback.js: parsed 419 → 419 (0), gzip 313 → 313 (0)

@sonalideshpandemsft
Sonali Deshpande (sonalideshpandemsft) merged commit 1336342 into microsoft:main Aug 21, 2026
38 checks passed
@sonalideshpandemsft
Sonali Deshpande (sonalideshpandemsft) deleted the pointInTime/mv-beta branch August 21, 2026 12:54
Lindsey Nguyen (lindsnguyen) added a commit that referenced this pull request Aug 21, 2026
… cost

Moving point-in-time loading into OdspDocumentServiceFactoryCore (#28007) added
static imports of the point-in-time-only code paths (OdspPointInTimeDocumentService
and the version manager, whose file-version fetcher is point-in-time-only), so all
of it was eagerly bundled into odspDriver.js for every ODSP consumer regardless of
whether they use point-in-time loading (~+9.9KB parsed / +2.8KB gzip regression).

Convert both to dynamic import() (shared webpackChunkName "odspPointInTime") so the
point-in-time code splits into a separate chunk fetched only when a consumer actually
performs a point-in-time load, matching the existing lazy-load pattern in odsp-driver
(createNewModule, odspDocumentStorageManager, odspDocumentService). createVersionManager
becomes async as a result; its private-seam stubs in the factory spec are updated to
resolve. No public API change (createPointInTimeDocumentService's signature is unchanged).
Lindsey Nguyen (lindsnguyen) added a commit that referenced this pull request Aug 22, 2026
… cost

Moving point-in-time loading into OdspDocumentServiceFactoryCore (#28007) added
static imports of the point-in-time-only code paths (OdspPointInTimeDocumentService
and the version manager, whose file-version fetcher is point-in-time-only), so all
of it was eagerly bundled into odspDriver.js for every ODSP consumer regardless of
whether they use point-in-time loading (~+9.9KB parsed / +2.8KB gzip regression).

Convert both to dynamic import() (shared webpackChunkName "odspPointInTime") so the
point-in-time code splits into a separate chunk fetched only when a consumer actually
performs a point-in-time load, matching the existing lazy-load pattern in odsp-driver
(createNewModule, odspDocumentStorageManager, odspDocumentService). createVersionManager
becomes async as a result; its private-seam stubs in the factory spec are updated to
resolve. No public API change (createPointInTimeDocumentService's signature is unchanged).
Lindsey Nguyen (lindsnguyen) added a commit that referenced this pull request Aug 22, 2026
… cost (#28051)

## Description

Moving point-in-time loading into `OdspDocumentServiceFactoryCore`
([#28007](#28007)) added
static imports of the point-in-time-only code paths —
`OdspPointInTimeDocumentService` and the version manager (whose
file-version fetcher is point-in-time-only). Because every ODSP consumer
imports the core factory, all of that code became eagerly bundled into
`odspDriver.js` regardless of whether the consumer uses point-in-time
loading (~+9.9KB parsed / +2.8KB gzip regression).

This converts both to dynamic `import()` calls behind a shared
`webpackChunkName: "odspPointInTime"`, so the point-in-time code splits
into a single separate chunk that is only fetched when a consumer
actually performs a point-in-time load. This keeps the unified
single-factory API from #28007 while removing the eager size cost, and
matches the existing lazy-load pattern already used in odsp-driver
(`createNewModule`, `odspDocumentStorageManager`,
`odspDocumentService`).

`createVersionManager` becomes `async` as a result (it now awaits the
dynamic import). This is an internal `private` method with a single
already-async caller, so there is **no public API change** —
`createPointInTimeDocumentService`'s signature is unchanged and no API
report is affected.

## Testing

- Full odsp-driver unit suite passes (304 passing), including the
point-in-time factory lineage-guard and version-manager tests.
- The private-seam stubs for `createVersionManager` in
`odspPointInTimeDocumentServiceFactory.spec.ts` were updated to resolve
(async).
- Bundle-size impact is validated via the CI bundle-size report and the
office-bohemia integration pipeline. (WIP)
Sonali Deshpande (sonalideshpandemsft) pushed a commit that referenced this pull request Sep 2, 2026
… cost (#28051)

## Description

Moving point-in-time loading into `OdspDocumentServiceFactoryCore`
([#28007](#28007)) added
static imports of the point-in-time-only code paths —
`OdspPointInTimeDocumentService` and the version manager (whose
file-version fetcher is point-in-time-only). Because every ODSP consumer
imports the core factory, all of that code became eagerly bundled into
`odspDriver.js` regardless of whether the consumer uses point-in-time
loading (~+9.9KB parsed / +2.8KB gzip regression).

This converts both to dynamic `import()` calls behind a shared
`webpackChunkName: "odspPointInTime"`, so the point-in-time code splits
into a single separate chunk that is only fetched when a consumer
actually performs a point-in-time load. This keeps the unified
single-factory API from #28007 while removing the eager size cost, and
matches the existing lazy-load pattern already used in odsp-driver
(`createNewModule`, `odspDocumentStorageManager`,
`odspDocumentService`).

`createVersionManager` becomes `async` as a result (it now awaits the
dynamic import). This is an internal `private` method with a single
already-async caller, so there is **no public API change** —
`createPointInTimeDocumentService`'s signature is unchanged and no API
report is affected.

## Testing

- Full odsp-driver unit suite passes (304 passing), including the
point-in-time factory lineage-guard and version-manager tests.
- The private-seam stubs for `createVersionManager` in
`odspPointInTimeDocumentServiceFactory.spec.ts` were updated to resolve
(async).
- Bundle-size impact is validated via the CI bundle-size report and the
office-bohemia integration pipeline. (WIP)
Sonali Deshpande (sonalideshpandemsft) added a commit that referenced this pull request Sep 3, 2026
…28152)

Cherry-picks the following ODSP point-in-time loading changes from
`main` into `release/client/2.118`:

- #28007
- #28051
- #28055

---------

Co-authored-by: Sonali Deshpande <sdeshpande@microsoft.com>
Co-authored-by: lindsnguyen <lindsnguyen@microsoft.com>
Copilot-Session: 028eb841-af27-4aab-90b2-0b5a15609063
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: driver Driver related issues area: loader Loader related issues area: odsp-driver area: repo Repo related work area: tools area: website base: main PRs targeted against main branch changeset-present public api change Changes to a public API

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants