Skip to content

fix+perf(ci): npm skip-existing + Windows matrix trim (CI follow-ups)#186

Merged
7xuanlu merged 4 commits into
mainfrom
worktree-fix+npm-skip-existing
May 25, 2026
Merged

fix+perf(ci): npm skip-existing + Windows matrix trim (CI follow-ups)#186
7xuanlu merged 4 commits into
mainfrom
worktree-fix+npm-skip-existing

Conversation

@7xuanlu
Copy link
Copy Markdown
Owner

@7xuanlu 7xuanlu commented May 25, 2026

Combines PR #183 + npm skip-existing as a single CI follow-up bundle. v0.7.0 release is functionally complete (binaries + crates + Docker + npm + Homebrew all live); no release.yml re-dispatch needed.

Bundled changes

1. fix(ci): skip npm publish when version already exists

origin-mcp + @7xuanlu/origin published once per release. Re-dispatched runs failed with `You cannot publish over the previously published versions`. Same pattern as crates skip-check (#184). Gated behind `npm view @ version`.

2. perf(ci): skip Windows matrix when not Windows-affecting + fail-fast

Three free-tier wins on PR CI:

  • `fail-fast: true` cancels matrix on first failure (~20-30min saved when real bug breaks all platforms)
  • Drop workspace lib tests on Windows (Linux + macOS cover same logic; Windows-specific behavior caught by integration tests + schtasks E2E)
  • Skip Windows job entirely when no Windows-affecting files changed (new dorny `windows` paths-filter + dynamic JSON matrix output)

Expected PR turnaround: 31min → 14-15min (Linux floor) for most PRs. Windows-touching PRs: ~10-12min Windows runs.

Test plan

  • CI green
  • After merge: future release pipelines benefit from npm skip-check
  • Future PRs not touching Windows-affecting paths skip Windows job entirely

7xuanlu and others added 3 commits May 24, 2026 23:25
Multi-arch Docker build `platforms: linux/amd64,linux/arm64` on a
single x86_64 runner used QEMU to emulate arm64 — Rust + C++ build
inside that emulated container takes 5-10× native time. Last release
spent 90+ min on the Docker step.

Split into per-platform matrix using the free `ubuntu-24.04-arm`
runner for arm64. Same pattern as PR #182's release matrix swap.
Each platform builds + pushes a `:tag-amd64` / `:tag-arm64` image.
A docker-manifest job combines them into the canonical `:tag` and
`:latest` multi-arch references via `docker buildx imagetools
create`.

Expected: 90min → ~10min wall-clock (two ~10min native builds in
parallel + ~30s manifest combine).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
origin-mcp@0.7.0 + @7xuanlu/origin@0.7.0 are published once per
release. Re-dispatched releases (today's iteration pattern, plus
future retries on transient failures) hit:
  npm error You cannot publish over the previously published
  versions: 0.7.0

Same pattern as the crates publish skip-check. `npm view
<pkg>@<v> version` exits 0 when published and 1 otherwise. Gate
the publish behind the check so re-runs are idempotent.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Three free-tier follow-ups to PR #182's Windows tail (~31min after
that PR). All target PR turnaround, not release-time.

1. **`fail-fast: true`** on the test matrix. When a real bug fails
   Linux or macOS, cancel Windows — Windows would have hit the same
   failure in another 20-30min. Saves CI minutes + dev wait.

2. **Drop workspace lib tests on Windows.** Linux + macOS catch the
   same cross-platform unit logic. Windows-specific behavior is
   already covered by the `Integration tests origin-cli +
   origin-server` step (runs on Windows) and the schtasks install
   round-trip E2E. Saves ~25min Windows time per PR.

3. **Skip the Windows job entirely** when no Windows-affecting file
   changed. New dorny `windows` paths-filter lists the exact files
   that drive Windows behavior (service.rs, mcp.rs, cli_integration,
   distribution test, smoke-windows.ps1, install.sh, workspace Cargo,
   workflows). detect-changes builds `test-oses` as a JSON array;
   matrix consumes it via `fromJSON`. Common PRs (docs, eval, server
   internals) skip Windows entirely.

Expected: typical PR turnaround 31min → 14-15min (Linux floor). PRs
touching Windows paths still run Windows but skip workspace lib tests
there, expected ~10-12min Windows.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@7xuanlu 7xuanlu changed the title fix(ci): skip npm publish when version already exists fix+perf(ci): npm skip-existing + Windows matrix trim (CI follow-ups) May 25, 2026
@7xuanlu 7xuanlu merged commit 9857979 into main May 25, 2026
9 checks passed
7xuanlu added a commit that referenced this pull request May 25, 2026
Resolves conflict in Cargo.toml [workspace.dependencies] where P0a's
`fs2 = "0.4"` collided with main's new `[profile.release]` block from
the CI-throughput tune (PRs #173/#179/#182/#184/#185/#186 wave).

Brings in stale-test fix for `release_workflow_publishes_cli_and_mcp_npm_packages`
via PR #173's distribution.rs update (drops origin-darwin-x64 needle).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.

1 participant