You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Enforcement: two tests that fail when a command leaves the output convention #776
Adoption of the output convention went backwards, not merely slowly. extract-output-package.md recorded
two call sites in March — lore inspect and writ snapshot. writ snapshot was removed, taking half the
convention's adopters with it, and nothing recorded that it had. Invariants that are not tested decay
silently. These tests are what "done" means for the epic.
The two invariants, plus the one neither catches
No command package writes to os.Stdout directly. A direct write bypasses the sink, and with it -o, --jq, --filter and the result/narration split.
No command registers its own output flag. A hand-rolled --output, --format or --json is a second
convention, and two conventions drift.
Every root that calls AddOutputFlags has every leaf reaching BuildPipeline. Neither invariant
above catches #753 or #754: writ registered no flags of its own, and the os.Stdout check finds a
command that prints but not one that silently ignores the flags it inherited. A flag registered on a root
that no leaf consumes is worse than an absent one, because it looks like compliance.
What each test has to prove it can fail
Each test is authored to fail on the current tree, or is shown to fail by re-introducing the defect it
guards, before it is trusted. A test that has only ever passed has not been shown to be a test.
Test
Turns red when
no direct os.Stdout
a fmt.Print is added to any cmd/* package
no own output flag
a command calls Flags().String("output", …)
every leaf consumes
a root gains AddOutputFlags and a leaf's RunE never calls BuildPipeline
Also here
Regenerate the CLI docs and confirm every command documents the same flags. docs/cli is gitignored
here but published — docs-publish.yaml regenerates it on every push to develop — so the generated
surface is what users actually read.
Activity
writ reconcile: the command is renamed, and its renderings go through…
The output convention's checkers, and the one seam through which a ch…
The shared root owns the common set, every root is the shared root, a…
Close the convention box: the tests named where the rules are, and th…
CI: the config path test decodes the JSON the command now emits, and …
The output convention is enforced: the shared root owns the common se…
Every program has a generated reference, and the build generates it (#…