Skip to content

build: normalize typetest script presence across client release group#27345

Open
jatgarg wants to merge 6 commits into
microsoft:mainfrom
jatgarg:normalize
Open

build: normalize typetest script presence across client release group#27345
jatgarg wants to merge 6 commits into
microsoft:mainfrom
jatgarg:normalize

Conversation

@jatgarg
Copy link
Copy Markdown
Contributor

@jatgarg jatgarg commented May 19, 2026

Description

Output of pnpm exec flub typetests -g client --normalize. Reconciles each package's typetests:gen script presence with its typeValidation.disabled state:

  • Removes the stale typetests:gen script from 10 packages whose typeValidation.disabled is already true (sequence-deprecated, ink, legacy-dds, attributor, fluid-telemetry, dds-interceptions, tree-agent and its variants, type-factory).

  • fluid-framework: no version of the package exposes flub's default "legacy/alpha" entrypoint; it's an aggregator and constituent packages already provide
    type-test coverage.

  • @fluid-internal/presence-definitions: test against "./public" entrypoint.

Output of `pnpm exec flub typetests -g client --normalize`. Reconciles
each package's `typetests:gen` script presence with its
`typeValidation.disabled` state:

- Removes the stale `typetests:gen` script from 10 packages whose
  `typeValidation.disabled` is already `true` (sequence-deprecated,
  ink, legacy-dds, attributor, fluid-telemetry, dds-interceptions,
  tree-agent and its variants, type-factory).
- Adds the missing `typetests:gen` script to 2 packages whose type
  tests are enabled (fluid-framework, presence-definitions).

This unblocks the `fluid-build-tasks-tsc` policy check, which
enforces that the `tsc` task depend on `typetests:gen` whenever the
script exists. Prior drift had left disabled packages with stale
scripts (policy fail) and enabled packages without the script
(silent skip during release type-test runs).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@jatgarg jatgarg self-assigned this May 19, 2026
Copilot AI review requested due to automatic review settings May 19, 2026 20:20
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 19, 2026

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

Based on the diff (2119 lines, 17 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

jatgarg and others added 3 commits May 19, 2026 13:46
…itions

Output of `pnpm exec flub typetests --disable --normalize --reset`
applied to fluid-framework and presence-definitions. Follow-up to the
prior normalize commit on this branch, which added typetests:gen
scripts to these two packages on the assumption type tests were
viable.

In practice neither package can generate type tests against the
current published baseline:

- fluid-framework: flub's default entrypoint is "legacy/alpha", which
  is not exported by fluid-framework@2.92.0 (the current -previous)
  or any later published version.
- @fluid-internal/presence-definitions: typeValidation.entrypoint is
  "beta", but the current package's exports map has no "./beta"
  entrypoint, so flub's emitted import of
  "@fluid-internal/presence-definitions/beta" fails to resolve at
  tsc time.

Without typetests:gen scripts and -previous deps these packages no
longer trip the fluid-build-tasks-tsc policy (which requires tsc to
depend on typetests:gen when both exist and there is no build:test
script). Matches the 2.92.1 precedent from PR microsoft#26930.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Removes orphan `fluid-framework@2.92.0` and
`@fluidframework/presence@2.92.0` entries from pnpm-lock.yaml that
are no longer referenced after disabling type tests for
fluid-framework and presence-definitions in the previous commit.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
After disabling type tests for @fluid-internal/presence-definitions
in the prior commit, the previously-generated
validatePresenceDefinitionsPrevious.generated.ts still tried to
import from "@fluid-internal/presence-definitions-previous/beta" —
which no longer resolves because the -previous dep was removed. tsc
on src/test/tsconfig.json failed as a result.

flub deletes the generated file when typetests:gen runs against a
disabled package, but no typetests:gen run happened on this branch
(disabling removed the script). Removing the stale file manually.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
}
},
"typeValidation": {
"entrypoint": "beta",
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.

@jason-ha : This seems odd. I see the "typetests:gen-disabled": "flub generate typetests --dir . -v" script above.

Is this intended to actually be enabled?
Now that there is a release of it, we could enable this, and test against that?

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.

@jatgarg Loking at the entry points that do exist, I think this should target public

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Added it back.

},
"typeValidation": {
"broken": {}
"disabled": true
Copy link
Copy Markdown
Contributor

@CraigMacomber CraigMacomber May 19, 2026

Choose a reason for hiding this comment

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

I think this one should target legacy, which I think should actually work (we don't have legacy beta, so we can't target that, so its either beta or legacy, and I think legacy makes more sense). Both of those include public, which for sure should be included.

jatgarg and others added 2 commits May 19, 2026 15:50
…ypoint

The previous commit disabled type tests for presence-definitions
because the "beta" entrypoint setting did not resolve on the current
side — current @fluid-internal/presence-definitions only exports ".",
"./internal", and "./internal/workspace*".

The "." (public) entrypoint exposes the package's full type surface
on both sides:

- Current @fluid-internal/presence-definitions exports lib/index.d.ts
  (Attendee, Presence, LatestMap, LatestMapRaw, NotificationsManager,
  StatesWorkspace, AttendeeStatus, the Latest/LatestValue type
  family, BroadcastControls, internal type utility re-exports).
- Previous @fluid-internal/presence-definitions@2.101.0 has the same
  "." entrypoint with the same surface.

Switch to entrypoint: "public", restore the typetests:gen script and
-previous devDependency (pointing at the just-released 2.101.0 of
the renamed package), and regenerate the validation file. Full build
verified.

fluid-framework remains disabled — it would require adding test-build
infrastructure (src/test/tsconfig.{json,cjs.json} + build:test* scripts)
that the package has never had.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
fluid-framework was disabled in PR microsoft#26930 because flub's default
"legacy/alpha" entrypoint did not exist in any published version,
and the package lacked the test-compilation infrastructure that
other type-tested packages in the repo have.

Add the missing infrastructure (modeled after presence-definitions):

- src/test/tsconfig.json (ESM) and src/test/tsconfig.cjs.json (CJS),
  to compile generated type-test files
- build:test, build:test:esm, build:test:cjs scripts
- typetests:gen script
- fluid-framework-previous devDependency at npm:fluid-framework@2.101.0

Set typeValidation.entrypoint to "public" — exists on both current
and 2.101.0 baseline as the "." export. Regenerate the validation
file against the 2.101.0 baseline.

With build:test now in place, the fluid-build-tasks-tsc policy is
satisfied without needing a hand-coded cross-package dep list. Full
build verified (1295 tasks, 54.8s).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@jatgarg jatgarg requested a review from CraigMacomber May 19, 2026 23:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants