Repository navigation
Lanes 1 to 4: the shared root conforms - #890
Merged
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
versionprinted five lines withfmt.Fprintf, so--output yamland--output jsonprinted the same five lines on every program. It returns aVersionReportthroughcli.Emitnow.--shortkeeps both spellings.cmd.OutOrStdout(), which is stdout under another name, so threewrit reposites reached stdout outside the pipeline while the walk stayed green. The walk reports it everywhere butcli.Emit, the one caller;repo add,removeandlistemitRepoRegistrationrecords carrying the layer, its root and its state.--silentwas still an unparsed string while star loaded its extensions and its runtime reported the module surface. The shared root reads--silentfrom the raw arguments and installs the narrator before construction, so every program is covered; star's runtime spec carries that narrator rather than defaulting to its own over stderr. --silent does not suppress the ambient-runtime banner; two stderr lines survive it #828's second half, the banner as a DEBUG diagnostic, waits on A diagnostics API for provider developers #507 as that issue states.Declare-BashScriptdefines,cli.ExitCodemaps cobra's refusals toEX_USAGE, a value--outputdoes not accept is one of them, star exits throughcli.ExitCode, and §9 states the table and the mapping rule.Two things found while working, both recorded
make buildin lane 1: its version-stamp check readswrit version --short, which became json. The Makefile asks for--output value, which is how a scalar reaches a consumer raw (§7). The plan's Files table names the Makefile with the reason.TestRepo_BareInvocation_Listswas passing for the wrong reason: it matched layer names inside the help text, so it stayed green after The workflow group on the shared root, groups that take no action, and cmd/internal #885 removed the bare listing. It now asserts what The workflow group on the shared root, groups that take no action, and cmd/internal #885 ruled, that a group prints help.Test plan
Unit and package tests,
make check's gate:make vet lint shell-lint complexity verify-ldflagsclean;star lint go ./...clean; frontmatter valid;make regenerateproduced no diffmake testgreen in every package butcmd/internal/lorepackage, which clones the registry over the network and cannot pass on an aircraft connection (TestRegistry_SyncIntegration fails instead of skipping without a network, and its escape hatch calls t.Fatalf where it means t.Skip #888). The commit script asserted that it is the only failure rather than tolerating any.Installed and exercised on darwin/arm64, build
v0.1.0-dev.20260912173102-1-g25fa079c:version --output jsonparses on writ, lore, star and devlore-test; yaml, table, list, csv and value render;noneprints nothingrepo list --output tableand--output jsonreport the three registered layers with their roots;--filter state=registered --jq '.[].layer'reaches themstar --silent versionwrites 0 bytes to stderr; without the flag, 413--outputexit 64 on writ, lore and star;config get nosuchkeyexits 65; success exits 0Installed and exercised on linux/arm64,
danoble-ud24-1.local, from a bundle of the same build:writ self installon a machine with no prior devlore presenceConvergence, run by the owner:
writ upgrade→[writ] [✔] Nothing to regenerate.Not run:
make test-raceandmake test-scenario, for the same network reason as TestRegistry_SyncIntegration fails instead of skipping without a network, and its escape hatch calls t.Fatalf where it means t.Skip #888. CI runs both here.Found on the remote and filed, not this pull request's work
writ self installon a fresh machine creates emptylayers/base,teamandpersonal,repo listreads them as registrations, andrepo addclones the repository and then refuses, leaving an orphan. Appended as evidence to #840 and #792, which are feature #463's.Time
Computed by the algorithm of noblefactor-ops#188 at merge.