Skip to content

RuntimeDefinitions: Add and use asAlpha#25509

Merged
anthony-murphy merged 1 commit intomicrosoft:mainfrom
anthony-murphy:al-rtd-asAlpha
Sep 22, 2025
Merged

RuntimeDefinitions: Add and use asAlpha#25509
anthony-murphy merged 1 commit intomicrosoft:mainfrom
anthony-murphy:al-rtd-asAlpha

Conversation

@anthony-murphy
Copy link
Copy Markdown
Contributor

This pull request introduces a new utility function, asAlpha, to safely cast IContainerRuntimeBase to ContainerRuntimeBaseAlpha and exposes it throughout the codebase. This change simplifies and standardizes how alpha functionality is accessed in both production and test code, replacing direct type assertions with the new function. Several test files are updated to use asAlpha, improving type safety and clarity.

Copilot AI review requested due to automatic review settings September 22, 2025 20:21
@github-actions github-actions bot added area: runtime Runtime related issues area: tests Tests to add, test infrastructure improvements, etc public api change Changes to a public API labels Sep 22, 2025
Copy link
Copy Markdown
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 pull request introduces a new utility function asAlpha to safely cast IContainerRuntimeBase to ContainerRuntimeBaseAlpha, standardizing how alpha functionality is accessed throughout the codebase. The change replaces direct type assertions with a centralized function, improving type safety and code clarity.

Key changes:

  • Added asAlpha utility function in runtime-definitions package
  • Updated multiple test files to use the new function instead of direct type casting
  • Exported the function through the public API for broader usage

Reviewed Changes

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

Show a summary per file
File Description
packages/runtime/runtime-definitions/src/stagingMode.ts Added the new asAlpha utility function
packages/runtime/runtime-definitions/src/index.ts Exported the new function in the public API
packages/runtime/runtime-definitions/api-report/runtime-definitions.legacy.alpha.api.md Updated API report to reflect the new export
packages/test/test-end-to-end-tests/src/test/stagingMode.spec.ts Replaced direct type assertion with asAlpha function
packages/test/local-server-tests/src/test/stagingMode.spec.ts Updated to use asAlpha instead of direct casting
packages/test/local-server-tests/src/test/documentDirty.spec.ts Simplified casting logic using the new utility function
packages/test/local-server-stress-tests/src/stressDataObject.ts Replaced manual type assertion with asAlpha

@github-actions github-actions bot added the base: main PRs targeted against main branch label Sep 22, 2025
@github-actions
Copy link
Copy Markdown
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:
  235713 links
    1720 destination URLs
    1953 URLs ignored
       0 warnings
       0 errors


@anthony-murphy anthony-murphy merged commit 92fb3c7 into microsoft:main Sep 22, 2025
37 checks passed
noencke added a commit that referenced this pull request Sep 23, 2025
This will allow future APIs that follow the same pattern to share the
same common `asAlpha` API.
This also aligns the tree API with the [recently introduced
container-runtime
API](#25509).
anthony-murphy-agent pushed a commit to anthony-murphy-agent/FluidFramework that referenced this pull request Jan 14, 2026
This pull request introduces a new utility function, `asAlpha`, to
safely cast `IContainerRuntimeBase` to `ContainerRuntimeBaseAlpha` and
exposes it throughout the codebase. This change simplifies and
standardizes how alpha functionality is accessed in both production and
test code, replacing direct type assertions with the new function.
Several test files are updated to use `asAlpha`, improving type safety
and clarity.
anthony-murphy-agent pushed a commit to anthony-murphy-agent/FluidFramework that referenced this pull request Jan 14, 2026
This will allow future APIs that follow the same pattern to share the
same common `asAlpha` API.
This also aligns the tree API with the [recently introduced
container-runtime
API](microsoft#25509).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: runtime Runtime related issues area: tests Tests to add, test infrastructure improvements, etc 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.

3 participants