Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2692,6 +2692,26 @@ jobs:
- name: Cross-package test inputs
run: pnpm check:cross-package-test-inputs

# Console-intercept disarm (#10374). vitest's worker forwards every
# console.* write to the main thread over RPC and DISCARDS the promise;
# a write that lands after teardown's `rpcDone()` snapshot is rejected
# into an unhandled error, failing a fully green suite (signature:
# `EnvironmentTeardownError: [vitest-worker]: Closing rpc while
# "onUserConsoleLog" was pending` — the file it names is where the
# worker WAS, not where the bug is). The window is load-width, so it
# presents as a merge-queue flake nobody can reproduce. The one general
# defence is `disableConsoleIntercept: true` in every package-root
# vitest config — it removes the mechanism (no RPC, nothing to reject)
# — and the population it must cover MOVES: five new vitest configs
# arrived in the nine days before this gate, every one with the
# intercept armed. This asserts every vitest-running package carries
# the disarm; the mechanism docblock lives in
# examples/app-showcase/vitest.config.ts and the teardown-race pin in
# that app proves the defect is still live in the installed vitest.
# Self-test first, then the real scan; reads ~72 manifests; sub-second.
- name: Console-intercept disarm
run: node scripts/check-console-intercept-disarm.mjs --self-test && node scripts/check-console-intercept-disarm.mjs

# Live-server database isolation (#10382). CI provisions ONE Postgres and
# ONE MySQL for the whole temporal-conformance job and points every live
# leg at them, and every live suite in the repo issues a `drop` when it
Expand Down
9 changes: 9 additions & 0 deletions examples/app-crm/vitest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,15 @@ import { defineConfig } from 'vitest/config';
import path from 'node:path';

