Core: cancel moved runs, retry bookkeeping, progress cap, safer classification
- A run whose item leaves In Progress is killed, gets a [worker] cancel comment, frees its terminal slot and serialize group and keeps its thread id; if the kill fails the slot stays taken and the cancel is retried next tick. - Transient retries are the same logical round: they do not count toward max_rounds_per_thread and do not trigger a max-rounds rebuild. - New project setting max_progress_rounds (default 12): after that many consecutive [progress] rounds the item goes to Waiting (answerer) with a note. - retry/rebuild markers are consumed only after the run launched, so a failed start no longer leaves an In Progress item that is never picked again; a rebuild is no longer reported as a retry. - State is saved after every finished round and every launched run. - Failure classification: transient patterns only look at the tail, and an exit-0 failure is logic (never retried) unless the tail shows a transient error. - First-line tag: tolerate BOM and a leading code fence / rule line. - Start comment notes when a handoff summary was attached.
This commit is contained in:
@@ -37,6 +37,13 @@ class PromptTest(unittest.TestCase):
|
||||
self.assertIn("RETRY", p)
|
||||
self.assertNotIn("没有新评论", p)
|
||||
|
||||
def test_new_comment_filter_is_by_id_not_timestamp(self):
|
||||
late_but_old = [{"id": "c9", "created_at": "t0", "comment_html": "<p>clock-skewed reply</p>"},
|
||||
{"id": "c1", "created_at": "t9", "comment_html": "<p>edited old one</p>"}]
|
||||
p = build_prompt("GW-1", ISSUE, late_but_old, {"c1"}, True)
|
||||
self.assertIn("clock-skewed reply", p)
|
||||
self.assertNotIn("edited old one", p)
|
||||
|
||||
def test_handoff(self):
|
||||
rec = {"runs": 3, "tags": ["progress", "progress", "question"], "last_message": "[question] A or B?"}
|
||||
h = handoff_summary(rec, "线程已续 3 轮")
|
||||
|
||||
Reference in New Issue
Block a user