Skip to content

Tweak and partially integrate ClientVersionDispatchingCodecBuilder #24760

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

CraigMacomber
Copy link
Contributor

@CraigMacomber CraigMacomber commented Jun 3, 2025

Description

Allow ClientVersionDispatchingCodecBuilder to support overrides to better align with the approach in #24422

Use ClientVersionDispatchingCodecBuilder for EditManager, though the ability to actually control its version via overrides and and fluid client version are not fully connected to the shared tree configuration (configuredSharedTree).

Reviewer Guidance

The review process is outlined on this wiki page.

@Copilot Copilot AI review requested due to automatic review settings June 3, 2025 20:25
@CraigMacomber CraigMacomber requested a review from a team as a code owner June 3, 2025 20:25
@github-actions github-actions bot added area: dds Issues related to distributed data structures area: dds: tree area: framework Framework is a tag for issues involving the developer framework. Eg Aqueduct public api change Changes to a public API base: main PRs targeted against main branch labels Jun 3, 2025
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR extends the versioned codec system with per-codec override support and wires it into the EditManager and SharedTree, enabling clients to request specific format versions.

  • Introduces CodecName and FormatVersion types and augments CodecWriteOptions with writeVersionOverrides and allowPossiblyIncompatibleWriteVersionOverrides.
  • Implements ClientVersionDispatchingCodecBuilder to replace prior dispatch utilities and integrates it into makeEditManagerCodec and SharedTreeCore.
  • Updates default SharedTree options and tests to exercise the new override logic.

Reviewed Changes

Copilot reviewed 13 out of 13 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
packages/framework/fluid-framework/api-report/fluid-framework.alpha.api.md Adds CodecName, FormatVersion, and new options to public API docs
packages/dds/tree/api-report/tree.alpha.api.md Mirrors the new types and options in tree API docs
packages/dds/tree/src/codec/index.ts Exports CodecName, CodecVersion, and ClientVersionDispatchingCodecBuilder
packages/dds/tree/src/codec/versioned/index.ts Exports builder and CodecVersion type from versioned package
packages/dds/tree/src/codec/versioned/codec.ts Implements ClientVersionDispatchingCodecBuilder with override logic
packages/dds/tree/src/shared-tree-core/editManagerCodecs.ts Changes makeEditManagerCodec to return the new builder and registry
packages/dds/tree/src/shared-tree-core/sharedTreeCore.ts Uses builder.build with override options in SharedTreeCore
packages/dds/tree/src/shared-tree/sharedTree.ts Adds override fields to defaultSharedTreeOptions and per-version mappings
packages/dds/tree/src/index.ts Updates top-level exports for new types and FluidClientVersion
packages/dds/tree/src/test/codec/versioned/codec.spec.ts Updates versioned codec tests to use the new builder and override scenarios
packages/dds/tree/src/test/shared-tree-core/edit-manager/editManagerCodecs.test.ts Switches tests to the builder API and tests error/success for overrides
packages/dds/tree/src/test/shared-tree-core/utils.ts Imports FluidClientVersion in test utilities for formatVersion data
Comments suppressed due to low confidence (1)

packages/dds/tree/src/shared-tree/sharedTree.ts:747

  • Ensure that SharedTreeOptionsInternal (and its public counterpart) include the new writeVersionOverrides and allowPossiblyIncompatibleWriteVersionOverrides fields, or consumers will see a type mismatch.
    writeVersionOverrides: new Map(),

@CraigMacomber CraigMacomber changed the title Tweak and integrate partially ClientVersionDispatchingCodecBuilder Tweak and partially integrate ClientVersionDispatchingCodecBuilder Jun 3, 2025
Copy link
Contributor

🔗 No broken links found! ✅

Your attention to detail is admirable.

linkcheck output


> fluid-framework-docs-site@0.0.0 ci:check-links /home/runner/work/FluidFramework/FluidFramework/docs
> start-server-and-test "npm run serve -- --no-open" 3000 check-links

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-docs-site@0.0.0 serve
> docusaurus serve --no-open

[SUCCESS] Serving "build" directory at: http://localhost:3000/

> fluid-framework-docs-site@0.0.0 check-links
> linkcheck http://localhost:3000 --skip-file skipped-urls.txt

Crawling...

Stats:
  222981 links
    1707 destination URLs
    1939 URLs ignored
       0 warnings
       0 errors


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: dds: tree area: dds Issues related to distributed data structures area: framework Framework is a tag for issues involving the developer framework. Eg Aqueduct base: main PRs targeted against main branch public api change Changes to a public API
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant