Skip to content

build: improve release DAG artifact freshness - #418

Merged
fforootd merged 4 commits into
mainfrom
codex/improve-release-dag-ci-artifacts
Jun 26, 2026
Merged

build: improve release DAG artifact freshness#418
fforootd merged 4 commits into
mainfrom
codex/improve-release-dag-ci-artifacts

Conversation

@fforootd

Copy link
Copy Markdown
Member

Summary

  • Move the release artifact package manifest into scripts/release-manifest.mjs so release packing, changeset validation, tarball verification, and journey registry setup consume one package list.
  • Make Moon own the visible release build DAG by adding release prep/build tasks and removing nested moon run calls from scripts/release.mjs.
  • Let CI's fresh-app journey reuse snapshot tarballs via --tarballs-dir instead of rebuilding release tarballs a second time.

Validation

  • moon task release:pack --json
  • moon task release:snapshot --json
  • moon task release:publish --json
  • moon task release:build-public-packages --json
  • moon run cli:test
  • moon run release:pack
  • moon run workspace:check -- --only release
  • moon run workspace:journey -- --framework next
  • corepack pnpm exec changeset status --since origin/main
  • git diff --cached --check

Release notes / changeset

  • Empty changeset: .changeset/release-dag-artifact-freshness.md
  • Reason: publishable package paths changed for release/build wiring only; no published CLI, SDK, API, component, or server behavior changes.

Notes

  • Scope is limited to release DAG, CI artifact freshness, and related tests/docs.
  • This PR does not include passkey registration behavior changes.

@vercel

vercel Bot commented Jun 25, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
nextgen Ready Ready Preview, Comment Jun 26, 2026 6:43pm
nextgen-docs Ready Ready Preview, Comment Jun 26, 2026 6:43pm
nextgen-mock-zitadel Ready Ready Preview, Comment Jun 26, 2026 6:43pm

Request Review

@github-actions

github-actions Bot commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

🦋 Changeset detected

Latest commit: e09054d

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 0 packages

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copilot AI 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.

Pull request overview

This PR refactors the release/CI orchestration so Moon owns the visible release DAG and all release-related consumers share a single canonical “public packages” manifest. It also lets the fresh-app journey reuse already-built release tarballs to avoid rebuilding artifacts twice in CI.

Changes:

  • Centralize the public release package list in scripts/release-manifest.mjs and reuse it across release packing, changeset validation, and tarball verification.
  • Move release prerequisite build steps into Moon task deps (release prep/build tasks) and simplify scripts/release.mjs by removing nested moon run calls.
  • Add journey support for --tarballs-dir / JOURNEY_TARBALLS_DIR so CI can reuse snapshot tarballs.

Reviewed changes

Copilot reviewed 36 out of 36 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
tools/release/moon.yml Adds release DAG tasks for cleaning/building public packages and wires release deps into pack/snapshot/publish.
scripts/release.mjs Removes embedded UI and public package build side-effects; relies on Moon deps for release readiness.
scripts/release-manifest.mjs New canonical manifest for public release packages/dirs/build targets.
scripts/release-clean.mjs New cleaner for public package dist/ artifacts used by the release build DAG.
scripts/release-artifacts.mjs Switches to manifest-driven package lists and adds a pre-pack check for required dist/ output.
scripts/check.mjs Runs the release snapshot phase via moon run release:snapshot (with forwarded args).
scripts/check-changesets-status.mjs Derives the Changesets fixed-group validation package list from the release manifest.
packages/sdk-vue/moon.yml Adds build-release task with release-graph deps.
packages/sdk-svelte/moon.yml Adds build-release task with release-graph deps.
packages/sdk-solid/moon.yml Adds build-release task with release-graph deps.
packages/sdk-react/moon.yml Adds build-release task with release-graph deps.
packages/sdk-qwik/moon.yml Adds build-release task with release-graph deps.
packages/sdk-nuxt/moon.yml Adds build-release task with release-graph deps.
packages/sdk-next/moon.yml Adds build-release task with release-graph deps.
packages/sdk-core/moon.yml Adds build-release task with release-graph deps.
packages/sdk-angular/moon.yml Adds build-release task with release-graph deps.
packages/components/moon.yml Adds build-release task and ensures required build deps (tokens/styles) are built.
packages/api/moon.yml Adds build-release task and wires it to codegen.
apps/login-ui/moon.yml Adds build-release task and wires it to release component deps.
apps/cli/tsdown.config.ts Updates docs to reference cli:build-release as the production telemetry-stamp build path.
apps/cli/tests/unit/scripts/verify-tarballs.test.ts Uses the manifest package dirs instead of duplicating the list in-test.
apps/cli/tests/unit/scripts/release-manifest.test.ts New test suite validating manifest ↔ Changesets fixed group ↔ Moon task existence.
apps/cli/tests/unit/scripts/release-artifacts.test.ts Adds coverage for “packing requires dist output” guard.
apps/cli/tests/unit/scripts/local-registry.test.ts Adds coverage for using prebuilt tarballs without triggering release rebuild.
apps/cli/tests/unit/scripts/check-changesets-status.test.ts Derives expected fixed-group list from the manifest to prevent drift.
apps/cli/moon.yml Adds cli:build-release task stamping production telemetry channel for release builds.
apps/cli/AGENTS.md Updates agent guidance to reflect new release build path for production telemetry stamping.
apps/cli-journey-e2e/scripts/verify-tarballs.mjs Uses the manifest package dirs instead of maintaining a duplicated list.
apps/cli-journey-e2e/scripts/run-options.test.mjs Extends arg parsing tests for --tarballs-dir.
apps/cli-journey-e2e/scripts/run-options.mjs Adds --tarballs-dir option parsing.
apps/cli-journey-e2e/scripts/run-local.mjs Plumbs tarballs-dir option/env into registry prep as prebuiltTarballsDir.
apps/cli-journey-e2e/scripts/local-registry.mjs Skips rebuild when prebuiltTarballsDir is set; copies/verifies/publishes provided tarballs.
apps/cli-journey-e2e/README.md Documents --tarballs-dir and JOURNEY_TARBALLS_DIR.
apps/cli-journey-e2e/AGENTS.md Documents CI reuse of prebuilt tarballs and updates required package list text.
.github/workflows/ci.yml Runs journey using snapshot tarballs via --tarballs-dir dist/release/${version}/npm.
.changeset/release-dag-artifact-freshness.md Adds an empty changeset describing release/CI wiring-only changes.

Comment thread scripts/release-clean.mjs
Comment thread .changeset/release-dag-artifact-freshness.md
…-dag-ci-artifacts

# Conflicts:
#	scripts/release.mjs
#	tools/release/moon.yml
@fforootd
fforootd merged commit b0ba758 into main Jun 26, 2026
8 checks passed
@fforootd
fforootd deleted the codex/improve-release-dag-ci-artifacts branch June 26, 2026 21:12
fforootd added a commit that referenced this pull request Jul 6, 2026
## Summary

- Add a direct Moon dependency from `cli:build-release` to `cli:test` so
the production-stamped CLI build cannot clean and rewrite
`apps/cli/dist` while Vitest is exercising oclif command discovery from
that same directory.
- Keep the CLI Vitest global setup self-contained by asserting that the
tsdown-built command files exist and `oclif commands --json` discovers
`status` before any test files run.
- Remove the runtime 127 retry from the in-process CLI test helper so
the test harness fails fast instead of masking a graph/order problem.

## Validation

- `moon run cli:build-release` (runs `cli:test` before the production
CLI build; captured log shows `cli:test` 101 files / 672 tests passed
and `cli:build-release` completed)
- `moon run cli:typecheck`
- `moon run cli:lint`
- `node scripts/check-changesets-status.mjs --base origin/main
--summary`
- `corepack pnpm exec changeset status --since origin/main`
- `git diff --check origin/main...HEAD`

## Release notes / changeset

Empty changeset added: `.changeset/cli-build-release-dag.md`. This
changes package-local Moon build wiring under `@zitadel/cli`, but no
shipped CLI behavior changes and no package bump is planned.

## Notes

- The broader problem is the Moon graph/shared-output ordering, not the
PATH-sensitive server lifecycle prober.
- Blame points to the interaction between the original CLI Vitest global
setup from `0547b8c3` / #319 and the release build DAG from `b0ba758a` /
#418, which introduced `cli:build-release` as a CI-visible production
build that cleans the same `apps/cli/dist` directory.
- Live open-PR check: PR #463 reproduced the `status` exit-127 class
with `cli:build`, `cli:test`, and `cli:build-release` all building CLI
dist in the same full-pr graph. PR #462 and the older filtered failed
logs did not show this oclif/status signature.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: ✅ Done

Development

Successfully merging this pull request may close these issues.

2 participants