Skip to content

ci: install only the headless Chromium shell - #5187

Merged
Astro-Han merged 1 commit into
apache:mainfrom
orangeCatDeveloper:ci/playwright-only-shell
Sep 12, 2026
Merged

Astro-Han merged 1 commit into
apache:mainfrom
orangeCatDeveloper:ci/playwright-only-shell

Conversation

@orangeCatDeveloper

@orangeCatDeveloper orangeCatDeveloper commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

Summary

The Storybook smoke always launches headless, and Playwright picks its executable
by headedness, so playwright install chromium downloaded the full Chrome build
on every Storybook-selected run and never opened it. --only-shell installs only
the build the smoke uses.

No behavior change — the smoke was already launching chromium-headless-shell.
SMOKE_HEADED=1 stops working on a runner; it was only ever meaningful locally,
where developers install their own browsers.

Verification

Download per Storybook-selected run:

before   184.3 MiB full Chrome + 114.7 MiB headless shell + 2.3 MiB FFmpeg = 301.3 MiB, 18s
after                           114.7 MiB headless shell + 2.3 MiB FFmpeg = 117.0 MiB, 13s

Before from job 102913386594 on main, after from this PR's own run. The install after the change, and the
smoke's exact launch call against it:

$ npx playwright install --only-shell chromium && ls "$PLAYWRIGHT_BROWSERS_PATH"
chromium_headless_shell-1234
ffmpeg-1011

$ node -e "chromium.launch({headless:true})..."
LAUNCH OK: ok

$ node -e "chromium.launch({headless:false})..."
browserType.launch: Executable doesn't exist at .../chromium-1234/...

Ran locally: npm run format:check, node --test scripts/ci-workflow-policy.test.mjs
(43 pass). Editing ci.yml selects every surface, so this PR's own test run
exercises the changed step.

AI use

Select exactly one:

  • No generative tool made a substantive contribution
  • Generative tooling made a substantive contribution

Tool(s) and scope: Claude Code found the unused download while profiling CI step
timings, wrote the change and ran the verification above. Codex (gpt-5.6-sol) and
a second independent Claude session reviewed the diff. Review below is human.

Checklist

  • Tests cover the change and fail without it — no test covers a workflow
    install flag; a wrong flag fails the Storybook smoke outright
  • Lint, format, typecheck and the affected suites pass locally

Does this PR entail a change in behavior?

  • Yes — described under Summary above
  • No

@github-actions github-actions Bot added the effort/XS Under 10 readable lines label Sep 11, 2026
The Storybook smoke always launches headless, and Playwright picks its
executable by headedness, so the full Chrome build was downloaded on
every Storybook-selected run and never opened.

Generated-by: Claude Code

@me2seeks me2seeks left a comment

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.

PR 5187 Review

结论

APPROVE
--only-shell 改动的消费方核实无误:ci.yml 该安装步骤只服务 storybook smoke(scripts/storybook-visual-smoke.mjs:391headless: process.env.SMOKE_HEADED !== '1',CI runner 上恒为 headless),而 headed 的 scripts/perf/storybook.mjs:26headless: false)由独立 workflow performance-frontend.yml:40 自己 playwright install chromium,不受本改动影响。Desktop e2e 用 Electron 自带 Chromium(apps/desktop/e2e/playwright.config.ts 不配 browserType),也不依赖系统 chromium 构建。

