Skip to content

cli: serve/start hardcodes logger level "silent" — flow & hook execution failures are invisible (defeats ADR-0032 "fail loudly") #1533

Description

@xuyushun441-sys

Summary

os serve / os start construct the runtime with a hardcoded{ level: 'silent' } logger and no override. As a result every plugin logger.info/warn/error is suppressed — including the record-change trigger's flow-execution-failure warnings and the automation engine's internal errors. A flow that faults at runtime fails completely silently, which directly undercuts ADR-0032's "fail loudly with an attributed, corrective message" promise when running via the CLI.

Version

@objectstack/cli7.6.0.

Where

@objectstack/cli/dist/commands/serve.js:

// Set kernel logger to 'silent' — the CLI manages its own outputconstloggerConfig={level: 'silent'};construntime=newRuntime({kernel: {logger: loggerConfig}});

There is no env (OS_LOG_LEVEL / LOG_LEVEL) or flag to raise it. ObjectLogger defaults to info, but this overrides everything to silent.

Compounding swallow points (both go through the now-silenced logger):

  • @objectstack/plugin-trigger-record-change handler:
    catch (err) { this.logger.warn("[record-change] flow '<name>' execution failed: " + err.message) }
  • @objectstack/service-automation engine: flow register / trigger-bind / execution logs are logger.info / logger.warn.

Impact

A record-change flow whose condition or node faults produces zero operator-visible output — the flow just has no effect. While debugging objectstack-ai/hotcrm#365 I had to patch node_modules to set level: 'debug' before any of the binding/execution diagnostics appeared. Related historical report: #888.

Suggested fix

  • Honor OS_LOG_LEVEL / LOG_LEVEL (and/or a --log-level CLI flag) instead of hardcoding silent.
  • Ensure flow/hook execution failures surface on a channel the CLI's "manages its own output" mode does not suppress (e.g. always emit to stderr at warn+, or a dedicated automation-error sink), so the ADR-0032 corrective messages actually reach the operator.

Found while upgrading objectstack-ai/hotcrm to 7.6 (objectstack-ai/hotcrm#365).

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingpriority:p2Medium: important, M3tooling

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions