From d7cf9c96c92751b143f6be2e2bfac3e691eaa46d Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 31 Aug 2026 22:00:26 +0000 Subject: [PATCH] test(dogfood): declare OS_REGISTRY_LOG=warn in the suite's own vitest harness MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The dogfood gate writes 66,976 lines to stdout per full run; 39,738 of them (94.9% of everything it writes through `console`) are the SchemaRegistry's per-item `[Registry] Registered …` lines, emitted once per registered item per app boot across ~130 boots of the real example apps. `OS_REGISTRY_LOG` is `@objectstack/objectql`'s own published seam for that verbosity (`SchemaRegistryOptions.logLevel` / `REGISTRY_LOG_LEVELS`). At `warn` the registry's `log()` returns before writing, while the ADR-0005 `[Registry] Collision` diagnostics — a bare `console.warn` the level never gates — still surface. The engine's shipped default is untouched, and no library code learns what a test runner is: the request lives in the harness, declaratively, where the test author can see it. Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_01F3jdziLbAPGeceVNmSox5L --- packages/qa/dogfood/vitest.config.ts | 33 ++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/packages/qa/dogfood/vitest.config.ts b/packages/qa/dogfood/vitest.config.ts index d032eb2512..c3873b15bf 100644 --- a/packages/qa/dogfood/vitest.config.ts +++ b/packages/qa/dogfood/vitest.config.ts @@ -15,6 +15,29 @@ // // `isolated` keeps vitest defaults (fresh fork registry per file) for // everything else — fixture stacks, custom security/plugins, env-flag files. +// +// ── #13517: this suite asks the SchemaRegistry for quiet, DECLARATIVELY ───── +// +// Measured on this suite (one full run, `origin/main` eb649cb8bc): 66,976 +// lines on the run's stdout, 39,738 of them `[Registry] …` — 94.9% of +// everything this suite writes through `console`. They are per-item +// registration lines (`Registered object/namespace/action/view/…`), emitted +// once per registered item per app boot, and this suite boots real example +// apps ~130 times. +// +// `OS_REGISTRY_LOG` is `@objectstack/objectql`'s OWN published seam for that +// verbosity (`SchemaRegistryOptions.logLevel` / `REGISTRY_LOG_LEVELS`, +// registry.ts) — at `warn` the registry's private `log()` returns before +// writing. What it does NOT silence is the diagnostics: the ADR-0005 +// `[Registry] Collision` lines go through a bare `console.warn` that the +// level never gates, so a real shadowing still speaks here. +// +// ⛔ Two things this deliberately is NOT. It does not move the engine's +// SHIPPED default (still `'info'`, unchanged for every production reader), +// and it does not make library code sniff `process.env.VITEST` — a library +// that behaves differently under a test runner would make every log reading +// in tests a reading of something other than production. The request lives +// HERE, in the harness, where the test author can see it. import { defineConfig } from 'vitest/config'; import path from 'path'; @@ -62,6 +85,11 @@ export default defineConfig({ // vitest 4.1.10). Mechanism: examples/app-showcase/vitest.config.ts. // Enforced by scripts/check-console-intercept-disarm.mjs. disableConsoleIntercept: true, + // #13517: quiet the registry's per-item registration chatter — the + // engine's own `OS_REGISTRY_LOG` seam, not a change to its shipped + // default. Header docblock carries the measurement and the rationale. + // PER PROJECT for the same measured reason as the line above. + env: { OS_REGISTRY_LOG: 'warn' }, name: 'shared-showcase', include: SHARED_SHOWCASE, isolate: false, @@ -74,6 +102,11 @@ export default defineConfig({ // vitest 4.1.10). Mechanism: examples/app-showcase/vitest.config.ts. // Enforced by scripts/check-console-intercept-disarm.mjs. disableConsoleIntercept: true, + // #13517: quiet the registry's per-item registration chatter — the + // engine's own `OS_REGISTRY_LOG` seam, not a change to its shipped + // default. Header docblock carries the measurement and the rationale. + // PER PROJECT for the same measured reason as the line above. + env: { OS_REGISTRY_LOG: 'warn' }, name: 'isolated', include: ['test/**/*.test.ts'], exclude: SHARED_SHOWCASE,