- stale-case-reminder: wrap http.fetch in try-catch so network errors
log and return instead of crashing the job silently
- weekly-feedback-analysis: wrap agents.invoke in try-catch so CEO
unavailability logs and returns instead of crashing the job
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Replace companies[0] with first company that has a CEO_AGENT_IDS entry,
so the job doesn't silently skip if the list order is non-deterministic
- Change reason to "weekly-feedback-job" to match the CEO routing condition
added in legal-ceo.md (was "weekly-feedback-analysis scheduled job")
- decision-lessons.md is shared between companies so one CEO invocation suffices
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Prevent duplicate comments on rapid Paperclip retries:
- Check plugin instance state for requestId before processing
- Skip if same requestId was seen within 5 minutes
- Store requestId with ISO timestamp after first successful delivery
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-17 10:52:12 +00:00
2 changed files with 56 additions and 16 deletions
`weekly-feedback-analysis: no CEO agent for company ${company.id}`,
"weekly-feedback-analysis: no company has a mapped CEO agent — skipping",
);
);
return;
return;
}
}
const{company,ceoId}=mapped[0];
try{
awaitctx.agents.invoke(ceoId,company.id,{
awaitctx.agents.invoke(ceoId,company.id,{
prompt:`ניתוח פידבק שבועי יו"ר (${data.entry_count} פריטים):\n\n${data.summary}\n\nהמשימה: עדכן את /home/chaim/legal-ai/docs/legal-decision-lessons.md עם הלקחים החדשים שעולים מהפידבק. הוסף רק לקחים חדשים שלא קיימים כבר. קבץ לפי נושא.`,
prompt:`ניתוח פידבק שבועי יו"ר (${data.entry_count} פריטים):\n\n${data.summary}\n\nהמשימה: עדכן את /home/chaim/legal-ai/docs/legal-decision-lessons.md עם הלקחים החדשים שעולים מהפידבק. הוסף רק לקחים חדשים שלא קיימים כבר. קבץ לפי נושא.`,
reason:"weekly-feedback-analysis scheduled job",
reason:"weekly-feedback-job",
});
});
ctx.logger.info(
ctx.logger.info(
`weekly-feedback-analysis: invoked CEO ${ceoId} with ${data.entry_count} feedback entries`,
`weekly-feedback-analysis: invoked CEO ${ceoId} (company ${company.id}) with ${data.entry_count} feedback entries`,
);
);
}catch(err){
ctx.logger.error("weekly-feedback-analysis: failed to invoke CEO",{
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.