Skip to content

test(cli): no test boots serve and asserts the four cluster-driver diagnosis branches (follow-up promised in #14042) #14054

Description

@os-steve

Follow-up disclosed in #14042 (the #13330 fix), filed as promised there. This is a coverage gap the author disclosed, not a defect: the at-tier contract review on #14042 judged it non-blocking on merits, but required the promised follow-up to exist as an issue.

What is untested

No test boots serve and asserts the four cluster-driver diagnosis branches added by #14042 (packages/cli/src/commands/serve.ts, the cluster block in the boot method):

  1. registered — driver loaded and visible in the registry: silent (no diagnosis printed);
  2. loaded-but-invisible — the driver evaluated without error but the registry this boot reads does not hold it (a physical-copy split): warns, naming the split and the one-line config remedy;
  3. not-resolvable — prints the undeclared / declared-unresolvable classification from createHostImporter that the old silent catch swallowed;
  4. resolved-then-crashed — the driver package's own evaluation error is printed instead of being reported as "not registered".

There is also a fifth, deliberately silent case — an app on an older @objectstack/service-cluster with no listClusterDrivers accessor prints nothing (declines to claim either answer) — which is equally unasserted at boot level.

Why it is untested

The reading sits inline in a very long boot method, so there is no seam to drive the branches through without booting the whole of serve.

Compensating coverage (why this is p3, not a defect)

The risk the gap leaves open is the one the review named: silent-print branches are the exact shape that regresses invisibly.

Done means

A test (or tests) that boots serve (or extracts the reading into a testable seam first) and asserts each diagnosis branch fires on its condition — including that the registered case and the older-service-cluster case stay silent.

Refs: #14042, #13330.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions