Skip to content

fix(tree): forking during changed event (2.116 backport) - #28074

Merged
Jenn (jenn-le) merged 1 commit into
microsoft:release/client/2.116from
jenn-le:jenn-le-cherry-pick-53eb97dc-to-2-116
Aug 26, 2026
Merged

fix(tree): forking during changed event (2.116 backport)#28074
Jenn (jenn-le) merged 1 commit into
microsoft:release/client/2.116from
jenn-le:jenn-le-cherry-pick-53eb97dc-to-2-116

Conversation

@jenn-le

Copy link
Copy Markdown
Contributor

Description

Cherry-picks commit 53eb97dcb06a9563caf37275f89f20b28104461d from PR #28008 into release/client/2.116.

This fixes malformed change data when a tree view is forked during the changed event emitted after a transaction commits. The malformed fork could trigger assertions when it was later used.

Reviewer Guidance

The review process is outlined in the pull request guidelines.

Please verify that this is an exact cherry-pick of the source commit.

## Description


[Forking](https://fluidframework.com/docs/api/fluid-framework/treeviewbeta-interface#fork-methodsignature)
(beta) a view during the callback for the ["changed"
event](https://fluidframework.com/docs/api/fluid-framework/treebranchevents-interface#changed-methodsignature)
(alpha) emitted when a transaction is committed would create a fork with
malformed change data.
This could result in asserts being triggered when utilizing the fork
(including, but not limited to, error code `0x7ce`).

This PR also changes usages of `activeBranch` to `branch` wherever
appropriate in `treeCheckout.ts`. I have added a PR comment explaining
my reasoning for each change.

## Breaking Changes

None
@jenn-le
Jenn (jenn-le) requested a review from a team August 25, 2026 20:41
@jenn-le
Jenn (jenn-le) requested review from a team as code owners August 25, 2026 20:41
@github-actions github-actions Bot added base: release PRs targeted against a release branch area: tools area: dds Issues related to distributed data structures area: repo Repo related work area: website area: dds: tree changeset-present and removed base: release PRs targeted against a release branch labels Aug 25, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Warning

WARNING: This PR is targeting a release branch!

All changes must first be merged into main and then backported to the target release branch.
Please include a link to the main PR in the description of this PR.

Changes to release branches require approval from the Patch Triage group before merging.
You should have already discussed this change with them so they know to expect it.

For more details, see our internal documentation for the patch policy and processes for
patch releases.

@github-actions

Copy link
Copy Markdown
Contributor

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

Based on the diff (40 lines, 3 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

@github-actions

Copy link
Copy Markdown
Contributor

Bundle size comparison

Base commit: 93faa7d451454ec761390b776b4513b94d760166
Head commit: daece850ac3cb0d723940d8e9612076c210e8e05

Notable changes

No bundles changed by ≥ 500 bytes parsed.

Per-bundle deltas

@fluid-example/bundle-size-tests

  • fluidFrameworkAllAlpha.js: parsed 784199 → 784187 (-12), gzip 214947 → 214975 (+28)
  • azureClient.js: parsed 624847 → 624903 (+56), gzip 166642 → 166686 (+44)
  • odspClient.js: parsed 597135 → 597191 (+56), gzip 159785 → 159826 (+41)
  • aqueduct.js: parsed 531223 → 531258 (+35), gzip 142113 → 142142 (+29)
  • fluidFramework.js: parsed 403499 → 403466 (-33), gzip 114397 → 114405 (+8)
  • sharedTree.js: parsed 392903 → 392863 (-40), gzip 111836 → 111838 (+2)
  • containerRuntime.js: parsed 309144 → 309158 (+14), gzip 84569 → 84576 (+7)
  • sharedString.js: parsed 176510 → 176517 (+7), gzip 49798 → 49805 (+7)
  • experimentalSharedTree.js: parsed 160665 → 160665 (0), gzip 46265 → 46265 (0)
  • matrix.js: parsed 160341 → 160348 (+7), gzip 45798 → 45805 (+7)
  • loader.js: parsed 145704 → 145718 (+14), gzip 39286 → 39301 (+15)
  • odspDriver.js: parsed 103906 → 103927 (+21), gzip 32404 → 32411 (+7)
  • directory.js: parsed 67110 → 67117 (+7), gzip 18859 → 18866 (+7)
  • 578.js: parsed 58686 → 58686 (0), gzip 17657 → 17657 (0)
  • map.js: parsed 47205 → 47212 (+7), gzip 14455 → 14461 (+6)
  • odspPrefetchSnapshot.js: parsed 45635 → 45649 (+14), gzip 15242 → 15249 (+7)
  • 252.js: parsed 44362 → 44362 (0), gzip 13735 → 13735 (0)
  • summarizerDelayLoadedModule.js: parsed 30717 → 30717 (0), gzip 7716 → 7716 (0)
  • socketModule.js: parsed 26469 → 26476 (+7), gzip 7897 → 7904 (+7)
  • createNewModule.js: parsed 12454 → 12454 (0), gzip 4797 → 4797 (0)
  • summaryModule.js: parsed 3789 → 3789 (0), gzip 1857 → 1857 (0)
  • connectionState.js: parsed 909 → 909 (0), gzip 500 → 500 (0)
  • sharedTreeAttributes.js: parsed 847 → 854 (+7), gzip 500 → 508 (+8)
  • debugAssert.js: parsed 429 → 429 (0), gzip 299 → 299 (0)
  • FluidFramework-HashFallback.js: parsed 419 → 419 (0), gzip 313 → 313 (0)

@jenn-le
Jenn (jenn-le) enabled auto-merge (squash) August 25, 2026 22:13
@jenn-le
Jenn (jenn-le) merged commit ca9458a into microsoft:release/client/2.116 Aug 26, 2026
36 checks passed
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: repo Repo related work area: tools area: website changeset-present

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants