You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Port simplicio-loop's run journal (scripts/loop_journal.py) to the piece pipeline: durable attempt memory per piece/campaign plus a stall detector, so when a piece keeps failing the same gate the loop changes strategy (new hook/angle, different provider via the routing matrix, different format, or escalate to human) instead of regenerating the same failing output forever.
Stall detection: N consecutive failures on the same gate with the same failure signature → the loop must not retry the same strategy; it must pick an untried one from a strategy ladder or route the piece to review with the journal attached.
Strategy ladder is declarative (e.g. rewrite-hook → change-format → change-provider → human-review) and provider-agnostic — switches go through lib/router.ts, never name a vendor.
E2E test: a mocked piece failing compliance 3× with the same violation triggers a strategy switch (visible in the journal) instead of a 4th identical retry.
E2E test: exhausted ladder routes the piece to human review with blocked status — never silently drops it or fake-passes.
Journal survives process restart (durable on disk, resume picks up attempt count).
selftest covers signature hashing and stall threshold logic.
Parent epic: #64
Goal
Port
simplicio-loop's run journal (scripts/loop_journal.py) to the piece pipeline: durable attempt memory per piece/campaign plus a stall detector, so when a piece keeps failing the same gate the loop changes strategy (new hook/angle, different provider via the routing matrix, different format, or escalate to human) instead of regenerating the same failing output forever.Scope
outputs/<client>/<date>/<piece-id>/journal.jsonl): attempt number, stage (copy/creative/critic/compliance/watcher-gate/tech-specs), gate result, failure signature, strategy used, provider resolved, cost estimate.reviewwith the journal attached.lib/router.ts, never name a vendor.data/runs.jsonlaggregation and the learnings lane (Analytics: score organic performance across social, Reddit, forums, and dev portals #54 replay,lib/promotion/learnings.ts).Acceptance criteria
blockedstatus — never silently drops it or fake-passes.selftestcovers signature hashing and stall threshold logic.