mirror of
https://github.com/rcourtman/Pulse.git
synced 2026-09-10 02:25:56 +00:00
Migrate committed release visual evidence
Carry an explicit model-selection decision in every existing visual sidecar and enforce that invariant for future packets after the visual-plan schema became evidence-bearing.
This commit is contained in:
@@ -69,7 +69,8 @@ Canonical publish triggers rerun visual evidence discovery and selection for the
|
||||
exact notes and comparison range being dispatched. A committed visual sidecar is
|
||||
review material only and cannot substitute for that run. The model may still
|
||||
select zero captures when its investigation finds that screenshots add no
|
||||
meaningful customer value.
|
||||
meaningful customer value. Committed sidecars remain schema-valid review
|
||||
records and retain the evidence-backed reason for selecting captures or none.
|
||||
|
||||
Customer-facing notes use one outcome list for features and fixes. Each visible
|
||||
change is described once under `What's improved`; a parallel `Fixes` section is
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
{
|
||||
"schema_version": 1,
|
||||
"decision": "The inline View preferences and mobile Settings workspace are the clearest static demonstrations of this candidate's visible workflow improvements.",
|
||||
"captures": [
|
||||
{
|
||||
"id": "inline-view-preferences",
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
{
|
||||
"schema_version": 1,
|
||||
"decision": "The updater fallback and provider normalization corrections do not have a meaningful deterministic static UI comparison.",
|
||||
"captures": []
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
{
|
||||
"schema_version": 1,
|
||||
"decision": "The Docker daemon cadence and host-agent identity corrections do not have a meaningful deterministic static UI comparison.",
|
||||
"captures": []
|
||||
}
|
||||
|
||||
@@ -7,6 +7,7 @@ import (
|
||||
"crypto/rand"
|
||||
"crypto/sha256"
|
||||
"encoding/base64"
|
||||
"encoding/json"
|
||||
"os"
|
||||
"os/exec"
|
||||
"path/filepath"
|
||||
@@ -3240,6 +3241,33 @@ func TestReleaseTriggersReevaluateVisualsInsteadOfTrustingSidecars(t *testing.T)
|
||||
}
|
||||
}
|
||||
|
||||
func TestCommittedReleaseVisualSidecarsCarrySelectionEvidence(t *testing.T) {
|
||||
paths, err := filepath.Glob(repoFile("docs", "releases", "*.visuals.json"))
|
||||
if err != nil {
|
||||
t.Fatalf("glob release visual sidecars: %v", err)
|
||||
}
|
||||
if len(paths) == 0 {
|
||||
t.Fatal("no committed release visual sidecars found")
|
||||
}
|
||||
for _, path := range paths {
|
||||
content, err := os.ReadFile(path)
|
||||
if err != nil {
|
||||
t.Fatalf("read %s: %v", path, err)
|
||||
}
|
||||
var plan struct {
|
||||
SchemaVersion int `json:"schema_version"`
|
||||
Decision string `json:"decision"`
|
||||
Captures json.RawMessage `json:"captures"`
|
||||
}
|
||||
if err := json.Unmarshal(content, &plan); err != nil {
|
||||
t.Fatalf("parse %s: %v", path, err)
|
||||
}
|
||||
if plan.SchemaVersion != 1 || strings.TrimSpace(plan.Decision) == "" || len(plan.Captures) == 0 {
|
||||
t.Fatalf("%s must carry schema version, visual selection evidence, and a captures decision", path)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func assertFileContainsAllNormalized(t *testing.T, path string, required ...string) {
|
||||
t.Helper()
|
||||
content, err := os.ReadFile(path)
|
||||
|
||||
Reference in New Issue
Block a user