export default defineConfig({
test: {
// A late console.* must not redden a green suite (#10374): vitest's worker
// forwards console output over RPC and discards the promise, and a write
// landing after teardown's rpcDone() snapshot is rejected into an unhandled
// error — a fully green run that exits 1. Disarming removes the mechanism.
// Mechanism + measured costs: examples/app-showcase/vitest.config.ts.
// Enforced repo-wide by scripts/check-console-intercept-disarm.mjs.
disableConsoleIntercept: true,
},
resolve: {
// `action-predicate-sparse-face.test.ts` (#8990) drives this app's row
// action predicate through the CEL engine itself, because the whole point
Expand Down
19 changes: 19 additions & 0 deletions examples/app-todo/vitest.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
// Copyright (c) 2026 ObjectStack. Licensed under the Apache-2.0 license.

// This config exists for exactly one setting; everything else stays on
// vitest's defaults, deliberately — a key added here re-specifies behaviour
// for every test file in the package (packages/cli/vitest.config.ts's header
// records the incident that taught that).
import { defineConfig } from 'vitest/config';

export default defineConfig({
test: {
// A late console.* must not redden a green suite (#10374): vitest's worker
// forwards console output over RPC and discards the promise, and a write
// landing after teardown's rpcDone() snapshot is rejected into an unhandled
// error — a fully green run that exits 1. Disarming removes the mechanism.
// Mechanism + measured costs: examples/app-showcase/vitest.config.ts.
// Enforced repo-wide by scripts/check-console-intercept-disarm.mjs.
disableConsoleIntercept: true,
},
});
19 changes: 19 additions & 0 deletions examples/embed-objectql/vitest.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
// Copyright (c) 2026 ObjectStack. Licensed under the Apache-2.0 license.

// This config exists for exactly one setting; everything else stays on
// vitest's defaults, deliberately — a key added here re-specifies behaviour
// for every test file in the package (packages/cli/vitest.config.ts's header
// records the incident that taught that).
import { defineConfig } from 'vitest/config';

export default defineConfig({
test: {
// A late console.* must not redden a green suite (#10374): vitest's worker
// forwards console output over RPC and discards the promise, and a write
// landing after teardown's rpcDone() snapshot is rejected into an unhandled
// error — a fully green run that exits 1. Disarming removes the mechanism.
// Mechanism + measured costs: examples/app-showcase/vitest.config.ts.
// Enforced repo-wide by scripts/check-console-intercept-disarm.mjs.
disableConsoleIntercept: true,
},
});
7 changes: 7 additions & 0 deletions packages/adapters/hono/vitest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@ import path from 'node:path';

export default defineConfig({
test: {
// A late console.* must not redden a green suite (#10374): vitest's worker
// forwards console output over RPC and discards the promise, and a write
// landing after teardown's rpcDone() snapshot is rejected into an unhandled
// error — a fully green run that exits 1. Disarming removes the mechanism.
// Mechanism + measured costs: examples/app-showcase/vitest.config.ts.
// Enforced repo-wide by scripts/check-console-intercept-disarm.mjs.
disableConsoleIntercept: true,
globals: true,
environment: 'node',
},
Expand Down
16 changes: 12 additions & 4 deletions packages/cli/vitest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@
// This package had NO vitest config until #9832, and that is the fact this
// header exists to keep visible: adding one changes how every test file in
// `packages/cli` is configured, not just the file that needed it. So the
// config is deliberately minimal — anchored `resolve.alias` entries and no
// `test` block at all, because the test files here run on vitest's defaults
// (`globals: false`, `environment: 'node'`) and a `test` block would silently
// re-specify them. Sibling configs in this repo do carry
// config is deliberately minimal — anchored `resolve.alias` entries and a
// `test` block that only carries keys with a recorded warrant (`server.deps`,
// and the #10374 console-intercept disarm), because the test files here run on
// vitest's defaults (`globals: false`, `environment: 'node'`) and re-specifying
// THOSE keys would silently flip them. Sibling configs in this repo do carry
// `test: { globals: true, … }`; copying that shape here would have flipped
// `globals` for every existing file in the package.
//
Expand Down Expand Up @@ -378,6 +379,13 @@ export default defineConfig({
],
},
test: {
// A late console.* must not redden a green suite (#10374): vitest's worker
// forwards console output over RPC and discards the promise, and a write
// landing after teardown's rpcDone() snapshot is rejected into an unhandled
// error — a fully green run that exits 1. Disarming removes the mechanism.
// Mechanism + measured costs: examples/app-showcase/vitest.config.ts.
// Enforced repo-wide by scripts/check-console-intercept-disarm.mjs.
disableConsoleIntercept: true,
server: {
deps: {
external: [/packages[\/]types[\/]dist/],
Expand Down
7 changes: 7 additions & 0 deletions packages/client-react/vitest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@ import { defineConfig } from 'vitest/config';

export default defineConfig({
test: {
// A late console.* must not redden a green suite (#10374): vitest's worker
// forwards console output over RPC and discards the promise, and a write
// landing after teardown's rpcDone() snapshot is rejected into an unhandled
// error — a fully green run that exits 1. Disarming removes the mechanism.
// Mechanism + measured costs: examples/app-showcase/vitest.config.ts.
// Enforced repo-wide by scripts/check-console-intercept-disarm.mjs.
disableConsoleIntercept: true,
// The only DOM environment in the workspace, and deliberately so (#4682):
// these hooks are exercised through React's real renderer, so `document`
// and friends must exist. Every other package here runs `environment:
Expand Down
7 changes: 7 additions & 0 deletions packages/client/vitest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,13 @@ import path from 'path';

export default defineConfig({
test: {
// A late console.* must not redden a green suite (#10374): vitest's worker
// forwards console output over RPC and discards the promise, and a write
// landing after teardown's rpcDone() snapshot is rejected into an unhandled
// error — a fully green run that exits 1. Disarming removes the mechanism.
// Mechanism + measured costs: examples/app-showcase/vitest.config.ts.
// Enforced repo-wide by scripts/check-console-intercept-disarm.mjs.
disableConsoleIntercept: true,
// Exclude integration tests that require a running server
exclude: [
'**/node_modules/**',
Expand Down
9 changes: 9 additions & 0 deletions packages/cloud-connection/vitest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,15 @@ import { defineConfig } from 'vitest/config';
import path from 'node:path';

export default defineConfig({
test: {
// A late console.* must not redden a green suite (#10374): vitest's worker
// forwards console output over RPC and discards the promise, and a write
// landing after teardown's rpcDone() snapshot is rejected into an unhandled
// error — a fully green run that exits 1. Disarming removes the mechanism.
// Mechanism + measured costs: examples/app-showcase/vitest.config.ts.
// Enforced repo-wide by scripts/check-console-intercept-disarm.mjs.
disableConsoleIntercept: true,
},
resolve: {
// One entry, for `canonical-expression-envelopes.test.ts` (#11480) — the
// only suite here that imports `@objectstack/lint` as a VALUE. It runs the
Expand Down
19 changes: 19 additions & 0 deletions packages/connectors/connector-mcp/vitest.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
// Copyright (c) 2026 ObjectStack. Licensed under the Apache-2.0 license.

// This config exists for exactly one setting; everything else stays on
// vitest's defaults, deliberately — a key added here re-specifies behaviour
// for every test file in the package (packages/cli/vitest.config.ts's header
// records the incident that taught that).
import { defineConfig } from 'vitest/config';

export default defineConfig({
test: {
// A late console.* must not redden a green suite (#10374): vitest's worker
// forwards console output over RPC and discards the promise, and a write
// landing after teardown's rpcDone() snapshot is rejected into an unhandled
// error — a fully green run that exits 1. Disarming removes the mechanism.
// Mechanism + measured costs: examples/app-showcase/vitest.config.ts.
// Enforced repo-wide by scripts/check-console-intercept-disarm.mjs.
disableConsoleIntercept: true,
},
});
9 changes: 9 additions & 0 deletions packages/connectors/connector-openapi/vitest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,15 @@ import { defineConfig } from 'vitest/config';
import path from 'path';

export default defineConfig({
test: {
// A late console.* must not redden a green suite (#10374): vitest's worker
// forwards console output over RPC and discards the promise, and a write
// landing after teardown's rpcDone() snapshot is rejected into an unhandled
// error — a fully green run that exits 1. Disarming removes the mechanism.
// Mechanism + measured costs: examples/app-showcase/vitest.config.ts.
// Enforced repo-wide by scripts/check-console-intercept-disarm.mjs.
disableConsoleIntercept: true,
},
resolve: {
// Array form with ANCHORED patterns, per the trap the gate documents: the
// object form matches by PREFIX, so a bare key whose replacement is a FILE
Expand Down
19 changes: 19 additions & 0 deletions packages/connectors/connector-rest/vitest.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
// Copyright (c) 2026 ObjectStack. Licensed under the Apache-2.0 license.

// This config exists for exactly one setting; everything else stays on
// vitest's defaults, deliberately — a key added here re-specifies behaviour
// for every test file in the package (packages/cli/vitest.config.ts's header
// records the incident that taught that).
import { defineConfig } from 'vitest/config';

export default defineConfig({
test: {
// A late console.* must not redden a green suite (#10374): vitest's worker
// forwards console output over RPC and discards the promise, and a write
// landing after teardown's rpcDone() snapshot is rejected into an unhandled
// error — a fully green run that exits 1. Disarming removes the mechanism.
// Mechanism + measured costs: examples/app-showcase/vitest.config.ts.
// Enforced repo-wide by scripts/check-console-intercept-disarm.mjs.
disableConsoleIntercept: true,
},
});
19 changes: 19 additions & 0 deletions packages/connectors/connector-slack/vitest.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
// Copyright (c) 2026 ObjectStack. Licensed under the Apache-2.0 license.

// This config exists for exactly one setting; everything else stays on
// vitest's defaults, deliberately — a key added here re-specifies behaviour
// for every test file in the package (packages/cli/vitest.config.ts's header
// records the incident that taught that).
import { defineConfig } from 'vitest/config';

export default defineConfig({
test: {
// A late console.* must not redden a green suite (#10374): vitest's worker
// forwards console output over RPC and discards the promise, and a write
// landing after teardown's rpcDone() snapshot is rejected into an unhandled
// error — a fully green run that exits 1. Disarming removes the mechanism.
// Mechanism + measured costs: examples/app-showcase/vitest.config.ts.
// Enforced repo-wide by scripts/check-console-intercept-disarm.mjs.
disableConsoleIntercept: true,
},
});
7 changes: 7 additions & 0 deletions packages/core/vitest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@ import path from 'path';

export default defineConfig({
test: {
// A late console.* must not redden a green suite (#10374): vitest's worker
// forwards console output over RPC and discards the promise, and a write
// landing after teardown's rpcDone() snapshot is rejected into an unhandled
// error — a fully green run that exits 1. Disarming removes the mechanism.
// Mechanism + measured costs: examples/app-showcase/vitest.config.ts.
// Enforced repo-wide by scripts/check-console-intercept-disarm.mjs.
disableConsoleIntercept: true,
globals: true,
environment: 'node',
},
Expand Down
7 changes: 7 additions & 0 deletions packages/create-objectstack/vitest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@ import { defineConfig } from 'vitest/config';

export default defineConfig({
test: {
// A late console.* must not redden a green suite (#10374): vitest's worker
// forwards console output over RPC and discards the promise, and a write
// landing after teardown's rpcDone() snapshot is rejected into an unhandled
// error — a fully green run that exits 1. Disarming removes the mechanism.
// Mechanism + measured costs: examples/app-showcase/vitest.config.ts.
// Enforced repo-wide by scripts/check-console-intercept-disarm.mjs.
disableConsoleIntercept: true,
include: ['test/**/*.test.ts', 'src/**/*.test.ts'],
environment: 'node',
},
Expand Down
7 changes: 7 additions & 0 deletions packages/drivers/driver-memory/vitest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@ import path from 'path';

export default defineConfig({
test: {
// A late console.* must not redden a green suite (#10374): vitest's worker
// forwards console output over RPC and discards the promise, and a write
// landing after teardown's rpcDone() snapshot is rejected into an unhandled
// error — a fully green run that exits 1. Disarming removes the mechanism.
// Mechanism + measured costs: examples/app-showcase/vitest.config.ts.
// Enforced repo-wide by scripts/check-console-intercept-disarm.mjs.
disableConsoleIntercept: true,
globals: true,
environment: 'node',
},
Expand Down
7 changes: 7 additions & 0 deletions packages/drivers/driver-mongodb/vitest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@ import { defineConfig } from 'vitest/config';

export default defineConfig({
test: {
// A late console.* must not redden a green suite (#10374): vitest's worker
// forwards console output over RPC and discards the promise, and a write
// landing after teardown's rpcDone() snapshot is rejected into an unhandled
// error — a fully green run that exits 1. Disarming removes the mechanism.
// Mechanism + measured costs: examples/app-showcase/vitest.config.ts.
// Enforced repo-wide by scripts/check-console-intercept-disarm.mjs.
disableConsoleIntercept: true,
globals: true,
testTimeout: 30_000,
hookTimeout: 30_000,
Expand Down
7 changes: 7 additions & 0 deletions packages/drivers/driver-sql/vitest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@ import path from 'path';

export default defineConfig({
test: {
// A late console.* must not redden a green suite (#10374): vitest's worker
// forwards console output over RPC and discards the promise, and a write
// landing after teardown's rpcDone() snapshot is rejected into an unhandled
// error — a fully green run that exits 1. Disarming removes the mechanism.
// Mechanism + measured costs: examples/app-showcase/vitest.config.ts.
// Enforced repo-wide by scripts/check-console-intercept-disarm.mjs.
disableConsoleIntercept: true,
globals: true,
environment: 'node',
// #9350: the live-dialect files each own a schema (Postgres) / database
Expand Down
19 changes: 19 additions & 0 deletions packages/drivers/driver-sqlite-wasm/vitest.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
// Copyright (c) 2026 ObjectStack. Licensed under the Apache-2.0 license.

// This config exists for exactly one setting; everything else stays on
// vitest's defaults, deliberately — a key added here re-specifies behaviour
// for every test file in the package (packages/cli/vitest.config.ts's header
// records the incident that taught that).
import { defineConfig } from 'vitest/config';

export default defineConfig({
test: {
// A late console.* must not redden a green suite (#10374): vitest's worker
// forwards console output over RPC and discards the promise, and a write
// landing after teardown's rpcDone() snapshot is rejected into an unhandled
// error — a fully green run that exits 1. Disarming removes the mechanism.
// Mechanism + measured costs: examples/app-showcase/vitest.config.ts.
// Enforced repo-wide by scripts/check-console-intercept-disarm.mjs.
disableConsoleIntercept: true,
},
});
19 changes: 19 additions & 0 deletions packages/drivers/driver-turso/vitest.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
// Copyright (c) 2026 ObjectStack. Licensed under the Apache-2.0 license.

// This config exists for exactly one setting; everything else stays on
// vitest's defaults, deliberately — a key added here re-specifies behaviour
// for every test file in the package (packages/cli/vitest.config.ts's header
// records the incident that taught that).
import { defineConfig } from 'vitest/config';

export default defineConfig({
test: {
// A late console.* must not redden a green suite (#10374): vitest's worker
// forwards console output over RPC and discards the promise, and a write
// landing after teardown's rpcDone() snapshot is rejected into an unhandled
// error — a fully green run that exits 1. Disarming removes the mechanism.
// Mechanism + measured costs: examples/app-showcase/vitest.config.ts.
// Enforced repo-wide by scripts/check-console-intercept-disarm.mjs.
disableConsoleIntercept: true,
},
});
19 changes: 19 additions & 0 deletions packages/formula/vitest.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
// Copyright (c) 2026 ObjectStack. Licensed under the Apache-2.0 license.

// This config exists for exactly one setting; everything else stays on
// vitest's defaults, deliberately — a key added here re-specifies behaviour
// for every test file in the package (packages/cli/vitest.config.ts's header
// records the incident that taught that).
import { defineConfig } from 'vitest/config';

export default defineConfig({
test: {
// A late console.* must not redden a green suite (#10374): vitest's worker
// forwards console output over RPC and discards the promise, and a write
// landing after teardown's rpcDone() snapshot is rejected into an unhandled
// error — a fully green run that exits 1. Disarming removes the mechanism.
// Mechanism + measured costs: examples/app-showcase/vitest.config.ts.
// Enforced repo-wide by scripts/check-console-intercept-disarm.mjs.
disableConsoleIntercept: true,
},
});
Loading
Loading