Repository navigation
Add <Verbose> to xmd run - #690
Merged
Merged
Conversation
PR #690: Add Verbose component17 files, +627 / -23 Scope🟡 650 lines changed. PRs under 400 receive more thorough review. 🟡 Changes span 6 directories. 🟡 Large PR with no linked issue. StructuralOxlint structural signals:
SlopOxlint slop signals:
Static AnalysisOxlint: 9 diagnostics across 1 file (6 rules) no-console (3): packages/cli/src/cli.ts CorrectnessNo extraneous code patterns detected. |
taras
force-pushed
the
agent/verbose-component
branch
2 times, most recently
from
September 1, 2026 06:38
f30f5f5 to
de2cc9f
Compare
taras
force-pushed
the
agent/verbose-component
branch
from
September 1, 2026 06:47
de2cc9f to
0ff94aa
Compare
<Verbose> asked the host's boolean, closed over when the CLI built its registration. That answers the question once, at assembly, where no element has been written yet — so nothing inside a document could scope verbosity to the content it applies to. Verbosity is now a contextual field beside the three timeouts. The CLI seeds Config.verbose from the --verbose it already resolved, and the static registration reads it at every invocation, before it decides whether to expand its content. A component that installs a nearer value decides what its own content renders and no ancestor's and no sibling's; a value that is not a boolean fails where the reader asked. The command line still owns what the process presents: the journal, the event echo, the value root's observational output, and the testing report read the flag. Contextual verbosity carries no authority and takes no part in durable identity, admission or journal identity.
taras
enabled auto-merge (squash)
September 1, 2026 12:29
taras
disabled auto-merge
September 1, 2026 12:30
taras
enabled auto-merge (squash)
September 1, 2026 13:16
taras
disabled auto-merge
September 1, 2026 13:16
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 #691.
Why
Executable documents need a first-party way to include progress notes and diagnostic prose that are useful while watching a run, without adding that noise to ordinary output. And a document has to be able to say where such content applies: a single flag for the whole run cannot turn a section on for the one component that wants it.
What changes
Before:
--verboseprinted journal events, but document authors did not have a built-in component for verbose-only document output.After:
<Verbose>…</Verbose>is available in the CLI run profile. Ordinary runs skip the body without expanding it.--verboseruns render the body at the invocation site. A component may install a nearer verbosity for its own content, and that decides what its content renders and nothing else — the ancestors around it and the siblings after it read the value that already applied to them.How it works
Verbosity joins the three timeouts as a contextual
Configfield: a boolean,falseunless configured, installed and overridden exactly the way a timeout is.<Verbose>is a single static registration — nothing about the host is baked into it — and its generator resolves the contextual value at every invocation, before it decides whether to callcontent(). A component installs an override withyield* Config.around({ verbose: () => true }, { at: "min" }), and Effection teardown restores the enclosing value whether the content finished, failed or was cancelled.The component is a registered run-profile default from
@executablemd/cli, not core syntax and not a reserved name. A repositorycomponents/Verbose.mdstill overrides it.What the process presents is a separate question with a separate answer. The journal file, the
--verboseevent echo, a value root's observational output and the testing report's own verbosity read the resolved flag directly, so a document decides what it renders and never what the command prints. Contextual verbosity carries no authority and takes no part in durable identity, authorization, replay admission, retained-effect ownership or journal identity.Review guide
Start with:
packages/cli/src/verbose-component.tsThen review:
Config.verboseand its validated operation inpackages/runtime/config.tsspecs/acp-client-spec.md(§Config) andspecs/executable-mdx-spec.md(§6.20)installDocumentComponents(), and the run-profile registry inpackages/cli/src/syntax.tspackages/cli/tests/document-suites/verbose/Verbose.test.mdLook carefully at:
content(), so a non-verbose run does not expand the skipped body — effects and failures inside it do not happen.{ at: "min" }, which is what lets a nested override win rather than lose to the CLI's own handler.<Verbose.Enable>/<Verbose.Disable>fixtures live only under the test suite'scomponents/directory and are selected with--include; no production profile registers them.What must stay true
<Verbose>is overridable — enforced by ordinary component registration precedence and checked byVB4.content()and checked byVB3andVB10.Config.around(…, { at: "min" })and checked byVB9,VB10andCF10/CF10a.verboseoperation and checked byCF11.CF10b.xmd syntaxdescribes the component without invoking it — checked byVB5andsyntax-cli.test.ts.xmd run, an approved Plan underxmd plan --run, and an<Execution host="run">child have<Verbose>; a directxmd testroot does not, even with--verbose— checked byVB6,VB7andVB8.How to verify it
deno check packages/runtime/config.ts packages/runtime/mod.ts packages/core/mod.ts packages/cli/src/verbose-component.ts packages/cli/src/cli.ts packages/cli/src/syntax.ts packages/core/tests/config-api.test.ts packages/cli/tests/verbose-component.test.ts packages/cli/tests/document-suites/verbose/verbose-markdown.test.ts packages/cli/tests/document-suites/verbose/components/Verbose/Enable.ts packages/cli/tests/document-suites/verbose/components/Verbose/Disable.tsdeno task test packages/core/tests/config-api.test.ts packages/cli/tests/document-suites/verbose/verbose-markdown.test.ts packages/cli/tests/verbose-component.test.ts packages/cli/tests/plan-cli.test.tsdeno task test packages/cli/tests/syntax-cli.test.tsdeno task test --changed=origin/maindeno task lintgit diff --checkVB9proves a host-false run renders an enabled subtree and neither outer marker, and fails if the seed were read once at registration or if the override leaked to siblings.VB10proves a host-true run skips a disabled body — a<Fail>sentinel inside it never runs — and still renders the sibling after it, so it fails if teardown did not restore the enclosing value.CF11proves a non-boolean installed from untyped JavaScript is refused when read rather than treated as truthiness.Scope
Included
Config.verbose, its validated operation, and its re-export from runtime and core.<Verbose>as a static registration that reads contextual verbosity.Config.verbosefrom the already-resolved flag, for bothxmd runand the isolated run child.Intentionally unchanged
--verbosejournal logging, value-root observational output and testing report verbosity are unchanged, and remain driven by the flag rather than by the contextual field.specs/testing-spec.mdis unchanged: the direct-test and run-child contracts do not move.New abstractions
Config.verboseand the validatedverboseoperation exist because verbosity has to be a property of the scope an element expands in rather than of the registration, which is what lets a component scope it to its own content. It reuses the Config Api the three timeouts already use, adding no new mechanism.VERBOSE_REGISTRATIONis one static declaration, shared by the run profile and the syntax catalog, with nothing about a particular host inside it. There is no per-host registration builder, because there is nothing per-host left to build one from.Risks and limitations
<Verbose.Enable>/<Verbose.Disable>fixtures are checked-in TypeScript components. They are reachable only through the--includethe two Markdown rows pass, and adding them to a production registry would turn them into public components — which is what the review should confirm did not happen.Scope confirmation