feat: persist and transfer script command payloads

This commit is contained in:
2026-09-06 11:11:36 +00:00
parent 26ac4c1cac
commit 3f84d3b2f1
18 changed files with 1155 additions and 31 deletions
+15
View File
@@ -32,3 +32,18 @@ func TestGlobalSocketAndCLIValueParsing_HP_CTL_11(t *testing.T) {
t.Fatalf("zero queue duration = %v", got)
}
}
func TestGlobalRequestIDIsInjectedOnlyForMutations_HP_CTL_12(t *testing.T) {
t.Parallel()
id := "019c46f1-1d02-7000-8000-0000000000f1"
requestID, remaining, err := globalRequestID([]string{"--request-id", id, "run", "client", "echo"})
if err != nil || requestID != id || len(remaining) != 3 || remaining[0] != "run" {
t.Fatalf("global request ID = %q %#v %v", requestID, remaining, err)
}
if !readOnlyCommand([]string{"stat", "client"}) || !readOnlyCommand([]string{"storage", "incidents"}) || readOnlyCommand([]string{"run", "client", "echo"}) {
t.Fatal("read-only command classification is incorrect")
}
if _, _, err := globalRequestID([]string{"--request-id", id, "--request-id", id}); err == nil {
t.Fatal("duplicate global request IDs accepted")
}
}