Skip to content

Commit fc0a369

Browse files
os-muskclaude
andauthored
fix(metadata): drop the leftover boot-time debug probe from MetadataPlugin.init (#14527) (#14649)
`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. Claude-Session: https://claude.ai/code/session_0112hMx9hjJ9BgB28X97DS68 Co-authored-by: Claude <noreply@anthropic.com>
1 parent 0f183cb commit fc0a369

2 files changed

Lines changed: 30 additions & 1 deletion

File tree

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
---
2+
'@objectstack/metadata': patch
3+
---
4+
5+
fix(metadata): drop the leftover boot-time debug probe from `MetadataPlugin.init` (#14527)
6+
7+
`MetadataPlugin.init()` printed a bare `console.log` immediately after
8+
`ctx.registerService('metadata', this.manager)`, reporting
9+
`typeof this.manager.getRegisteredTypes`. Nothing gated it on `NODE_ENV`, a debug
10+
flag or a logger level, so every kernel boot that installs `MetadataPlugin` wrote
11+
it to stdout: the CLI, the dev server and any embedding host alike.
12+
13+
What it printed was a probe, not information. `getRegisteredTypes` is a method the
14+
class declares statically, so the `typeof` it reported cannot vary in a way an
15+
operator could act on, and a repo-wide search finds no reader of the string. The
16+
`ctx.logger.info('Initializing Metadata Manager', ...)` call three lines above
17+
already announces the same lifecycle step through the plugin's own logger, carrying
18+
the fields that are actually actionable (`root`, `watch`, `artifactSource`). Deleted
19+
rather than demoted to `ctx.logger.debug` on that reading: once the reported fact is
20+
statically known and unread, there is no shape check left worth keeping.
21+
22+
Observable change: one fewer line on stdout at boot. No API, no types, no behaviour
23+
beyond the removed print. On the two paths where a stray stdout line would break a
24+
parser — `--json` payloads and the `os serve` protocol channel — the CLI already
25+
reserves stdout by redirecting to stderr, so nothing downstream was relying on this
26+
line's presence or its absence.
27+
28+
The file's five other `console.*` calls (the dev HMR path) are deliberately
29+
untouched: each carries its own marker, and the one that prints on every
30+
non-development boot carries a written rationale for doing so.

packages/metadata/src/plugin.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -372,7 +372,6 @@ export class MetadataPlugin implements Plugin {
372372

373373
// Register Metadata Manager as the primary metadata service provider.
374374
ctx.registerService('metadata', this.manager);
375-
console.log('[MetadataPlugin] Registered metadata service, has getRegisteredTypes:', typeof this.manager.getRegisteredTypes);
376375

377376
// Register metadata system objects via the manifest service (if available).
378377
// MetadataPlugin may init before ObjectQLPlugin, so wrap in try/catch.

0 commit comments

Comments
 (0)