Clarify operator command help and preflight migration

This commit is contained in:
2026-11-30 17:21:07 +00:00
parent 8aa552070d
commit 723b788161
4 changed files with 23 additions and 4 deletions

View File

@@ -413,6 +413,7 @@ Removed command paths have no compatibility aliases.
| Previous invocation | Current invocation |
| --- | --- |
| `session validate SESSION` | `preflight SESSION` |
| `run-stage STAGE SESSION` | `run SESSION --stage STAGE` |
| `analyze SESSION` | `run SESSION --stage analyze --force` |
| `publish SESSION` | `run SESSION --stage publish --force` |
@@ -425,6 +426,10 @@ Removed command paths have no compatibility aliases.
| `--secrets-dir PATH` | Configure the main pipeline file or supply environment values; see [Secrets Handling](config.md#secrets-handling). |
| `config diff LEFT_OVERLAY RIGHT_OVERLAY` | `config diff --overlay LEFT_OVERLAY --against-overlay RIGHT_OVERLAY` |
Unlike the former `session validate`, `preflight` prepares or reuses inputs and
can create workspace state, download inputs, and update the manifest. See
[preflight](#preflight) for its readiness-check behavior.
Campaign identity and file selectors may now accompany each other. Party-file
selection consistently overrides the roster without editing campaign settings.
Native configuration inspection retains declarations and their actual evidence;

View File

@@ -48,7 +48,8 @@ func checkCleanInput(input *cleanCommandInput) error {
func cleanCommand(deps commandDependencies) commandkit.Command {
common := newConfigurationFlags(func(input **cleanCommandInput) *configurationSelection { return &(*input).Selection })
return commandkit.NewCommand(commandkit.CommandSpec[*cleanCommandInput]{Name: "clean", Summary: "Remove selected local session data.", NewInput: func() *cleanCommandInput { return &cleanCommandInput{} },
return commandkit.NewCommand(commandkit.CommandSpec[*cleanCommandInput]{Name: "clean", Summary: "Remove entire local sessions, including prepared inputs and products.",
Description: "Deletes the selected local session workspace, including its manifest, prepared inputs, products, and run history. Remote data and subprocess caches remain. Use --dry-run to preview deletion. To remove only run history while retaining a reusable session, use narratio run SESSION --stage cleanup; this requires workspace.cleanup_after_publish=true and valid successful publication evidence.", NewInput: func() *cleanCommandInput { return &cleanCommandInput{} },
Flags: []commandkit.Flag[*cleanCommandInput]{common.Config, common.Overlay, common.Campaign, common.CampaignFile, common.SessionFile, common.PartyFile,
commandkit.ValueFlag(commandkit.FlagMeta{Name: "previous-session-id", Usage: "Assert the previous session identity."}, nil, stringValue, func(input **cleanCommandInput, value commandkit.Supplied[string]) { (*input).PreviousSession = value }),
commandkit.BoolFlag(commandkit.FlagMeta{Name: "all", Usage: "Clean all local session workspace entries."}, false, func(input **cleanCommandInput, value commandkit.Supplied[bool]) { (*input).All = value.Value }),

View File

@@ -80,9 +80,15 @@ func executionCommand(name, summary string, regenerate bool, deps commandDepende
func executionCommandSpec(name, summary string, regenerate bool) commandkit.CommandSpec[*executionInput] {
common := newConfigurationFlags(func(input **executionInput) *configurationSelection { return &(*input).Selection })
artifactUsage := "Artifact or family targets for analysis and publication (repeatable or comma-separated)."
description := ""
if regenerate {
artifactUsage = "Analysis artifact or family targets; extraction is not narrowed (repeatable or comma-separated)."
description = "Forces the whole configured Notarius extraction, then rebuilds selected analysis targets and required prerequisites. --artifacts narrows analysis only. Stops before publication, notification, and cleanup."
}
flags := []commandkit.Flag[*executionInput]{common.Config, common.Overlay, common.Campaign, common.CampaignFile, common.SessionFile, common.PartyFile,
commandkit.ValueFlag(commandkit.FlagMeta{Name: "previous-session-id", Usage: "Assert the previous session identity."}, nil, stringValue, func(input **executionInput, value commandkit.Supplied[string]) { (*input).PreviousSession = value }),
commandkit.RepeatFlag(commandkit.FlagMeta{Name: "artifacts", Usage: "Analysis artifact or family targets (repeatable or comma-separated)."}, []string(nil), stringValue, func(input **executionInput, value commandkit.Supplied[[]string]) { (*input).Artifacts = value }),
commandkit.RepeatFlag(commandkit.FlagMeta{Name: "artifacts", Usage: artifactUsage}, []string(nil), stringValue, func(input **executionInput, value commandkit.Supplied[[]string]) { (*input).Artifacts = value }),
}
if !regenerate {
flags = append(flags,
@@ -93,7 +99,7 @@ func executionCommandSpec(name, summary string, regenerate bool) commandkit.Comm
)
}
return commandkit.CommandSpec[*executionInput]{
Name: name, Summary: summary, NewInput: func() *executionInput { return &executionInput{} }, Flags: flags,
Name: name, Summary: summary, Description: description, NewInput: func() *executionInput { return &executionInput{} }, Flags: flags,
Arguments: []commandkit.Argument[*executionInput]{commandkit.ValueArgument(commandkit.ArgumentMeta{Name: "SESSION", Usage: "Session identity."}, true, stringValue, func(input **executionInput, value commandkit.Supplied[string]) { (*input).Selection.Session = value })},
CheckInput: func(input *executionInput) error {
if regenerate {

View File

@@ -74,7 +74,14 @@ type sessionPublishedOutput struct {
}
func sessionStateCommand(name string, status bool, deps commandDependencies) commandkit.Command {
spec := sessionInspectionSpec(name, "Inspect session state without changing it.", !status)
summary := "Inspect session artifact definitions and availability."
description := "Reports definitions, dependencies, and local artifact evidence. Add --remote to inspect remote publication and locks. Does not read artifact payload bodies."
if status {
summary = "Inspect session progress and local and remote state."
description = "Reports manifest stages, artifacts, configuration provenance, and readiness. Includes remote current state when storage is configured; remote inspection failures can return a partial report with a failed outcome."
}
spec := sessionInspectionSpec(name, summary, !status)
spec.Description = description
spec.Run = func(invocation commandkit.Invocation, input *sessionInspectionInput) commandkit.Outcome {
report, err := inspectSelectedSessionState(invocation.Context, input, status, withCommandReporting(deps, invocation))
if report != nil {