Present native PromptKit operation failures
This commit is contained in:
@@ -27,7 +27,8 @@ type SmokeRequest struct {
|
||||
// without a builder, the seed is forwarded unchanged. Reports and errors from
|
||||
// PromptKit are both retained. A nil loader is kept as a suite wiring issue and
|
||||
// does not install a smoke-test callback. The callback also retains independent
|
||||
// engine diagnostics and terminal context with the report and error.
|
||||
// engine diagnostics and terminal context with the report and error. Native
|
||||
// operation errors supply terminal explanations when structured context is absent.
|
||||
func WithSmokeTesting[I, S any](
|
||||
suite Suite[I, S],
|
||||
load func(context.Context, ckconfig.Selection, I, S) (*promptkit.Engine, error),
|
||||
@@ -65,6 +66,7 @@ func WithSmokeTesting[I, S any](
|
||||
}
|
||||
|
||||
report, err := engine.SmokeTest(ctx, concreteRequest)
|
||||
messages = messages.withOperationError(err)
|
||||
return commandkit.Acquired[*promptkit.SmokeTestReport]{Value: report, Diagnostics: messages.diagnostics, Explanation: messages.explanation}, err
|
||||
}
|
||||
return suite
|
||||
|
||||
Reference in New Issue
Block a user