Skip to content

The suite's exit codes are the sysexits set: §9 says 0/1/2, the constants have five gaps, and every failure exits 1 #884

Closed

Description

@David-Noble-at-work

Feature: #832 — The shared root: one root, the common set, and its enforcement

Ruled 2026-09-10

The suite reports the BSD sysexits set, the way Declare-BashScript (noblefactor-ops,
Home/common/.local/bin) does: EX_USAGE 64, EX_DATAERR 65, EX_NOINPUT 66, EX_UNAVAILABLE 69,
EX_SOFTWARE 70, EX_OSERR 71, EX_OSFILE 72, EX_CANTCREAT 73, EX_IOERR 74, EX_TEMPFAIL 75,
EX_PROTOCOL 76, EX_NOPERM 77, EX_CONFIG 78; 0 for success and 1 for "ran, and the answer is failure".
The Go names mirror the vocabulary in Go form, ExitUsage … ExitConfig, each doc comment naming the EX_*
it is.

The drift, measured at develop HEAD f03794d

Source Says
docs/architecture/10-command-line-interface.md §9 0 success, 1 the answer is failure, 2 could not run as asked; no sysexits
cmd/internal/cli/output.go constants eight of the thirteen (ExitUsage … ExitNoPerm), plus ExitError 1
cli.ExitCode a coded error's code, else 1; no program constructs a coded error, so it is always 1
measured a bad flag, an unknown command, a missing operand, -o bogus, a failed writ verify: exit 1 on writ, lore, star and devlore-test
cmd/star/main.go:147 os.Exit(1), never consulting cli.ExitCode
cmd/devlore-inventory/main.go exits 64, 66, 73 directly

Three sources, three answers, and no test asserts any of them. Found 2026-09-10 in the #740 done-done audit.

Acceptance

  • §9 states the sysexits table, one line per code, and the mapping rule: a cobra usage error (unknown
    flag, unknown command, argument count) is 64; a missing input 66; a failed verification or drift 1; an
    internal error 70
  • The constants are the thirteen, Go-named, each doc comment naming its EX_*
  • cli.ExitCode maps cobra's own errors to ExitUsage
  • cmd/star/main.go exits through cli.ExitCode
  • A subprocess test per in-scope program pins the codes for a bad flag, an unknown command and a bad -o

Plan and design documents

Kind Document
Plan no branch has opened; the plan arrives with it
Design docs/architecture/10-command-line-interface.md

Epic: #740 · Feature: #832

Metadata

Metadata

Assignees

No one assigned

    Labels

    Epic:CommandLineOne output convention across every CLI in the suitebugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions