From da07f47d96fd13e3513e3455e928f57f1538ee41 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 19 Jul 2026 21:22:20 +0100 Subject: [PATCH] fix(ci): restore Examples Smoke as a working regression detector MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Two coupled failures let a release-logic regression (private-npm-package skip) break the smoke unnoticed for weeks: 1. The npm-single fixture's root package.json was `private: true`, so once private packages became skipped-at-discovery it was the only package and got filtered out — "No packages found in workspace". A single consumer's one package is the publishable one, so build it non-private (monorepo roots stay private; their members ship). Verified: the dry-run then reaches "Publish complete". 2. The workflow only triggered on examples/harness paths, never on packages/** — the release code it actually exercises — so the regression never re-ran the smoke. Broaden the triggers to packages/**, package.json, and pnpm-lock.yaml, and add a nightly schedule as a backstop. Regenerated examples-smoke.yml (paths expanded, no YAML anchors — GitHub Actions doesn't reliably support them). Closes #575 Closes #576 Co-Authored-By: Claude Opus 4.8 Claude-Session: https://claude.ai/code/session_011i1KvoyxATU3bz5V5Sf1Xu --- .github/workflows/examples-smoke.yml | 8 ++++++++ scripts/examples-smoke/build-fixture.ts | 5 ++++- .../examples-smoke/generate-smoke-workflow.ts | 19 +++++++++++++++++-- 3 files changed, 29 insertions(+), 3 deletions(-) diff --git a/.github/workflows/examples-smoke.yml b/.github/workflows/examples-smoke.yml index a9295063..55f5e91e 100644 --- a/.github/workflows/examples-smoke.yml +++ b/.github/workflows/examples-smoke.yml @@ -22,6 +22,9 @@ on: - examples/** - scripts/examples-smoke/** - .github/workflows/examples-smoke.yml + - packages/** + - package.json + - pnpm-lock.yaml pull_request: branches: - main @@ -29,6 +32,11 @@ on: - examples/** - scripts/examples-smoke/** - .github/workflows/examples-smoke.yml + - packages/** + - package.json + - pnpm-lock.yaml + schedule: + - cron: 0 3 * * * workflow_dispatch: {} permissions: contents: read diff --git a/scripts/examples-smoke/build-fixture.ts b/scripts/examples-smoke/build-fixture.ts index 1a73fae2..8dabae2d 100644 --- a/scripts/examples-smoke/build-fixture.ts +++ b/scripts/examples-smoke/build-fixture.ts @@ -110,7 +110,10 @@ function writeRootPackageJson( } function buildNpmSingle(out: string, tarballNames: Record): void { - writeRootPackageJson(out, 'smoke-consumer', {}, tarballNames); + // A single-package consumer's one package IS the publishable one, so it must not be `private`. + // writeRootPackageJson defaults `private: true` for the monorepo roots (where only members ship), + // but a private single package is skipped at discovery — leaving nothing to release. + writeRootPackageJson(out, 'smoke-consumer', { private: false }, tarballNames); } function buildNpmMonorepo(out: string, tarballNames: Record): void { diff --git a/scripts/examples-smoke/generate-smoke-workflow.ts b/scripts/examples-smoke/generate-smoke-workflow.ts index 1a01609b..23d9058d 100644 --- a/scripts/examples-smoke/generate-smoke-workflow.ts +++ b/scripts/examples-smoke/generate-smoke-workflow.ts @@ -215,17 +215,32 @@ export function buildWorkflow(): Record { jobs[`smoke-${scenario.id}`] = smokeJob(scenario); } + // The smoke exercises `releasekit release`, so it must also run when that release code — or the + // dependencies it resolves — changes, not just the examples/harness; otherwise a regression in + // release logic can break the smoke without ever re-triggering it. + const triggerPaths = [ + 'examples/**', + 'scripts/examples-smoke/**', + '.github/workflows/examples-smoke.yml', + 'packages/**', + 'package.json', + 'pnpm-lock.yaml', + ]; + return { name: 'Examples Smoke', on: { push: { branches: ['main'], - paths: ['examples/**', 'scripts/examples-smoke/**', '.github/workflows/examples-smoke.yml'], + paths: [...triggerPaths], }, pull_request: { branches: ['main'], - paths: ['examples/**', 'scripts/examples-smoke/**', '.github/workflows/examples-smoke.yml'], + paths: [...triggerPaths], }, + // Nightly backstop on main: catches regressions the path filters miss (transitive dep bumps, + // runner-image drift) within a day. + schedule: [{ cron: '0 3 * * *' }], workflow_dispatch: {}, }, permissions: { contents: 'read' },