Skip to content

Conversation

@anthony-murphy
Copy link
Contributor

@anthony-murphy anthony-murphy commented Oct 29, 2025

This pull request introduces a new property to the IFluidDataStoreRuntime interface and the FluidDataStoreRuntime class, allowing consumers to detect when the runtime is performing local operation activities, such as applying stashed operations or rolling back uncommitted changes. The implementation ensures this property accurately reflects the runtime's state during these activities and resets it afterward. Additionally, the API reports and type validation are updated to reflect this change.

API and Interface Enhancements:

  • Added the activeLocalOperationActivity property to the IFluidDataStoreRuntime interface, with documentation explaining its possible values ("applyStashed", "rollback", or undefined). This property allows consumers to distinguish between runtime-initiated and user-initiated state changes.
  • Added the activeLocalOperationActivity getter to the FluidDataStoreRuntime class

fixes AB#50978

@anthony-murphy anthony-murphy requested a review from a team as a code owner October 29, 2025 20:06
Copilot AI review requested due to automatic review settings October 29, 2025 20:06
@github-actions github-actions bot added area: runtime Runtime related issues public api change Changes to a public API base: main PRs targeted against main branch labels Oct 29, 2025
Copy link
Contributor

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 introduces a new activeLocalOperationActivity property to IFluidDataStoreRuntime that indicates when the runtime is performing specific local operation activities ("applyStashed", "rollback", or undefined). This allows consumers to determine when state changes are initiated by the runtime itself rather than by user code.

Key Changes:

  • Added activeLocalOperationActivity property to the IFluidDataStoreRuntime interface
  • Implemented the property with internal state tracking in FluidDataStoreRuntime using localOpActivity field
  • Added runtime state guards in rollback() and applyStashedOp() methods to ensure single-threaded behavior
  • Updated type validation configuration to acknowledge the breaking API change

Reviewed Changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
packages/runtime/datastore-definitions/src/dataStoreRuntime.ts Adds activeLocalOperationActivity property to IFluidDataStoreRuntime interface with documentation
packages/runtime/datastore/src/dataStoreRuntime.ts Implements the property with state tracking and guards in rollback/applyStashedOp methods
packages/runtime/datastore/api-report/datastore.legacy.beta.api.md API report update for the new public property
packages/runtime/datastore-definitions/api-report/datastore-definitions.legacy.beta.api.md API report update for the new interface property
packages/runtime/datastore-definitions/api-report/datastore-definitions.legacy.alpha.api.md API report update for the alpha API
packages/runtime/datastore/package.json Marks FluidDataStoreRuntime as breaking forward compatibility
packages/runtime/datastore/src/test/types/validateDatastorePrevious.generated.ts Adds ts-expect-error for expected compatibility break

@github-actions github-actions bot added the area: framework Framework is a tag for issues involving the developer framework. Eg Aqueduct label Oct 29, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Nov 4, 2025

🔗 Found some broken links! 💔

Run a link check locally to find them. See
https://github.com/microsoft/FluidFramework/wiki/Checking-for-broken-links-in-the-documentation for more information.

linkcheck output


> [email protected] 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"


> [email protected] serve
> docusaurus serve --no-open

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

> [email protected] check-links
> linkcheck http://localhost:3000 --skip-file skipped-urls.txt

 ELIFECYCLE  Command failed with exit code 1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: framework Framework is a tag for issues involving the developer framework. Eg Aqueduct area: runtime Runtime related issues 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.

2 participants