mirror of
https://github.com/paperclipai/paperclip.git
synced 2026-10-25 17:45:53 +01:00
Migrate the run-recovery/watchdog escalation comments onto the structured
system-notice mechanism the successful-run-handoff notices already use.
- New recovery/stranded-notice.ts: per-family notice seeds (short body +
title + tone) for the no-live-execution-path / workspace-validation /
configuration-incomplete / execution-review-participant families, and
buildStrandedRecoveryEscalationNotice which assembles presentation
{kind: system_notice} plus metadata.sections (Recovery action key_value,
Recovery owner agent_link or board-escalation key_value, Next action,
Source run run_link, Failure code key_value).
- escalateStrandedAssignedIssue posts the structured notice instead of
appending the plain Recovery action/owner/Next action footer; plain
comment callers keep working via fallbackBody + cause-derived titles.
- Escalation dedupe still checks the legacy body marker for old comments
and relies on noticeMetadataReferencesRecoveryAction for new ones.
- heartbeat.ts builders replaced by the shared seeds; inline failure
fragments dropped from bodies (failure code now lives in metadata; raw
error text stays withheld from the thread).
- Shared row helpers extracted to recovery/notice-format.ts.
- Tests: unit coverage for every family seed + escalation notice shape +
metadata dedupe matcher; embedded-Postgres dedupe regressions updated to
assert the structured shape.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>