From 0ef59a09988ac8f0ab79450dfa2bb0d24f417ea6 Mon Sep 17 00:00:00 2001 From: willbot Date: Mon, 24 Aug 2026 15:20:26 +0200 Subject: [PATCH 1/2] The skills notice recognises CI by ci-info's rules MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The engine already evaluates ci-info's vendor table against a caller-supplied env (detectCI in ci.ts); export it from the public surface so hosts can use the same answer. The shell's skills staleness notice previously checked only CI and GITHUB_ACTIONS, so CI systems that set neither — Jenkins (BUILD_ID), TeamCity (TEAMCITY_VERSION), Azure Pipelines (TF_BUILD) — got the notice line in their logs. It now asks detectCI, and the suppression tests cover a vendor that sets no CI variable. Signed-off-by: willbot Signed-off-by: Will Madden --- packages/cli-engine/src/exports/index.ts | 2 ++ packages/cli-engine/tests/engine.test.ts | 1 + packages/cli/src/skills-check.ts | 3 ++- packages/cli/tests/skills-check.test.ts | 4 ++++ 4 files changed, 9 insertions(+), 1 deletion(-) diff --git a/packages/cli-engine/src/exports/index.ts b/packages/cli-engine/src/exports/index.ts index 4c47e726..4e6e8375 100644 --- a/packages/cli-engine/src/exports/index.ts +++ b/packages/cli-engine/src/exports/index.ts @@ -16,6 +16,8 @@ export { type PositionalSpec, positional, } from "../args"; +/** ci-info's CI detection over the given env only — never process.env. */ +export { detectCI } from "../ci"; export { type Cli, type CliRunHooks, createCli } from "../cli"; export { type CommandFamily, diff --git a/packages/cli-engine/tests/engine.test.ts b/packages/cli-engine/tests/engine.test.ts index e731ec92..51856f28 100644 --- a/packages/cli-engine/tests/engine.test.ts +++ b/packages/cli-engine/tests/engine.test.ts @@ -34,6 +34,7 @@ describe("main export", () => { "definePrismaConfig", "defineServerCommand", "defineSessionCommand", + "detectCI", "emptyServiceTokenError", "exitWithChildStatus", "flag", diff --git a/packages/cli/src/skills-check.ts b/packages/cli/src/skills-check.ts index d137f965..2b57f497 100644 --- a/packages/cli/src/skills-check.ts +++ b/packages/cli/src/skills-check.ts @@ -8,6 +8,7 @@ * It never changes the exit code, never writes to stdout, and is not * conditioned on a TTY: agents run without one and are who this is for. */ +import { detectCI } from "@prisma/cli-engine"; import { readProjectSkillsConfig } from "./commands/skills/config"; import { agentSkillDirs, DEFAULT_AGENTS } from "./lib/skills/allowlist"; import { readSkillsCheckDisabled } from "./lib/skills/opt-out"; @@ -152,7 +153,7 @@ function isSuppressedByInvocation(runtime: SkillsCheckRuntime): boolean { if (env[SKILLS_CHECK_ENV_VAR] === "0") { return true; } - if (env.CI || env.GITHUB_ACTIONS) { + if (detectCI(env)) { return true; } diff --git a/packages/cli/tests/skills-check.test.ts b/packages/cli/tests/skills-check.test.ts index e9bc7c46..90d3917f 100644 --- a/packages/cli/tests/skills-check.test.ts +++ b/packages/cli/tests/skills-check.test.ts @@ -240,6 +240,10 @@ describe("the skills check off switches", () => { ["PRISMA_SKILLS_CHECK=0", { env: { PRISMA_SKILLS_CHECK: "0" } }], ["CI", { env: { CI: "1" } }], ["GITHUB_ACTIONS", { env: { GITHUB_ACTIONS: "true" } }], + [ + "TEAMCITY_VERSION (no CI variable)", + { env: { TEAMCITY_VERSION: "2025.1" } }, + ], ])("stays silent under %s", async (_name, overrides) => { const proc = makeProcess({ cwd: await makeStaleProject(), ...overrides }); From f1196b10c77b409a844daabf067013edf2cf9196 Mon Sep 17 00:00:00 2001 From: willbot Date: Mon, 24 Aug 2026 15:20:26 +0200 Subject: [PATCH 2/2] Engine 0.2.2: the export surface changed, so the engine version moves MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit pnpm bump-cli-engine-version patch. Engine 0.2.1 published with the c12 resolution fix before this change landed, and published versions are immutable. The families have not released against 0.2.1 yet, so the transition exceptions simply move to 0.2.2 — the family releases peer 0.2.2 and skip 0.2.1 entirely. Signed-off-by: willbot Signed-off-by: Will Madden --- packages/cli-engine/package.json | 2 +- packages/cli/package.json | 2 +- packages/cli/scripts/conformance.ts | 14 +++++++------- packages/prisma/package.json | 2 +- pnpm-lock.yaml | 4 ++-- 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/packages/cli-engine/package.json b/packages/cli-engine/package.json index dba1d647..87cdd524 100644 --- a/packages/cli-engine/package.json +++ b/packages/cli-engine/package.json @@ -1,6 +1,6 @@ { "name": "@prisma/cli-engine", - "version": "0.2.1", + "version": "0.2.2", "description": "The execution engine of the unified Prisma CLI.", "type": "module", "exports": { diff --git a/packages/cli/package.json b/packages/cli/package.json index 652825bb..3558a50a 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -49,7 +49,7 @@ }, "dependencies": { "@manypkg/tools": "^2.1.2", - "@prisma/cli-engine": "workspace:0.2.1", + "@prisma/cli-engine": "workspace:0.2.2", "@prisma/composer-cli": "0.12.0", "@prisma/compute-sdk": "0.39.0", "@prisma/credentials-store": "^7.8.0", diff --git a/packages/cli/scripts/conformance.ts b/packages/cli/scripts/conformance.ts index 362027cb..2b25e280 100644 --- a/packages/cli/scripts/conformance.ts +++ b/packages/cli/scripts/conformance.ts @@ -116,25 +116,25 @@ async function tarball(): Promise { // that is not on the registry, so the engine publishes first and // the mismatch is real until both families release against it. // The entries expire with the versions they name, and the PR - // that pins the families' 0.2.1 releases removes them; while + // that pins the families' 0.2.2 releases removes them; while // they stand, a release could ship the two-engine install they // describe, which is why they must not outlive the transition. exceptions: [ { familyPackage: "@prisma/composer-cli", familyPin: "0.2.0", - shellPin: "0.2.1", - reason: "engine 0.2.1 must publish before composer-cli can peer it", + shellPin: "0.2.2", + reason: "engine 0.2.2 must publish before composer-cli can peer it", removeWhen: - "composer-cli releases peering 0.2.1 and the follow-up bump PR pins that release", + "composer-cli releases peering 0.2.2 and the follow-up bump PR pins that release", }, { familyPackage: "@prisma/orm-toolchain", familyPin: "0.2.0", - shellPin: "0.2.1", - reason: "engine 0.2.1 must publish before orm-toolchain can peer it", + shellPin: "0.2.2", + reason: "engine 0.2.2 must publish before orm-toolchain can peer it", removeWhen: - "orm-toolchain releases peering 0.2.1 and the follow-up bump PR pins that release", + "orm-toolchain releases peering 0.2.2 and the follow-up bump PR pins that release", }, ], channel: CHANNEL, diff --git a/packages/prisma/package.json b/packages/prisma/package.json index 08aea435..44f449cf 100644 --- a/packages/prisma/package.json +++ b/packages/prisma/package.json @@ -49,7 +49,7 @@ }, "dependencies": { "@manypkg/tools": "^2.1.2", - "@prisma/cli-engine": "workspace:0.2.1", + "@prisma/cli-engine": "workspace:0.2.2", "@prisma/composer-cli": "0.12.0", "@prisma/compute-sdk": "0.39.0", "@prisma/credentials-store": "^7.8.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 52c06909..23cfb43d 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -27,7 +27,7 @@ importers: specifier: ^2.1.2 version: 2.1.2 '@prisma/cli-engine': - specifier: workspace:0.2.1 + specifier: workspace:0.2.2 version: link:../cli-engine '@prisma/composer-cli': specifier: 0.12.0 @@ -201,7 +201,7 @@ importers: specifier: ^2.1.2 version: 2.1.2 '@prisma/cli-engine': - specifier: workspace:0.2.1 + specifier: workspace:0.2.2 version: link:../cli-engine '@prisma/composer-cli': specifier: 0.12.0