Select temporary debug directory default

This commit is contained in:
2026-11-19 18:47:12 +00:00
parent d11d379bd4
commit 9c4c2fc88d

View File

@@ -645,30 +645,31 @@ retains the bookkeeping boundary; U9 still owns concrete durable record choices.
**Discussion / decision:** Controls, native capture hooks, lifecycle, failure
policy, and optional diagnostics agreed. Use `--debug` for native verbosity and
conditional durable capture. The default-directory policy is reopened; removing
the existing default is not an agreed requirement. Operator-owned data handling
and recording each fact once are agreed. The summary/trace distinction, concrete
capture inventory, and bundle organization remain under discussion.
Implementation is pending.
durable capture with `/tmp/notarius-debug` as the default root. Operator-owned
data handling and recording each fact once are agreed. The summary/trace
distinction, concrete capture inventory, and bundle organization remain under
discussion. Implementation is pending.
### Shared Debug Control With Conditional Capture
Attach a native application boolean binding to CommandKit's shared `--debug`
option on the pipeline run command. Capture is enabled when that boolean is true
and an effective debug directory is available. `--debug-dir PATH` overrides
`debug.directory` in application configuration, which may have an application
default. A directory alone does not enable capture. Do not add a separate
`--capture-debug` flag.
`debug.directory` in application configuration, whose default is
`/tmp/notarius-debug`. A directory alone does not enable capture. Do not add a
separate `--capture-debug` flag.
**Default-directory discussion:** The earlier removal of the implicit
`./notarius-debug` default was an inference, not a user-selected requirement;
withdraw it. A default destination is compatible with the design. With a default,
`--debug` ordinarily enables both verbosity and capture without an explicit path.
The existing destination is relative to the selected main configuration file;
explicit CLI paths are relative to the invocation directory. Decide the default
and whether there is a useful explicit way to select no capture destination
before finalizing absent/empty-value behavior. Do not assume omission of a CLI or
configuration key means there is no effective destination.
**Default-directory decision:** Use the absolute root `/tmp/notarius-debug`,
with each run's bundle beneath it. Temporary diagnostic output belongs under
`/tmp` or an operator-selected location under `/var`, rather than beside a
configuration file likely to live under `/etc`. Replace the old configuration-
relative `./notarius-debug` default. Precedence is CLI override, configured value,
then application default. Explicit relative configuration paths retain their
source-relative interpretation; relative CLI paths use the invocation directory.
Omitting both directory overrides selects the default, so `--debug` enables
verbosity and capture without requiring a path. Detailed explicit-empty handling
and any demonstrated need for verbosity without capture remain separate choices.
Determine capture from the application boolean and destination, not from
`Invocation.ReportingMode()`. A later quiet or verbose selection can change
@@ -677,14 +678,11 @@ native boolean binding semantics and disables capture.
| Invocation flags | Reporting selection | Capture |
| --- | --- | --- |
| `--debug`, no effective directory | Debug | None. |
| `--debug`, effective directory from CLI/configuration/default | Debug | Enabled. |
| `--debug --quiet`, no effective directory | Quiet | None. |
| `--debug --quiet`, effective directory from CLI/configuration/default | Quiet | Enabled. |
| `--quiet --debug`, effective directory from CLI/configuration/default | Debug | Enabled. |
The no-effective-directory rows apply only if the final directory policy allows
that state; with a default, omission alone does not select it.
| No `--debug`, with any directory selection | Selected native mode | None. |
| `--debug`, no directory override | Debug | Enabled under `/tmp/notarius-debug`. |
| `--debug`, with a directory override | Debug | Enabled under the selected root. |
| `--debug --quiet`, with any directory selection | Quiet | Enabled. |
| `--quiet --debug`, with any directory selection | Debug | Enabled. |
**Upstream ordering clarification:** CommandKit uses the last enabled reporting
mode. Thus `--debug --quiet` suppresses command output while retaining capture;