0
Fork 0
mirror of https://github.com/mastra-ai/mastra.git synced 2026-11-17 08:44:46 +00:00
Commit graph

39 commits

Author SHA1 Message Date
Tyler Barnes
c10344bbae
ci: scan main with CodeQL twice a day and alert Slack, instead of scanning every PR (#29098)
Co-authored-by: remy-builder[bot] <324360501+remy-builder[bot]@users.noreply.github.com>
2026-11-10 14:35:51 -08:00
Roamin
a2a03b53fe
chore: update slack channel ID in action.yaml (#29717)
## Description

send Slack alerts to #eng-maintainer-alerts by default
2026-11-08 23:20:43 -05:00
starslingdev[bot]
541819e6fa
ci: install pnpm dependencies from StarSling Disks (#29130) 2026-11-01 08:24:34 -08:00
shreyas-mastra
323c14179f
chore(security): bump Node.js to 22.23.4 / 24.22.1 (CVE-2026-111497) (#28170)
Node.js Oct 2026 security release (v22.23.4 / v24.22.1): fixes Brotli
OOB write RCE CVE-2026-111497, TLS hostname-verification bypasses, dns
NUL truncation, eMudhra CA distrust, undici/OpenSSL/c-ares updates.

Bumps the Node pins in this repo: 24.22.1 for CI and the default E2B
template, 24.22.1 and 22.23.4 for the starter templates and the
otel-bridge example. `node:22-*` image tags stay floating, so they
resolve to the patched release on their own, and engine ranges are
unchanged.

⚠️ 24h soak rule: nodejs.org dist published 2026-10-21 10:33 UTC. Docker
`node:22.23.4-slim`/`-bookworm-slim` published 2026-10-21 17:38 UTC (24h
at 1:38 PM EDT Oct 22); `node:22.23.4-alpine` published 2026-10-22 02:39
UTC (24h at 10:39 PM EDT Oct 22). Do not merge before then.

After merge, images must be rebuilt and redeployed for the fix to take
effect.


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

<!-- coderabbit-ai-generated:v1 -->

## ELI5
This PR updates Node.js versions used by CI, templates, and E2B sandbox
defaults. It brings them to the versions identified in the PR
description as security updates.

## Changes
- Updates Node.js 24 pins in GitHub Actions workflows and the setup
action from `24.22.0` to `24.22.1`.
- Updates the default Node.js version for E2B templates to `24.22.1`.
- Updates Node.js pins in two templates and an observability example to
`22.23.4` or `24.22.1`.
- Adds a test for the E2B default template’s version-based identity and
a patch changeset for `@mastra/e2b`.

The supplied change summary does not confirm updates to floating
`node:22-*` tags. It does not provide test results or current review
findings.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Justin Levine <20596508+jal-co@users.noreply.github.com>
2026-10-22 21:39:34 -04:00
Dane - AI (Mastra)
0ed521db82
chore(deps): update github actions (#26814) 2026-10-21 09:26:51 +02:00
Ward Peeters
8ea568a973
ci: run the full test suite before alpha publishes (#27344)
Co-authored-by: mastracode <284800079+mastra-platform[bot]@users.noreply.github.com>
Co-authored-by: Abhi Aiyer <abhiaiyer91@gmail.com>
2026-10-17 17:21:06 -07:00
Dane - AI (Mastra)
3b8b21657b
chore(deps): update github actions (major) (#19115) 2026-07-10 15:27:45 +02:00
Dane - AI (Mastra)
246242b68b
chore(deps): update github actions (#19081) 2026-07-10 11:47:27 +02:00
Dane - AI (Mastra)
4b4b4d6ef0
chore(deps): update github actions (#19037) 2026-07-07 13:55:48 +02:00
Abhi Aiyer
6c3f0e2805
ci: refetch modified packages when corrupt store content survives index reset (#18444)
## Summary

Follow-up to #18443. The index-only store recovery merged there fixes a
corrupt store **index**, but a corrupt restored cache can also contain
**content** files captured mid-write. In that case `pnpm store status`
(and the subsequent frozen install) fails with
`ERR_PNPM_MODIFIED_DEPENDENCY` even after the index is rebuilt.

Observed on a run for #18436: after the index deletion, the recovery
step's own `pnpm store status` reported:

```
[ERR_PNPM_MODIFIED_DEPENDENCY] Packages in the store have been mutated
...
You can run pnpm install --force to refetch the modified packages
```

## Fix

Make the recovery handle both corruption shapes:

1. Broaden the corruption check to also match
`ERR_PNPM_MODIFIED_DEPENDENCY` (mutated content), in addition to the
SQLite index errors.
2. After deleting the index, re-check the store. If only the index was
bad, this passes and the install runs normally. If content is also
mutated, set a step output so the install step runs `pnpm install
--frozen-lockfile --force` — which refetches the modified packages
(pnpm's documented remedy) while keeping the lockfile frozen.

The index-only case still recovers without a reinstall and without
forcing.

## Why not just `--force` always

`--force` re-downloads packages, so it's only used on the recovery path
when content is actually mutated. Healthy and index-only runs keep the
fast frozen install.

## Test plan

- [ ] On a run with a corrupt store **index** only, recovery deletes the
index, `pnpm store status` passes, and the plain frozen install
succeeds.
- [ ] On a run with mutated store **content**, recovery sets the force
flag and `pnpm install --frozen-lockfile --force` succeeds.
- [ ] On a clean run, recovery is a no-op and the plain frozen install
runs.

Verified locally on pnpm 11.5.1: `pnpm install --frozen-lockfile
--force` is accepted and succeeds; the index-only path recovers and runs
the plain frozen install without setting the force flag.

## Note

The persistently corrupt `pnpm-cache-*` entries (including the ~1 GB
`b044e336…` blob on `main` that was restored on every run, plus several
partial ~19 MB stores) have been deleted, so CI rebuilds clean stores
now. This change ensures future mid-write store corruption is recovered
automatically instead of blocking CI.


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## ELI5
This change helps CI recover when a saved pnpm cache is broken in two
different ways: sometimes the index is bad, and sometimes the package
files themselves are damaged. If only the index was broken, CI keeps
installing normally; if damaged package files are still found, CI
retries the install in a way that re-downloads the bad packages.

## Summary
- Added a named reset step in the pnpm setup action to handle corrupt
store cache recovery more cleanly.
- Extended corruption detection to include
`ERR_PNPM_MODIFIED_DEPENDENCY` alongside SQLite index-related failures.
- After clearing the store index, the workflow rechecks `pnpm store
status`:
- if it passes, installation continues normally with `--frozen-lockfile`
- if mutated content is still detected, the action sets
`force-install=true`
- Updated the install step to conditionally add `--force` only on the
recovery path, so healthy runs still preserve frozen-lockfile behavior.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

Co-authored-by: Mastra Code (anthropic/claude-opus-4-8) <noreply@mastra.ai>
2026-06-24 20:37:32 +02:00
Abhi Aiyer
fe72842d60
ci: recover corrupt pnpm store by deleting only the index, not the whole store (#18443)
## Summary

Follow-up to #18438 → #18441. The corrupt-pnpm-store recovery still
breaks CI, now with a different error. This replaces the "wipe the store
and reinstall pnpm" strategy with a surgical fix: delete only the
corrupt store index and keep the content.

## The failure chain so far

1. #18438 added recovery: on `database disk image is malformed`, `rm -rf
"$store_path"`.
2. That deleted pnpm's own binary (hard-linked into the store) →
`MODULE_NOT_FOUND` for `pnpm.mjs`.
3. #18439/#18441 reinstalled pnpm after the wipe (npm) and put it on
PATH.
4. New failure (run on #18436): `pnpm install --frozen-lockfile` now
fails with

```
[ERR_PNPM_MODIFIED_DEPENDENCY] Packages in the store have been mutated
...
You can run pnpm install --force to refetch the modified packages
```

Wiping the store and reinstalling/relinking leaves the remaining store
content mismatched against the lockfile integrity. `--force` is not a
fix — by design it does not bypass pnpm's integrity check.

## Root cause

Only the **store index** (a SQLite database) is corrupt. The
content-addressed package files under `files/` are intact, and pnpm's
binary is hard-linked into the store. Destroying the whole store throws
away good content and the binary; rebuilding it from a partial state
mismatches the lockfile.

## Fix

On detected corruption, delete **only the index**, preserving `files/`:

- `index.db`, `index.db-shm`, `index.db-wal` (pnpm ≥ 11)
- `index-v*.json*` and `index/` (older layouts)

pnpm rebuilds the index from the content files on the next operation,
so:

- the pnpm binary survives (no `MODULE_NOT_FOUND`),
- store content still matches the lockfile (no
`ERR_PNPM_MODIFIED_DEPENDENCY`),
- no reinstall is needed (no corepack keyid / npm relink issues).

Also broadens corruption detection to the SQLite error family
(`ERR_SQLITE_ERROR` / `database disk image is malformed` / `file is not
a database`) instead of one literal message, since the corruption
surfaces differently depending on how the index was truncated.

## Test plan

- [ ] On a run that restores a corrupt store, recovery deletes the
index, `pnpm store status` reports the store is fine, and `pnpm install
--frozen-lockfile` succeeds.
- [ ] On a clean run, recovery is a no-op.

Verified locally with pnpm 11.5.1 across three cases: (A) garbage index
(`file is not a database`), (B) zeroed/truncated index (malformed-image
family), (C) healthy store. A and B are detected, the index-only
deletion clears corruption, `pnpm store status` returns "Packages in the
store are untouched", and a frozen install succeeds with no
`MODULE_NOT_FOUND` and no `ERR_PNPM_MODIFIED_DEPENDENCY`. C early-exits
without touching the store.

## Note

This supersedes the recovery logic merged in #18441 (npm reinstall) and
#18440 (corepack). No changeset — consistent with the earlier CI-only
recovery PRs (#18438–#18441).


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## ELI5
This change fixes the way CI recovers when pnpm’s cache gets corrupted.
Instead of throwing away the whole cache and starting over, it now only
removes the broken “table of contents” part so pnpm can rebuild it from
the good files already there.

## Summary
- Broadened pnpm store corruption detection to catch SQLite-style
failures, including `ERR_SQLITE_ERROR`, `database disk image is
malformed`, and `file is not a database`.
- Changed recovery to delete only corrupt store index artifacts
(`index.db*`, `index-v*.json*`, and `index/`) rather than wiping the
entire pnpm store.
- Preserved the content-addressed store data and pnpm binary, avoiding
follow-up failures caused by reinstalling pnpm from a damaged store.
- Added validation after recovery to ensure `pnpm --version` and `pnpm
store status` succeed before proceeding.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

Co-authored-by: Mastra Code (anthropic/claude-opus-4-8) <noreply@mastra.ai>
2026-06-24 20:21:24 +02:00
Abhi Aiyer
c420eb4302
ci: reinstall recovery pnpm with npm instead of corepack (#18441)
## Summary

Follow-up to #18440. The corepack-based corrupt-store recovery added
there fails on the runners' bundled Node 22.13.0, so the recovery still
can't reprovision pnpm.

## What's broken

`corepack prepare pnpm@<ver>` on Node 22.13.0 rejects the pnpm package
signature:

```
Preparing pnpm@11.5.1 for immediate activation...
Internal Error: Cannot find matching keyid: {"signatures":[...],"keys":[...]}
    at verifySignature (.../corepack.cjs)
    at installVersion (.../corepack.cjs)
```

This is a known corepack/Node version mismatch (the bundled corepack
ships outdated npm registry signing keys), so corepack cannot fetch pnpm
to rebuild it after the store wipe.

## Fix

Reinstall pnpm with `npm install -g --prefix` into a dedicated directory
instead of corepack. npm performs no signature verification and places a
working pnpm at `<prefix>/bin/pnpm`. As before, the bin directory is
prepended to PATH via `$GITHUB_PATH` so subsequent steps use the working
pnpm rather than the `pnpm/action-setup` shim that points at the deleted
store-linked binary.

The recovery now:

1. Removes the corrupt store.
2. If pnpm is broken, resolves the pinned version from `packageManager`.
3. `npm install -g --prefix "$RUNNER_TEMP/pnpm-recovery" pnpm@<ver>`.
4. Prepends `<prefix>/bin` to PATH via `$GITHUB_PATH`.
5. Verifies `pnpm --version` runs from the new install before
continuing.

## Test plan

- [ ] On a run that restores a corrupt store, the recovery wipes it,
reinstalls pnpm via npm, and `pnpm install --frozen-lockfile` succeeds
instead of failing.
- [ ] On a clean run (no corruption), the recovery is a no-op and pnpm
continues to work as before.

Verified locally: resolving the version from `package.json`, `npm
install -g --prefix`, and running `pnpm --version` from the recovery bin
all succeed and report the pinned `11.5.1` even with the original pnpm
removed from PATH. (Confirmed corepack reproduces the `Cannot find
matching keyid` failure that motivated dropping it.)

Co-authored-by: Mastra Code (anthropic/claude-opus-4-8) <noreply@mastra.ai>
2026-06-24 20:04:22 +02:00
Abhi Aiyer
095c206689
ci: reprovision pnpm via corepack after wiping a corrupt store (#18440)
## Summary

Follow-up to #18439. The corrupt-store recovery still failed `pnpm
install` with `MODULE_NOT_FOUND`, because the previous reinstall placed
pnpm in the wrong location.

## What was still broken

After `rm -rf "$store_path"`, #18439 reinstalled pnpm with `npm install
--prefix <action-setup root>`. But the pnpm binary that subsequent steps
invoke is the `pnpm/action-setup` shim on PATH, which points at:

```
$PNPM_HOME/global/v11/<hash>/node_modules/pnpm/bin/pnpm.mjs
```

That file's content is hard-linked into the store that was just wiped,
so it is gone. The `npm install` copy landed at a different path
(`<root>/node_modules/pnpm`), so `pnpm --version` inside the recovery
step passed, but the **next** step still ran the action-setup shim and
hit:

```
Error: Cannot find module '.../global/v11/<hash>/node_modules/pnpm/bin/pnpm.mjs'
code: 'MODULE_NOT_FOUND'
```

(Observed on PR #18436's `Build` job.)

## Fix

Reprovision pnpm with **corepack** instead of `npm install`. corepack
keeps its shims and the pnpm package in its own cache, outside the pnpm
store, so it is unaffected by the wipe. The recovery now:

1. Removes the corrupt store.
2. If pnpm is broken, resolves the pinned version from `packageManager`,
runs `corepack prepare pnpm@<ver> --activate`, and materializes a shim
in a dedicated directory via `corepack enable pnpm --install-directory`.
3. Prepends that directory to `PATH` via `$GITHUB_PATH` (later entries
take precedence) so subsequent steps stop using the broken action-setup
shim.
4. Verifies `pnpm --version` runs from the new shim before continuing.

## Test plan

- [ ] On a run that restores a corrupt store, the recovery wipes it,
reprovisions pnpm via corepack, and `pnpm install --frozen-lockfile`
succeeds instead of failing with `MODULE_NOT_FOUND`.
- [ ] On a clean run (no corruption), the recovery is a no-op and pnpm
continues to work as before.

Verified the corepack command sequence locally: `corepack prepare` +
`corepack enable --install-directory` produce a working pnpm shim that
resolves the pinned version even with the original pnpm removed from
PATH.

Co-authored-by: Mastra Code (anthropic/claude-opus-4-8) <noreply@mastra.ai>
2026-06-24 19:58:02 +02:00
Abhi Aiyer
9c34797fd3
ci: reinstall pnpm after wiping a corrupt store cache (#18439)
Co-authored-by: Mastra Code (anthropic/claude-opus-4-8) <noreply@mastra.ai>
2026-06-24 19:51:06 +02:00
Daniel Lew
7c581acbab
ci: recover from corrupt restored pnpm store cache (#18438)
Co-authored-by: Mastra Code (anthropic/claude-opus-4-8) <noreply@mastra.ai>
2026-06-24 19:28:33 +02:00
Ward Peeters
d0faf4e5af
ci: pin workflow actions and use app auth (#18114)
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
2026-06-18 13:32:02 +02:00
Ward Peeters
48a1aae277
fix(ci): auto-run pending release workflow (#17715)
Co-authored-by: Mastra Code (openai/gpt-5.5) <noreply@mastra.ai>
2026-06-09 15:15:50 +02:00
Tyler Barnes
fb88481957
chore: migrate workspace to pnpm v11 (#17038)
Migrates the workspace to pnpm 11.3.0 and moves pnpm config out of
package.json into pnpm-workspace.yaml, which is where pnpm v11 reads
these settings.

It also enables the global virtual store for faster git worktree
installs:

```yaml
# Share pnpm's virtual store across git worktrees: https://pnpm.io/git-worktrees
enableGlobalVirtualStore: true
```

I also moved the standalone e2e fixture pnpm settings into local
pnpm-workspace.yaml files so their overrides and build approvals still
apply under pnpm v11.

Verified with pnpm 11.3.0 install --frozen-lockfile and git diff
--check.


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## ELI5

This PR upgrades the repository to pnpm v11 (11.3.0), moves workspace
pnpm settings out of package.json into pnpm-workspace.yaml so pnpm v11
reads them, and enables a shared global virtual store to speed up
installs (useful for git worktrees). It also updates tests, fixtures,
and CI to use pnpm-specific env vars and workspace-aware installs.

## Changes Overview

### Core changes
- Bumped required pnpm in root package.json: engines.pnpm → >=11.0.0 and
updated packageManager to pnpm@11.3.0 (with new integrity).
- Added/expanded top-level pnpm-workspace.yaml:
- enableGlobalVirtualStore: true to share pnpm’s virtual store across
git worktrees.
- Reworked patchedDependencies to versioned patch entries (e.g.,
`@changesets/get-dependents-graph`@2.1.3/2.1.4, tsup@8.5.1).
  - Added packageExtensions (e.g., `@uiw/codemirror-theme-dracula`@*).
- Extended trustPolicyExclude and expanded overrides to constrain many
deps (ssri, qs, zod variants, etc.).
- Broadened allowBuilds to explicitly disable builds for many packages.

### E2E & fixture workspace changes
- Removed pnpm/resolutions and top-level pnpm blocks from many
package.json files and introduced local pnpm-workspace.yaml files in
fixture/e2e directories (commonjs, create-mastra, deployers, monorepo,
no-bundling, type-check, memory, agent-builder, mcp, playground
kitchen-sink, pkg-outputs, etc.).
- Those local pnpm-workspace.yaml files reintroduce necessary overrides
(e.g., ssri >=6.0.2, qs ^6.15.1) and allowBuilds settings so
fixture-specific build allowances and overrides continue to apply under
pnpm v11.

### Tests & tooling updates
- Updated many e2e tests and setup scripts to export pnpm-specific env
vars (pnpm_config_registry, pnpm_config_minimum_release_age, etc.)
instead of npm_config_* so pnpm receives registry/minimum-release-age
configs.
- Extended pnpm-specific env var allowlist (packages/_types-builder)
with additional pnpm_config_* keys.
- Small TypeScript typings and build tweaks (tsup externals, various
Droppable typing updates).
- Patch update: changesets-get-dependents-graph patch updated to
construct Range with includePrerelease: true.

### CI & GitHub Actions
- Composite action explicitly sets up Node 22 via actions/setup-node@v6
and continues to install pnpm via pnpm/action-setup@v4.
- Turbo action now runs turborepo via pnpm dlx (pnpm dlx turbo ...) and
disables telemetry.
- Multiple CI steps and workflows changed pnpm install
--ignore-workspace → pnpm install to be workspace-aware where
appropriate.

### Commit / migration notes
- Added commit(s) to preserve nested pnpm workspace configs for
fixtures, add missing packageExtensions, and make other adjustments
required by pnpm v11 (including explicit allowBuilds in nested
workspaces so frozen installs pass).
- Author verified migration with pnpm 11.3.0 using install
--frozen-lockfile and git diff --check, but noted further
testing/investigation will follow (primary motivation: enable
worktree/global virtual store behavior).

## Impact & reviewer notes
- Requires pnpm >=11.0.0 locally and in CI (declared 11.3.0). Update
local tooling if needed.
- Workspace overrides, patched deps, and build allowances were relocated
to pnpm-workspace.yaml — reviewers should confirm fixture behavior,
package linking, and build approvals still match expectations.
- enableGlobalVirtualStore changes dependency layout/hoisting for
worktree installs; test git worktree installs and CI runs.
- Verify e2e fixtures, CI jobs, and any environment-specific
registry/settings propagate correctly via pnpm_config_* env vars.

<!-- review_stack_entry_start -->

[![Review Change
Stack](https://storage.googleapis.com/coderabbit_public_assets/review-stack-in-coderabbit-ui.svg)](https://app.coderabbit.ai/change-stack/mastra-ai/mastra/pull/17038?utm_source=github_walkthrough&utm_medium=github&utm_campaign=change_stack)

<!-- review_stack_entry_end -->
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Mastra Code (openai/gpt-5.5) <noreply@mastra.ai>
2026-05-28 09:45:07 -07:00
Ward Peeters
27c38e201d
fix(ci): resolve GitHub Actions annotations (#17086)
Co-authored-by: Mastra Code (openai/gpt-5.5) <noreply@mastra.ai>
2026-05-26 20:44:43 +02:00
Roamin
1371703835
fix(core): fully isolate async_hooks from shared chunks (#15074)
## Follow-up to #15072

The previous fix moved `getCurrentSpan` behind a lazy resolver in
`utils.ts`, but `executeWithContext` and `executeWithContextSync` were
still imported directly from `context-storage.ts` by 9 files. This
caused `AsyncLocalStorage` to leak into shared chunks (e.g.
`chunk-2DKOLMVJ.js`) that get pulled into every entry point.

### Changes

#### async_hooks isolation
- Added lazy resolvers for `executeWithContext` and
`executeWithContextSync` in `utils.ts` (same pattern as
`resolveCurrentSpan`)
- Registered the real implementations in `context-storage.ts` on import
- Updated all 9 consumer files to import from `utils.ts` instead of
`context-storage.ts`

#### CI cache fix
- Moved pnpm store caching from `actions/setup-node` (`cache: 'pnpm'`)
to `pnpm/action-setup` (`cache: true`) in the `setup-pnpm-node`
composite action
- `actions/setup-node@v6` runs `pnpm store path --silent` internally,
which returns a bogus path on self-hosted Starsling runners where pnpm
is installed into `~/setup-pnpm/node_modules/.bin/`
- `pnpm/action-setup` knows its own store location and caches it
correctly
- Also removes the shell `run:` step that CodeQL flagged as untrusted
code execution in a privileged context

### After this fix

`async_hooks` only appears in:
- `dist/observability/context-storage.js` / `.cjs` — the dedicated entry
point
- `dist/test-utils/llm-mock.js` / `.cjs` — test utilities

No shared chunks reference `async_hooks` anymore.

### Verification

- `tsc --noEmit` passes
- `dual-logger.test.ts` (22 tests) passes
- `model.test.ts` (43 tests) passes
- Built dist verified with grep: no `async_hooks` in shared chunks

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **Bug Fixes**
* Patch release: Node-only dependency (async_hooks) is fully isolated
from browser bundles when importing the core package, reducing bundle
size and preventing related runtime issues for browser consumers.
  * No public API or runtime behavior changes for existing integrations.

* **Refactor**
* Observability wiring made more modular and injectable to centralize
context-execution behavior without changing public interfaces.

* **Chores**
* CI: stabilized pnpm setup and caching configuration for more
consistent installs.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Mastra Code (anthropic/claude-opus-4-6) <noreply@mastra.ai>
2026-04-05 12:39:04 -04:00
Roamin
fff91cf914
fix(core): stop leaking async_hooks through logger bundles + fix CI cache regression (#15072)
## Changes

### 1. Fix async_hooks leak in browser bundles

Fixes the `@mastra/core` bundling path that was still pulling in
`async_hooks` through the logger and observability integration.

**Before:**
```ts
import { getCurrentSpan } from '@mastra/core/observability/context-storage'
// pulled in the Node-only context storage path
```

**After:**
```ts
import { resolveCurrentSpan } from '@mastra/core/observability/utils'
// keeps the logger path browser-safe
```

Also fixes the llm mock utility so the related core tests keep building
cleanly.

### 2. Fix CI: pin pnpm/action-setup to v4.2.0

`pnpm/action-setup` v4.3.0 (which the floating `@v4` tag now points to)
has a [known
regression](https://github.com/pnpm/action-setup/issues/207) where `pnpm
store path --silent` returns the shim directory
(`/home/ubuntu/setup-pnpm/node_modules/.bin/store/v10`) instead of the
real pnpm store. This causes `actions/setup-node` to fail with:

```
##[error]Some specified paths were not resolved, unable to cache dependencies.
```

This was breaking all Combined store Tests jobs (cloudflare-d1, libsql,
pinecone, couchbase) — including on `main`.

**Fix:** Pin `pnpm/action-setup` from `@v4` → `@v4.2.0` in
`.github/actions/setup-pnpm-node/action.yaml`.


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **Bug Fixes**
* Fixed browser bundling issue where importing @mastra/core could pull
Node-only dependencies into browser-targeted bundles.

* **Chores**
  * Updated CI/CD workflow to use a pinned version of the pnpm action.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Mastra Code (anthropic/claude-opus-4-6) <noreply@mastra.ai>
2026-04-05 07:40:04 -07:00
Ward Peeters
0256b9b00a
ci: optimize turbo cache inputs, config, and workflow concurrency (#14432)
Co-authored-by: Mastra Code (anthropic/claude-opus-4-6) <noreply@mastra.ai>
2026-03-18 09:32:30 +01:00
Dane - AI (Mastra)
c5f5a1c12d
chore(deps): update actions/create-github-app-token action to v3 (#14369) 2026-03-17 10:03:01 +01:00
Ward Peeters
b12ed3b1c9
fix: dane PR commands - pnpm setup, alias support, and merge-main command (#14105)
Co-authored-by: Mastra Code (anthropic/claude-opus-4-6) <noreply@mastra.ai>
2026-03-10 20:25:38 +01:00
Caleb Barnes
6e9ea329c5
chore(ci): use --frozen-lockfile in CI installs (#12918)
## Summary

- Adds `--frozen-lockfile` to the shared `setup-pnpm-node` GitHub Action
so CI test/build workflows always install exactly what's in the
committed lockfile
- Without this flag, `pnpm install` is free to re-resolve transitive
dependencies on each run, meaning two runs of the same commit can
produce different `node_modules` layouts if any transitive dep published
a new patch between runs
- This is a one-line change in
`.github/actions/setup-pnpm-node/action.yaml`

## Workflows using the shared action (affected by this change)

- `vitest-changed.yml` (7 jobs)
- `lint.yml` (4 jobs)
- `secrets.test-core.yml`
- `secrets.test-memory.yml`
- `secrets.test-mcp.yml`
- `secrets.test-agent-builder.yml`
- `secrets.test-rag.yml`
- `secrets.test-combined-stores.yml`
- `secrets.test-observability.yml`
- `secrets.test-workspaces.yml`
- `secrets.tool-builder-test.yml`
- `test-auth.yml`
- `test-cli.yml`
- `test-server.yml`
- `test-server-adapters.yml`
- `test-client-ai-sdk.yml`
- `test-client-js.yml`
- `test-client-react.yml`
- `test-deployer.yml`
- `test-editor.yml`
- `test-evals.yml`
- `test-docs-mcp.yml`
- `test-schema-compat.yml`
- `test-workspaces.yml`
- `bird-checker-eval.yml`
- `prebuild.yml`
- `validate-docs-frontmatter.yml`
- `check-redirects.yml`
- `regenerate-provider-registry.yml`
- `sync-templates.yml`
- `sync_renovate-changesets.yml`
- `version-packages.yml`
- `backport-auto.yml`

## Workflows NOT using the shared action (not affected)

These have their own `pnpm install` calls and are intentionally left
as-is because they run installs after version bumps or publish steps
where the lockfile is expected to be out of date:

- `npm-publish.yml` — 6 bare `pnpm install` calls (pre/post publish
steps)
- `create-release.yml` — 4 bare `pnpm install` calls (release flow)
- `secrets.e2e.yml` — 8 bare `pnpm install` calls (local Verdaccio
publish)

Additionally, several workflows have `pnpm install --ignore-workspace`
calls for integration test subdirectories that use their own lockfiles —
these are unrelated to the monorepo lockfile.

## Why this matters

- Ensures CI test/build runs are deterministic and reproducible
- If someone changes `package.json` but forgets to run `pnpm install`
locally, CI will fail fast instead of silently resolving a different
lockfile
- Eliminates a class of flaky test failures caused by non-deterministic
dependency resolution (see #12916 for context on
`@ai-sdk/provider-utils` version sprawl)

## Test plan

- [ ] CI workflows pass with `--frozen-lockfile` (confirms the committed
lockfile is up to date)
- [ ] If a future PR modifies `package.json` without updating the
lockfile, CI should fail with a clear error

Co-authored-by: CalebBarnes <CalebBarnes@users.noreply.github.com>
2026-02-10 16:26:45 -08:00
Ward Peeters
c0edbb1ef1
perf(ci): skip pnpm install in check-changes jobs (#12246) 2026-01-23 16:42:44 +01:00
Ward Peeters
b24e32ae20
feat(ci): extend turbo-changed action to auto-discover dependencies (#12194) 2026-01-22 15:46:37 +01:00
Ward Peeters
aab9e7243a
feat(ci): add reusable turbo-changed action for task-level change detection (#12160) 2026-01-22 13:21:12 +01:00
wardpeet
eda43f4eaa
chore: upgrade nodejs action 2025-11-14 00:53:18 +01:00
wardpeet
51d92383ce
fix input in node setup 2025-11-13 10:16:02 +01:00
wardpeet
8189ce42d4
fix lint 2025-11-07 15:48:40 +01:00
wardpeet
2301cdbc7c
add automation label to renovate 2025-11-07 14:42:29 +01:00
Lennart
2ed889eecb
chore(ci): Update CI (#9755) 2025-11-05 15:05:15 -08:00
wardpeet
4b56c425d0
update app-dane action 2025-10-24 13:14:45 +02:00
wardpeet
c163b5baf3 fix 2025-10-24 01:14:47 +02:00
wardpeet
87f7e901e9 add shell 2025-10-24 01:14:47 +02:00
wardpeet
febaccf25b - Added git configuration steps in the app-auth action to set user details for commits.
- Enhanced the app-auth action to streamline GitHub App authentication and token management.
2025-10-24 01:14:47 +02:00
wardpeet
4f0499278d update files 2025-10-24 01:14:47 +02:00
wardpeet
ed424a4916 chore: cleanup actions
- Added a composite action for GitHub App authentication, allowing the creation of installation tokens and user ID retrieval.
- Added a composite action for setting up pnpm and Node.js, streamlining the installation process in workflows.
- Updated multiple workflows to utilize the new actions, enhancing maintainability and reducing redundancy.
2025-10-24 01:14:47 +02:00