Skip to content

devlore-test builds its own root, so shared-infrastructure fixes do not reach it #757

Closed

Description

@David-Noble-at-work

devlore-test assembles its own root command instead of using cli.NewRootCmd, so it inherits nothing added
to the shared constructor.

Measured

COLUMNS=70, longest flag line
  writ           70
  lore           70
  devlore-test  389   <- unwrapped
  star           65

writ and lore call cli.NewRootCmd and wrap. devlore-test builds a cobra.Command directly
(cmd/devlore-test/devloretest/root.go) and does not, so the help wrapping added for #755 never reached it.

Nobody decided to exclude it. It was excluded by a construction choice made elsewhere, and found by
measurement afterwards.

The ruling

Membership in the suite is about infrastructure, not about shipping (2026-08-31,
docs/architecture/10-command-line-interface.md §2). An in-scope program builds its command tree the way
every other in-scope program does: NewRootCmd for the root, AddOutputFlags on that root,
cmd/internal/cli for the exit codes and the store.

devlore-test is subject to this whether or not it is ever shipped. Whether it ships does not enter into it.

What it has and lacks today

devlore-test
AddOutputFlags on its root yes — so #753 and #754 reached it
cli.NewRootCmd no — so #755 did not
cmd/internal/cli store, exit codes yes

The pattern is what matters more than the instance: every future repair in cmd/internal/cli has the same
reach and the same silence. A program outside the constructor does not fail — it simply does not improve.

Fix

devlore-test's root goes through cli.NewRootCmd with a RootConfig, as writ and lore do. Whatever it
does today that the shared constructor does not support is the thing to name and either add there or justify
keeping.

Verification

  • COLUMNS=70 devlore-test --help produces no flag line over 70.
  • devlore-test --silent suppresses narration through the same path the other programs use.
  • The exit codes and --config handling match the other programs, because they come from the same place.
  • A test asserts that every in-scope program's root is built by cli.NewRootCmd, so the next program cannot
    quietly opt out — see Phase 5's enforcement invariants.

Metadata

Metadata

Labels

No labels
No labels

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions