fix: record pre-run newest comment id for reply dedup
ci / lint (push) Skipped
ci / lint (push) Skipped
This commit is contained in:
@@ -26,3 +26,9 @@ jq -rs '
|
||||
"### comment by \($who):\n\(.body | gsub("\\s*<!-- 🤖 agent reply — do not trigger -->"; ""))\n"' \
|
||||
/tmp/thread_pages.json > /tmp/thread.md 2>/dev/null || : > /tmp/thread.md
|
||||
echo "thread comments fetched: $(grep -c '^### comment by ' /tmp/thread.md 2>/dev/null || echo 0) (newest 100 kept)"
|
||||
|
||||
# Record the newest comment id on the thread BEFORE the agent runs. publish.sh compares against
|
||||
# it to detect an agent that self-posted its reply mid-run (via the gitea-api skill, despite the
|
||||
# prompt telling it not to) and skips the duplicate framework reply. Ids are monotonic — no dates.
|
||||
jq -rs '[ (add // [])[].id ] | max // 0' /tmp/thread_pages.json > /tmp/thread_max_cid 2>/dev/null || echo 0 > /tmp/thread_max_cid
|
||||
echo "pre-run newest comment id: $(cat /tmp/thread_max_cid)"
|
||||
|
||||
Reference in New Issue
Block a user