fix(harness): JSON-safe SLO state, unscored AI errors, mark recorded-only proposals executed
This commit is contained in:
1 parent
5daf13b669
commit
de076a79e4
4 files changed
+45
-36
No files matched your search
+4
-1
@@ -14,7 +14,7 @@ import (
|
||||
// human-only (layer 3) action that the harness records but does not perform.
|
||||
type CatalogEntry struct {
|
||||
ActionID string `json:"action_id"`
|
||||
SLOImpact string `json:"slo_impact"` // small | large
|
||||
SLOImpact string `json:"slo_impact"` // small | large
|
||||
Reversible bool `json:"reversible"`
|
||||
Layer string `json:"layer"`
|
||||
Exec bool `json:"harness_executes"`
|
||||
@@ -92,6 +92,9 @@ func (a *App) handleActionExecute(w http.ResponseWriter, r *http.Request) {
|
||||
if !ce.Exec {
|
||||
a.store.Event(ctx, runID, sid, "action", actor, map[string]any{"action_id": req.ActionID, "target": req.Target, "recorded_only": true, "note": req.Note, "layer": ce.Layer})
|
||||
mActs.WithLabelValues(req.ActionID, actor, "recorded").Inc()
|
||||
if actor == "ai-approved" {
|
||||
_ = a.store.MarkProposalExecuted(ctx, req.Token)
|
||||
}
|
||||
writeJSON(w, 202, map[string]any{"action_id": req.ActionID, "recorded_only": true, "layer": ce.Layer, "note": "not executed by the harness (platform-internal or human-only); recorded in events"})
|
||||
return
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user