feat: add execution history queries and preserve bounded JSON payloads

This commit is contained in:
2026-09-17 14:55:23 +08:00
parent da123bba69
commit 4d4b2e9f7d
32 changed files with 1461 additions and 28 deletions

View File

@@ -17,6 +17,7 @@ import (
"git.yuntuo.hk/k2safe/orbit/internal/fault"
"git.yuntuo.hk/k2safe/orbit/internal/jsonvalue"
"git.yuntuo.hk/k2safe/orbit/internal/jsonwire"
core "git.yuntuo.hk/k2safe/orbit/model"
"git.yuntuo.hk/k2safe/orbit/platform/auth"
pulse "git.yuntuo.hk/k2safe/orbit/pulse/model"
@@ -149,7 +150,7 @@ func wrap(next endpoint) http.HandlerFunc {
}
}
func writeJSON(w http.ResponseWriter, status int, body any) {
raw, err := json.Marshal(body)
raw, err := jsonwire.Marshal(body)
if err != nil {
status = 503
raw = []byte(`{"error":{"code":"UNAVAILABLE","message":"operation unavailable"}}`)