@Astro-Han
Astro-Han merged commit 3cce78f into apache:main Sep 12, 2026
1 check passed
@orangeCatDeveloper
orangeCatDeveloper deleted the ci/playwright-only-shell branch September 12, 2026 18:58
Shouly pushed a commit to Shouly/maka that referenced this pull request Sep 13, 2026
Twelve upstream commits. Two reach the new renderer's contracts: apache#5225
unifies connection-scoped model configuration (`relayModelProfiles` becomes
`modelOverrides`, `ModelOverride` is a superset of the old relay profile,
catalog entries carry image support and limits before a user override and
lose `describedByMetadata`; protocol epoch 147 → 149) and apache#4901 keeps Side
Conversation follow-ups visible (one queue projection for every chat surface,
and the settlement reader can wait for a Turn's terminal record through the
Host's Turn index). Also in: apache#5192's scroll geometry (the authority now
publishes ranges only while native input is idle, with `commitIfIdle` /
`subscribeToIdle` and a `settled` reader phase), apache#5229's terminal recovery on
the main side (`shellRuns.recover` / `subscribeCloseChanges`; `write` / `stop`
return nothing), typed OAuth failure reasons (apache#4887), main-process copy
catalogs (apache#5178), localized native dialog titles (apache#5179), per-command CLI
help (apache#5181), the renderer architecture ratchet hardening (apache#4584) and CI
trims (apache#5187, apache#5241).

Resolution per the sync policy: conflicts under the old renderer's trees,
packages/ui's deleted components, stories, e2e specs and the main tests that
import them stay deleted, and upstream's new files there are dropped
(`application/contracts/*`, `features/connection-settings/provider-*`, the
`use-app-shell-session-ui-state.ts` git placed under `lib/ported`, the
`scroll-geometry` and
`side-chat-followups` e2e specs, the connections IPC test additions that
import the old settings services). The renderer architecture checker and
ledger keep ours (apache#4584 hardens a base comparison our variant does not use).
`workbar-layout.ts` / `workbar-tabs.ts` keep ours: git's rename pairing had
merged apache#5229's `restore-terminals` / `close-terminal` actions into them, which
nothing here dispatches yet. `runtime-host-quit-copy.ts` keeps our copy, which
leads with `activeTitle` on purpose, so the catalog type drops
`activeMessage`. Astryx stays out: upstream's scroll authority is taken and
its `ChatLayoutScrollButton` removed again.

Re-implemented for the new contracts:
- `lib/ported/session-message-settlement.ts` is upstream's, reaching the
  preload through `bridge/` (`openTranscript`, `listTurns`) rather than
  `window.maka`; the range-store main test that drives it is upstream's with
  `lib/ported` paths.
- `lib/ported/message-queue-projection.ts` joins from upstream; the event
  handlers' `queue_update` derives both the queue entries and the transient
  messages from it (follow-ups now filtered to `queued` like steering).
- `bridge/shell-runs.ts` returns nothing from `write` / `stop`.
- Settings › Models renames relay profiles to model overrides and drops the
  "not described by metadata" token and its copy.
- `packages/ui` `transcript-scroll-authority.tsx` is upstream's minus the
  Astryx button; `use-chat-scroll.ts` and `transcript-viewport-navigation.ts`
  merged cleanly, so the session view gets the idle-gated range publication
  through the store's existing `viewportNavigation`.

`TransientUserMessageProjection` gains `pendingSteering?` so the projection's
flag is a declared field. Settings › Models still writes the whole override
table; the per-model `modelOverride` path is recorded in the release
checklist as a follow-up.

The compatible-change declaration is unchanged this round.

Gates: build:test + build:renderer, typecheck, biome lint and format, locale
hygiene, ASF headers, renderer architecture ledger (rewritten with `--write`),
e2e budget, third-party notices, knip (three more unused files, all
upstream's new `scripts/perf/*`), desktop dist tests (1619), renderer state
(282), Electron smoke (44 checks, no renderer errors), core-dialogue smoke,
streaming-switch smoke. `packages/runtime` `model-adapter-onerror` fails on
this machine before and after, as in the eleventh sync.

Committed with `--no-verify`: the staged Biome step flags upstream's new
`patches/@XTerm+xterm+6.0.0.patch` (escape sequences Biome's stdin mode
cannot round-trip — the known false positive); the file is byte-identical to
upstream and the other hook steps (ASF headers, protocol epoch, whitespace)
were run by hand and pass.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

effort/XS Under 10 readable lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants