You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(cli): serve's boot-quiet window buffers plugin log lines instead of discarding them (#4012) (#4084)
`serve` blanks stdout while the kernel boots so the startup banner is readable,
and dropped what it intercepted. `ObjectLogger` routes debug/info/warn to stdout
and only error/fatal to stderr, so that one line swallowed every boot-phase
`logger.warn` any plugin emits — the ADR-0110 D5 `[action-governance]`
inventory, the automation engine's binding warnings, every degraded-boot notice.
`os dev` spawns `serve` with inherited stdio, so one drain blinded both
entrypoints at every log level, inverting the flag's own promise (the default is
`warn` precisely "so flow/hook execution failures surface", ADR-0032).
The window becomes a buffer rather than a drain:
- `BootLogCapture` is a line-oriented, bounded sink that classifies each
intercepted line against ObjectLogger's pretty/text/json renderings and
retains only records at warn or above, so buffer size tracks a boot's
warnings rather than its chattiness.
- Retained records replay under the banner, and on the two exits that never
reach it: OS_MIGRATE_AND_EXIT and serve's error path.
- `--verbose` / `--log-level debug|info` no longer open the window at all.
On examples/app-todo, `os serve` went from 25 lines with zero WARN to surfacing
five boot warnings including the `[action-governance]` line naming all eight
unbound actions. Same on `os dev`.
13 unit cases drive a real ObjectLogger through the real interception; 2 e2e
cases boot a real stack through bin/run-dev.js and read its stdout. Both e2e
cases fail against the pre-fix command.
Closes#4012
description: 'Kernel logger level. Defaults to $OS_LOG_LEVEL / $LOG_LEVEL, else `warn` so flow/hook execution failures surface (ADR-0032). Use `silent` to fully quiet the runtime.',
181
+
description: 'Kernel logger level. Defaults to $OS_LOG_LEVEL / $LOG_LEVEL, else `warn` so flow/hook execution failures surface (ADR-0032). Boot-phase warnings are replayed under the startup banner; `debug`/`info` stream the whole boot live instead. Use `silent` to fully quiet the runtime.',
180
182
options: [...LOG_LEVELS],
181
183
}),
182
184
verbose: Flags.boolean({char: 'v',description: 'Verbose output — shortcut for --log-level debug.'}),
0 commit comments