Verify constructor failure precedence

This commit is contained in:
2026-11-17 00:51:51 +00:00
parent 70b3818351
commit 49fee9f8ee
3 changed files with 65 additions and 2 deletions

View File

@@ -19,7 +19,7 @@ func TestPreparationCommandForwardsOrderedInputsAndNativeReport(t *testing.T) {
ctx := context.WithValue(context.Background(), key{}, "context")
var received PreparationRequest
calls := 0
native := &promptkit.PreparedRun{PromptID: "native", Messages: []promptkit.RenderedMessage{{Content: "rendered"}}}
native := &promptkit.PreparedRun{PromptID: "native", ParentRunID: "parent-run", Messages: []promptkit.RenderedMessage{{Content: "rendered"}}}
app := newPromptTestApp(t, Command(Suite[struct{}, struct{}]{PrepareRequest: func(got context.Context, req PreparationRequest, _, _ struct{}) (commandkit.Acquired[*promptkit.PreparedRun], error) {
if got.Value(key{}) != "context" {
t.Fatal("invocation context lost")