Finish PromptKit repair and execution accounting follow-ups
This commit is contained in:
@@ -20,11 +20,14 @@ func TestDecodeRepairResponse(t *testing.T) {
|
||||
{"withdrawal with revision", `{"proposal_ref":2,"action":"withdraw","correction":{"id":1}}`, false},
|
||||
} {
|
||||
t.Run(tc.name, func(t *testing.T) {
|
||||
_, err := DecodeRepairResponse([]byte(tc.content), 2)
|
||||
response, err := DecodeRepairResponse([]byte(tc.content), 2)
|
||||
if tc.valid && err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if !tc.valid {
|
||||
if response.ProposalRef == 0 || response.Action == "" {
|
||||
t.Fatalf("missing decoded evidence: %+v", response)
|
||||
}
|
||||
var failure *structuredoutput.Failure
|
||||
if !errors.As(err, &failure) || failure.Reason != outcomes.ReasonInvalidOutput || failure.Class != structuredoutput.FailureRecoverable {
|
||||
t.Fatalf("failure = %v", err)
|
||||
|
||||
Reference in New Issue
Block a user