Skip to content

serve: the i18n load's undeclared diagnostic and the runtime's info-level fallback line announce the same benign situation twice per boot #14382

Description

@os-trump

Observation (polish, no user is blocked)

PR #14380 (#14118) makes serve's optional @objectstack/service-i18n load print the host-import classification it used to swallow, for every known HostImportFailureKind. That is the ruling on #14118 and it is correct for the two kinds that carry a real defect (declared-unresolvable, declared-no-loadable-entry).

For the third kind, undeclared — the ordinary "the app has translations and simply did not install the optional package" case, a supported configuration — the same boot now prints two announcements of one benign fact:

  • packages/cli/src/commands/serve.ts (the i18n catch): a console.warn on stderr carrying the importer's full multi-line undeclaredMessage ("Declare it in that app's package.json …").
  • packages/runtime/src/app-plugin.ts: the existing info-level line "Auto-registered in-memory i18n fallback … Install I18nServicePlugin from @objectstack/service-i18n for file-based / production use".

Both are reached only when the app HAS translations and the i18n tier is open, so the reader did ask for i18n; each prints once per boot. The duplication is an operator-noise question, not a correctness one.

Why it was not special-cased inside PR #14380

The dev raised this as a non-blocking open question and recommended keeping the site uniform. A one-line note for undeclared and the full remedy for the other two kinds would reintroduce exactly one local per-kind judgement at a consumer of the classification — the shape #14270 exists to remove, and the shape that goes stale on the next kind. The seat agreed: if the duplication is judged a real annoyance, the sound fix is one card over the PAIR of messages (CLI catch + runtime fallback line), deciding which of the two owns the benign case, not a branch inside the catch.

Options for whoever grades this

  • A — accept the duplication as shipped (uniform site, two lines once per boot on a configuration the operator chose).
  • B — make the runtime's info line the single owner of the benign undeclared case and have the CLI catch print only for kinds that name a defect, with the ownership stated at both sites so neither grows a branch table.

Source: os-dev report on #14118 (open question), PR #14380.

Restart-when: an operator, a checklist-test run, or a dogfood boot reports the duplicated undeclared announcement as actual noise

Generated by Claude Code

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions