Skip to content

Fix retained Storybook channel startup timeouts in CI - #4524

Merged
Jason Morse (JasonVMo) merged 2 commits into
mainfrom
jasonmo-microsoft-storybook-channel-reliability
Nov 20, 2026
Merged

Jason Morse (JasonVMo) merged 2 commits into
mainfrom
jasonmo-microsoft-storybook-channel-reliability

Conversation

@JasonVMo

Copy link
Copy Markdown
Contributor

Platforms Impacted

  • iOS
  • macOS
  • win32 (Office)
  • windows
  • android

Description of changes

Diagnoses the recurring startup failure on Version Packages #4509 without changing that PR. The latest macOS Paper job and preceding run fail with Owned service "storybook-channel" did not publish correlated readiness within 120000ms before any stories run. The latest artifact shows the retained app launching at 04:55:23Z, cold Metro bundling through 04:57:15Z, and parent-requested shutdown at 04:57:30Z.

The channel intentionally withholds readiness until the retained runtime authenticates and renders its first story, with a default 300-second render budget. The native smoke parent incorrectly uses its 120-second listener budget for this entire wait; the retained macOS hosted-driver path has the same mismatch.

  • Resolve listener and initial-render budgets together for retained smoke and hosted drivers on macOS, Windows, and Win32. Keep the listener default at 120 seconds and allow its budget plus the initial-render budget for correlated channel readiness (420 seconds by default).
  • Forward the same initial-render budget to the channel, honoring explicit configuration and environment overrides. Preserve the existing explicit startup-budget fallback.
  • Keep authenticated, same-process readiness, cancellation, bounded timeout, and ownership-safe cleanup. No sleeps, generic retries, or weakened readiness checks.
  • Add fake-clock cold-render and missing-render regressions, platform/phase budget assertions, documentation, and a patch changeset.

Verification

Passed:

  • yarn workspace @fluentui-react-native/storybook-desktop test DesktopStorybookCli -- 113 tests passed.
  • yarn workspace @fluentui-react-native/storybook-desktop format -- passed.
  • yarn workspace @fluentui-react-native/storybook-desktop lint -- passed.
  • yarn workspace @fluentui-react-native/storybook-desktop build -- passed.
  • yarn workspace @fluentui-react-native/storybook-desktop test -- all 497 tests passed across 30 suites.
  • yarn oxfmt --check -- passed.
  • yarn markdown-link-check -c .github/markdown-link-check-config.json packages/agentic/storybook-desktop/references/readiness.md -- completed; no hyperlinks to check.
  • yarn markdown-link-check -c .github/markdown-link-check-config.json packages/agentic/storybook-desktop/references/integration.md -- passed.
  • yarn change:check -- passed after committing.
  • yarn clean-lage-cache followed by yarn lage buildci -- initial aggregate failed in unchanged desktop-driver boundedCommand.test.ts waiting for a child-process ready line. yarn workspace @fluentui-react-native/desktop-driver test boundedCommand passed all 8 tests unchanged. The first aggregate rerun overlapped draining fixture output and failed formatting on temporary files; after fixture cleanup, the final yarn lage buildci passed (86 executed, 100 freshly cached, zero failed).

Regression control: temporarily restoring the old listener-only deadline makes both waits past listener startup cases fail at premature shutdown. With the fix restored, yarn workspace @fluentui-react-native/storybook-desktop test DesktopStorybookCli -t 'waits past listener startup' passes both cases, including timeout/cleanup when no render arrives.

Not run locally: native macOS Fabric/Paper, Windows Fabric, and Win32 smoke qualification; these remain CI gates. Portable tests are not native qualification.

Before After
A cold retained app is stopped after the 120-second listener deadline despite the channel allowing 300 seconds for its first render. Listener readiness stays bounded at 120 seconds; authenticated channel readiness includes the retained startup/render budget, and missing readiness still fails with cleanup.

Pull request checklist

This PR has considered (when applicable):

  • Automated Tests
  • Documentation and examples
  • Keyboard Accessibility
  • Voiceover
  • Internationalization and Right-to-left Layouts

Allow cold CI bundles to use the channel's initial-render budget instead of timing out at the listener deadline. Keep authenticated readiness, bounded failure, and ownership-safe cleanup.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@github-actions

github-actions Bot commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

Bundle size report

Tree-shaken, minified production esbuild bundles with React and React Native runtimes externalized.

Scenario Modules-Mac (Δ) Modules-Win (Δ) Size-Mac (Δ) Size-Win (Δ)
components-button 79 (+1) 80 (+1) 72.92k (-702b) 72.85k (-702b)
components-catalog 228 (+1) 229 (+1) 229.66k (+349b) 229.59k (+349b)
design-themed-root 55 (+4) 56 (+4) 56.26k (+998b) 56.18k (+998b)
design-color-lib 6 (+0) 6 (+0) 6.27k (+0b) 6.27k (+0b)
design-theme-state-legacy-source 49 (+1) 50 (+1) 52.96k (-841b) 52.89k (-841b)
design-legacy-theme 42 (+0) 42 (+0) 39.11k (+0b) 42.91k (+0b)
design-legacy-theme-from-flex 58 (+4) 58 (+4) 60.70k (+824b) 64.51k (+822b)
design-fluent-light-theme 7 (+0) 7 (+0) 18.74k (+0b) 22.59k (+0b)
design-fluent-theme 35 (+0) 35 (+0) 27.46k (+4b) 31.25k (-1b)
design-fluent-hc-theme 32 (+0) 32 (+0) 27.34k (+0b) 31.13k (+0b)
design-flex-theme 29 (-4) 29 (-4) 14.30k (-9.07k) 14.29k (-9.07k)
design-flex-cool-theme 26 (New) 26 (New) 12.51k (New) 12.50k (New)
design-flex-warm-theme 26 (-7) 26 (-7) 12.28k (-11.15k) 12.27k (-11.15k)

The job is advisory: size changes are reported but do not fail the pull request. Bundle or analysis errors still fail.


View bundle-size workflow run

Derive default deadline expectations from the production constants and name shared test overrides without changing runtime timeout values.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@JasonVMo
Jason Morse (JasonVMo) enabled auto-merge (squash) November 20, 2026 18:05
@JasonVMo
Jason Morse (JasonVMo) merged commit ca6d26f into main Nov 20, 2026
17 of 20 checks passed
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