Skip to content

Lanes 1 to 4: the shared root conforms - #890

Merged
David-Noble-at-work merged 2 commits into
developfrom
fix/795-shared-root-conformance
Sep 14, 2026
Merged

David-Noble-at-work merged 2 commits into
developfrom
fix/795-shared-root-conformance

Conversation

@David-Noble-at-work

@David-Noble-at-work David-Noble-at-work commented Sep 14, 2026 •

Copy link
Copy Markdown
Contributor

Closes #795.
Closes #794.
Closes #828.
Closes #884.

Lanes 1 to 4 of #887, the schedule that closes the command line epic. Closes feature #832. Plan: docs/plans/fix/795-shared-root-conformance.md.

Summary

Two things found while working, both recorded

Test plan

Unit and package tests, make check's gate:

Installed and exercised on darwin/arm64, build v0.1.0-dev.20260912173102-1-g25fa079c:

  • version --output json parses on writ, lore, star and devlore-test; yaml, table, list, csv and value render; none prints nothing
  • repo list --output table and --output json report the three registered layers with their roots; --filter state=registered --jq '.[].layer' reaches them
  • star --silent version writes 0 bytes to stderr; without the flag, 413
  • a bad flag, an unknown command and a bad --output exit 64 on writ, lore and star; config get nosuchkey exits 65; success exits 0

Installed and exercised on linux/arm64, danoble-ud24-1.local, from a bundle of the same build:

  • every one of the four checks above, same results
  • writ self install on a machine with no prior devlore presence

Convergence, run by the owner:

  • writ upgrade → [writ] [✔] Nothing to regenerate.

Not run:

Found on the remote and filed, not this pull request's work

writ self install on a fresh machine creates empty layers/base, team and personal, repo list reads them as registrations, and repo add clones the repository and then refuses, leaving an orphan. Appended as evidence to #840 and #792, which are feature #463's.

Time

Marker UTC Elapsed
opened (first commit) 2026-09-13T22:08:01Z —
submitted (PR opened) 2026-09-14T02:52:05Z 4.7 h after opened
merged 2026-09-14T03:09:21Z 0.3 h after submitted; 5 h in all

Computed by the algorithm of noblefactor-ops#188 at merge.

David Noble added 2 commits September 13, 2026 15:08
The four lanes of devlore-cli#887 that close feature #832: version emits a
record, the no-direct-stdout walk learns cmd.OutOrStdout(), --silent is read
before the runtime is assembled, and the suite's exit codes become the
sysexits set. Chartered on review, with the owner's ruling that a bad
--output value exits EX_USAGE.

The plan covers these four lanes and nothing else; anything found while
working them stops the work and goes to the owner for placement.

Refs #795, #794, #828, #884, #887, #832.

Claude-Session: https://claude.ai/code/session_01SqQVFZz7AdiLZkGoAcUqRW
Four defects in the root every program shares.

version printed five lines with fmt.Fprintf, so --output yaml and --output
json printed the same five lines everywhere. It returns a VersionReport
through cli.Emit now: json parses, yaml reads, value gives the six values,
none prints nothing. The Makefile's version-stamp check read that output and
broke on the json quoting; it asks for --output value, which is how a scalar
reaches a consumer raw.

The no-direct-stdout walk reported fmt.Print*, os.Stdout and the print
builtins, and never cmd.OutOrStdout(), which is stdout under another name.
It reports OutOrStdout everywhere but cli.Emit, the one caller. The three
writ repo sites that escaped it emit RepoRegistration records carrying the
layer, its root and its state.

--silent was still an unparsed string while star loaded its extensions and
its runtime reported the module surface, so two lines survived the flag. The
shared root reads --silent from the raw arguments and installs the narrator
before construction; star's runtime spec carries that narrator rather than
defaulting to its own over stderr.

The exit codes were three answers in three places: §9 said 0, 1 and 2, the
constants were the sysexits set with five gaps, and cobra's refusals exited 1
while star bypassed cli.ExitCode. The constants are the thirteen
Declare-BashScript defines, cli.ExitCode maps cobra's refusals to EX_USAGE, a
value --output does not accept is one of them, and star exits through it.

TestRepo_BareInvocation_Lists was passing for the wrong reason: it matched
layer names in the help text, so it stayed green after #885 removed the
listing. It asserts what #885 ruled, that a group prints help.

Refs #795, #794, #828, #884, #887 lanes 1 to 4, #832.
@David-Noble-at-work David-Noble-at-work self-assigned this Sep 14, 2026
@David-Noble-at-work
David-Noble-at-work merged commit 9cbddea into develop Sep 14, 2026
13 checks passed
@David-Noble-at-work
David-Noble-at-work deleted the fix/795-shared-root-conformance branch September 14, 2026 03:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment