Skip to content

fix(ci): no release for merges that cannot reach a consumer (fixes #3023) - #3081

Closed
mfal wants to merge 1 commit into
mainfrom
claude/docs-ci-no-release-ac12f4
Closed

fix(ci): no release for merges that cannot reach a consumer (fixes #3023)#3081
mfal wants to merge 1 commit into
mainfrom
claude/docs-ci-no-release-ac12f4

Conversation

@mfal

@mfal mfal commented Sep 2, 2026

Copy link
Copy Markdown
Member

Relevance was decided by repo-root paths, so everything under packages/** counted as publish-relevant wholesale. Two of the empty-changelog releases in #3023 came from that, and one class the issue does not list came later.

What no longer publishes

Per PUSH, since that is what the decide job classifies:

Push What it carried Version it cut
#3010 only packages/components/.storybook/preview.tsx 1.0.14 — would not be cut now
#3008 the Storybook image's Dockerfile / .dockerignore folded into 1.0.15, which also carried #3013 (a real change) and would still be cut

Two cases from #3023's evidence table are not closed, and that is deliberate — see "Not in scope":

Push Why it still publishes
#3006 (cut 1.0.12) its package.json scripts diff and src/tests/visual/** drop out, but remote-react-components/CONTRIBUTE.md and dev/cross-version/crossVersionRunner.ts stay relevant
#3020 (cut 1.1.5) patches/ for @mfalkenberg/react-live-ssr, a dependency only apps/docs imports

The change

The criterion is consumer effect, not tarball membership. The two differ in both directions, and only the first decides: a tarball carries the package's scripts, yet nothing but the install lifecycle runs on a consumer's machine.

  • Package-local denylist: .storybook/**, the Storybook image's Dockerfile/.dockerignore, e2e/**, src/tests/**, *.stories.*, *.test.*.
  • Every package.json is judged by its key diff, not only the root one. scripts is irrelevant unless the diff touches preinstall, install, postinstall or prepare. No Flow package defines one today — which is exactly why the guard belongs in code and not in someone's memory. The decide job now fetches before/after for every changed manifest.
  • packages/*/dev/** stays relevant, although Patch releases with an empty changelog: relevance is path-based, the changelog is type-based #3023 proposed skipping it. It is a build input: components/dev/vite/* is imported by vite.build.config.ts and shapes the emitted CSS layers, dev/component-index and dev/status-registry write shipped dist/assets/*.json, and codemods/dev/generate writes the published MIGRATION.md.
  • A stories/ directory stays relevant too — only the story files are skipped. createDocPropertiesJson.ts parses every .tsx under src/ and ignores only *.stories.tsx, so components/Button/stories/lib.tsx contributes five entries to the published doc-properties.json.
  • One gap stays open by choice: a patches/ entry for a dependency only a private project imports (1.1.5). Ruling it out needs the lockfile's importer graph including transitive edges, where a wrong answer swallows a real release. A test pins the current behaviour so the gap stays deliberate.

Tests and stories leave dist/types. unplugin-dts emitted declarations for all of src:

1.1.10 tarball entries of those stories/tests
flow-react-components 4160 126 *.stories.d.ts + 126 maps
flow-remote-react-components 799 196 under dist/types/tests/**

All eight release builds now share publishedDtsOptions from packages/core. No consumer loses a type: no package's exports has a wildcard subpath, so those declarations were unreachable. The globs cannot move into the shared tsconfig preset instead — its exclude governs tsc --noEmit, and that would stop type-checking the tests.

@mittwald/flow-core is now a declared devDependency of ext-bridge, remote-core and remote-elements, which newly import it. That is also the nx graph edge their build cache needs in order to invalidate on a core change.

Verification

Not in scope

Tracked in #3083:

Fixes #3023.

🤖 Generated with Claude Code

@mfal mfal self-assigned this Sep 2, 2026
@github-actions

github-actions Bot commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Coverage Report for ./packages/components/

Status Category Percentage Covered / Total
🔵 Lines 78.69% 746 / 948
🔵 Statements 78.57% 763 / 971
🔵 Functions 80.09% 165 / 206
🔵 Branches 70.33% 377 / 536
File CoverageNo changed files found.
Generated in workflow #6573 for commit 1145994 by the Vitest Coverage Report Action

@mfal
mfal marked this pull request as ready for review September 2, 2026 08:55
@mfal
mfal requested a review from a team September 2, 2026 08:55
@mfal mfal changed the title fix(ci): no release for merges that cannot reach a consumer (part of #3023) fix(ci): no release for merges that cannot reach a consumer (fixes #3023) Sep 2, 2026
@mfal
mfal marked this pull request as draft September 2, 2026 08:55
@github-actions

github-actions Bot commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

🚀 Preview Deployment

Preview environments are ready:

Type URL
docs pr-3081.docs.review.flow-components.de
storybook pr-3081.storybook.review.flow-components.de

Images:

  • docs: ghcr.io/mittwald/flow/docs:pr-3081
  • storybook: ghcr.io/mittwald/flow/storybook:pr-3081

The relevance gate decided by repo-root paths only, so everything under
packages/** was publish-relevant wholesale. A Storybook config edit cut
1.0.14, a `--project=unit` glob in a package's scripts cut 1.0.12 — both
with an empty changelog, because the changelog is decided by commit type
while relevance is decided by paths (#3023).

The criterion is now consumer effect, not tarball membership. The two
differ in both directions: a tarball carries the package's `scripts`, yet
only the install lifecycle runs on a consumer's machine.

- Package-local denylist: `.storybook/**`, the Storybook image's
  `Dockerfile`/`.dockerignore`, `e2e/**`, `src/tests/**`, `*.stories.*`
  and `*.test.*`.
- Every `package.json` is judged by its key diff, not just the root one.
  `scripts` is irrelevant unless the diff touches `preinstall`,
  `install`, `postinstall` or `prepare` — no Flow package has one today,
  which is why the guard belongs in code.
- `packages/*/dev/**` stays relevant although #3023 proposed skipping it:
  `components/dev/vite/*` shapes the emitted CSS layers, the
  component-index and status-registry generators write shipped
  `dist/assets/*.json`, and `codemods/dev/generate` writes the published
  MIGRATION.md.
- A `stories/` DIRECTORY stays relevant too, only the story files are
  skipped: `createDocPropertiesJson.ts` parses every `.tsx` under `src/`
  and ignores only `*.stories.tsx`, so `Button/stories/lib.tsx`
  contributes five entries to the published doc-properties.json.

Tests and stories also leave `dist/types`. `unplugin-dts` emitted
declarations for all of `src`, which put 196 of
flow-remote-react-components@1.1.10's 799 tarball entries under
`dist/types/tests/**` and 252 story entries into flow-react-components.
All eight release builds now share `publishedDtsOptions` from
packages/core. No consumer loses a type: no package's `exports` has a
wildcard subpath, so those declarations were unreachable. The globs
cannot move into the shared tsconfig preset — its `exclude` governs
`tsc --noEmit`, and that would stop type-checking the tests.

`@mittwald/flow-core` is now a declared devDependency of ext-bridge,
remote-core and remote-elements, which newly import it — that is also the
nx graph edge their build cache needs to invalidate on a core change.

Verified by replaying every non-release commit on main since #2933
through the changed classifier: #3010 and #3008 flip to no-publish, and
no commit that produced a legitimate release flips with them.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@mfal

mfal commented Sep 2, 2026

Copy link
Copy Markdown
Member Author

Superseded by #3098 and closing.

#3080 had already taken the same ground further: it carries the package-local denylist including CONTRIBUTE.md, dev/cross-version/** and dev/vitest/** (which I had deferred to #3083), returns the rule that decided each skip, and fixes the changelog half through changelogPreset. It also sits on newer main.

Nothing is lost: #3098 contains #3080's commit and carries over the one thing this branch had that it lacked — the publishedDtsOptions cleanup that keeps story and test declarations out of dist/types — plus the lockfile correction from this branch's second commit.

🤖 Closed by Claude Code

@mfal mfal closed this Sep 2, 2026
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.

Patch releases with an empty changelog: relevance is path-based, the changelog is type-based

1 participant