MCPcopy Create free account
hub / github.com/PerpetualSoftware/pad / TestExtractItemImplementationNotes

Function TestExtractItemImplementationNotes

internal/models/item_test.go:153–164  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

151}
152
153func TestExtractItemImplementationNotes(t *testing.T) {
154 notes := ExtractItemImplementationNotes(`{"status":"open","implementation_notes":[{"id":"note-1","summary":"Used SSE refresh","details":"Reload phase tasks on visibility resume","created_at":"2026-04-02T15:00:00Z","created_by":"agent"}]}`)
155 if len(notes) != 1 {
156 t.Fatalf("expected 1 implementation note, got %d", len(notes))
157 }
158 if notes[0].Summary != "Used SSE refresh" {
159 t.Fatalf("expected note summary, got %q", notes[0].Summary)
160 }
161 if notes[0].CreatedBy != "agent" {
162 t.Fatalf("expected created_by agent, got %q", notes[0].CreatedBy)
163 }
164}
165
166func TestExtractItemDecisionLog(t *testing.T) {
167 log := ExtractItemDecisionLog(`{"status":"open","decision_log":[{"id":"decision-1","decision":"Use explicit setup state","rationale":"needs_setup was too ambiguous","created_at":"2026-04-02T15:05:00Z","created_by":"user"}]}`)

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected