From 6eb053fcbeb780d1f291b62992afeba322b96ada Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 2 Sep 2026 16:26:34 +0000 Subject: [PATCH] fix(metadata): drop the leftover boot-time debug probe from `MetadataPlugin.init` (#14527) `init()` printed a bare `console.log` immediately after `ctx.registerService('metadata', this.manager)`, reporting `typeof this.manager.getRegisteredTypes`. Nothing gated it, so every kernel boot that installs `MetadataPlugin` wrote it to stdout. It reported a statically known fact and a repo-wide search found no reader of the string, so it is deleted rather than demoted to `ctx.logger.debug`. The `ctx.logger.info('Initializing Metadata Manager', ...)` call three lines above already announces the step through the plugin's own logger. The file's five other `console.*` calls (the dev HMR path) are untouched. Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_0112hMx9hjJ9BgB28X97DS68 --- ...metadata-plugin-drop-boot-console-probe.md | 30 +++++++++++++++++++ packages/metadata/src/plugin.ts | 1 - 2 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 .changeset/metadata-plugin-drop-boot-console-probe.md diff --git a/.changeset/metadata-plugin-drop-boot-console-probe.md b/.changeset/metadata-plugin-drop-boot-console-probe.md new file mode 100644 index 0000000000..001b48dfb9 --- /dev/null +++ b/.changeset/metadata-plugin-drop-boot-console-probe.md @@ -0,0 +1,30 @@ +--- +'@objectstack/metadata': patch +--- + +fix(metadata): drop the leftover boot-time debug probe from `MetadataPlugin.init` (#14527) + +`MetadataPlugin.init()` printed a bare `console.log` immediately after +`ctx.registerService('metadata', this.manager)`, reporting +`typeof this.manager.getRegisteredTypes`. Nothing gated it on `NODE_ENV`, a debug +flag or a logger level, so every kernel boot that installs `MetadataPlugin` wrote +it to stdout: the CLI, the dev server and any embedding host alike. + +What it printed was a probe, not information. `getRegisteredTypes` is a method the +class declares statically, so the `typeof` it reported cannot vary in a way an +operator could act on, and a repo-wide search finds no reader of the string. The +`ctx.logger.info('Initializing Metadata Manager', ...)` call three lines above +already announces the same lifecycle step through the plugin's own logger, carrying +the fields that are actually actionable (`root`, `watch`, `artifactSource`). Deleted +rather than demoted to `ctx.logger.debug` on that reading: once the reported fact is +statically known and unread, there is no shape check left worth keeping. + +Observable change: one fewer line on stdout at boot. No API, no types, no behaviour +beyond the removed print. On the two paths where a stray stdout line would break a +parser — `--json` payloads and the `os serve` protocol channel — the CLI already +reserves stdout by redirecting to stderr, so nothing downstream was relying on this +line's presence or its absence. + +The file's five other `console.*` calls (the dev HMR path) are deliberately +untouched: each carries its own marker, and the one that prints on every +non-development boot carries a written rationale for doing so. diff --git a/packages/metadata/src/plugin.ts b/packages/metadata/src/plugin.ts index 8af4aaf5de..8e4d1e3cf4 100644 --- a/packages/metadata/src/plugin.ts +++ b/packages/metadata/src/plugin.ts @@ -363,7 +363,6 @@ export class MetadataPlugin implements Plugin { // Register Metadata Manager as the primary metadata service provider. ctx.registerService('metadata', this.manager); - console.log('[MetadataPlugin] Registered metadata service, has getRegisteredTypes:', typeof this.manager.getRegisteredTypes); // Register metadata system objects via the manifest service (if available). // MetadataPlugin may init before ObjectQLPlugin, so wrap in try/catch.