Skip to content

The workflow group on the shared root, groups that take no action, and cmd/internal - #885

Merged
David-Noble-at-work merged 5 commits into
developfrom
feature/782-writ-workflow-verify
Sep 12, 2026
Merged

David-Noble-at-work merged 5 commits into
developfrom
feature/782-writ-workflow-verify

Conversation

@David-Noble-at-work

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

Copy link
Copy Markdown
Contributor

Closes #782.
Closes #742.

Feature #835 of epic #740; closure-ledger rows 7, 8 and 9. Plan: docs/plans/feature/782-writ-workflow-verify.md.

Summary

  • workflow on the shared root (row 8, ruled 2026-09-11). <program> workflow list folds the run index into one record per workflow; <program> workflow verify selects a workflow's definition and execution traces by --tool, --scope, --kind, --latest, or takes path operands for documents from outside the store, never both. The verifier moved whole into cmd/internal/cli; writ verify and Graph.Filename() are deleted. §2, §6 and design decision 10 record the ruling.
  • A group takes no action (row 7). writ repo prints help when bare; CheckGroupsTakeNoAction is §14's invariant 7, red on a fixture, called from writ's, lore's and devlore-test's root tests. star's setup waits on An extension cannot describe a command group; star mints '<name> commands' for every node above a leaf #841.
  • cmd/internal (row 9). console and credentials moved; manifest and registry stay and say why in their package comments.
  • Documentation in the last commit: the guide, five architecture documents, two status files, §10, §14, §15; the CLI reference regenerates with writ/workflow/ and lore/workflow/.

Acceptance criteria (from the plan and #742)

  • The workflow group, list and verify, on the shared root of all four programs; writ verify gone
  • writ repo invoked bare prints help; repo list lists
  • internal/console lives under cmd/internal/
  • Each remaining root-internal package is either moved or has its placement justified in writing
  • No pkg/ package can import CLI presentation code (Go's own rule for cmd/internal)
  • A mechanical check that a group takes no action, called from the roots whose trees satisfy it
  • Design and user documentation updated; the specification with the ruling, the user documentation in the last commit

Test plan

  • cli: the fold, the selection by name, --kind/--latest, the mixing refusal, --tool's default, the group takes no action, the checker red on a fixture
  • writ: workflow verify by path and by selection on a signed store; list reads the index; tampered-external and unsigned outcomes; writ verify unknown; writ repo bare
  • writ, lore, devlore-test roots pass every checker
  • CI's gate, run locally before the commits; make docs regenerates
  • Row 44 candidate, not this PR: -o table renders struct columns alphabetically where §8 says declaration order (Renderings: the pipeline from result value to stdout #833)

Time

Marker UTC Elapsed
opened (first commit) 2026-09-11T17:27:21Z —
submitted (PR opened) 2026-09-12T16:58:50Z 23.5 h after opened
merged 2026-09-12T17:30:28Z 0.5 h after submitted; 24.1 h in all

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

David Noble added 5 commits September 11, 2026 10:27
…on, and cmd/internal

Feature #835's plan, chartered on review, with the ruling of 2026-09-11 written
into the specification: the store's documents are addressed by workflow through
a shared-root workflow group, list and verify, and writ verify retires into it.
§2 names the group among the shared commands; §6 states the vocabulary, a
workflow's definition and its execution traces, and the selectors; design
decision 10 records why the noun is workflow.

Refs #782, #742, #835, #740 (rows 7, 8, 9).

Claude-Session: https://claude.ai/code/session_01SqQVFZz7AdiLZkGoAcUqRW
…ore by name

The store names a document by its checksum alone; the run index carries the
name a person uses. The shared root gains workflow: list folds the index into
one record per workflow, and verify selects a workflow's definition and
execution traces by --tool, --scope, --kind and --latest, keeping a path
operand for a document from outside the store. The verifier moves whole from
cmd/writ/writ/verify to cmd/internal/cli, reports its kinds in the user's
vocabulary, and returns an empty result rather than nil. writ verify and
Graph.Filename() are deleted; the integration test rehomes in writ, whose
deploy builds its fixture, and drives the shared root.

Refs #782, #740 (row 8).

Claude-Session: https://claude.ai/code/session_01SqQVFZz7AdiLZkGoAcUqRW
…ker enforces it

writ repo listed registrations when invoked bare, so repo was a noun and a verb
at once. It prints help now; repo list is unchanged. CheckGroupsTakeNoAction
joins the invariants beside the other checkers, red on a fixture, and writ's,
lore's and devlore-test's root tests call it. star's setup is the extension
loader's making and waits on #841, which will call the checker from star's
root test.

Refs #740 (row 7), #841.

Claude-Session: https://claude.ai/code/session_01SqQVFZz7AdiLZkGoAcUqRW
…y say why they stay

Root internal/ is importable by the whole module, so a pkg/ package could
import a terminal UI; cmd/internal makes that a compile error. console, a
Bubble Tea UI, and credentials, whose two importers already live in
cmd/internal, move. manifest stays because a document format is domain, not
presentation; registry stays because the devlore provider (#877) takes it
toward pkg/. Each says so in its package comment.

Refs #742, #740 (row 9).

Claude-Session: https://claude.ai/code/session_01SqQVFZz7AdiLZkGoAcUqRW
…e plan is complete

The guide's verification section teaches the workflow group, including list
and the selectors; five architecture documents and two status files name the
new path; §10 and §15 name cmd/internal/console; §14 carries invariant 7, a
group takes no action. The plan reaches complete in this last commit, per the
rule of noblefactor-ops#199.

Closes #782.
Closes #742.

Claude-Session: https://claude.ai/code/session_01SqQVFZz7AdiLZkGoAcUqRW
@David-Noble-at-work David-Noble-at-work self-assigned this Sep 12, 2026
@David-Noble-at-work
David-Noble-at-work merged commit f860ea7 into develop Sep 12, 2026
13 checks passed
@David-Noble-at-work
David-Noble-at-work deleted the feature/782-writ-workflow-verify branch September 12, 2026 17:30
David-Noble-at-work pushed a commit that referenced this pull request Sep 14, 2026
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 added a commit that referenced this pull request Sep 14, 2026
* Plan: lanes 1 to 4 of the command line schedule

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

* Lanes 1 to 4: the shared root conforms

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.

---------

Co-authored-by: David Noble <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

writ verify reads as "check my deployment" but checks document signatures internal/ holds cmd-only code; CLI packages belong in cmd/internal

1 participant