@senior: One comment per agent run #39

Merged
ffaerber merged 1 commits from ai/issue-38 into main 2026-07-04 10:55:39 +02:00

Summary

Consolidated publish.sh so each agent run posts exactly one comment instead of multiple. The activity log (tool calls & reasoning) and the sub-issues-created list are now appended to the single reply comment rather than posted as separate comments, fixing the noise of multiple comments per run (issue #38).

Changes

  • Dev agents: activity log inlined into the PR reply comment (all three exit paths: normal PR, no-changes, PR-open-failed)
  • Comment-only roles (pm): sub-issues-created list inlined into the reply comment instead of a second post
  • Removed the duplicate separate activity-log comment post

Resolves #38 · 🤖 @senior

## Summary Consolidated `publish.sh` so each agent run posts exactly one comment instead of multiple. The activity log (tool calls & reasoning) and the sub-issues-created list are now appended to the single reply comment rather than posted as separate comments, fixing the noise of multiple comments per run (issue #38). ## Changes - Dev agents: activity log inlined into the PR reply comment (all three exit paths: normal PR, no-changes, PR-open-failed) - Comment-only roles (pm): sub-issues-created list inlined into the reply comment instead of a second post - Removed the duplicate separate activity-log comment post --- Resolves #38 · 🤖 @senior
gitea-actions bot added 1 commit 2026-07-04 10:43:22 +02:00
Merge the activity-log comment into the main reply comment and merge the
sub-issues-created comment into the pm reply, so each agent run posts
exactly one comment (reply + tool calls & reasoning inline).

🤖 @senior PR ready for review — @ffaerber please review & merge:

🤖 **@senior** — ✅ PR ready for review — @ffaerber please review & merge: - https://git.ffaerber.duckdns.org/ffaerber/agents/pulls/39

🤖 @senior — activity log (61 entries):

tool calls & reasoning

🔧 bash: cat /workspace/ffaerber/agents/AGENTS.md
🔧 bash: ls -la /workspace/ffaerber/agents/ && git -C /workspace/ffaerber/agents log --oneline -10
🔧 bash: git -C /workspace/ffaerber/agents branch --show-current && git -C /workspace/ffaerber/agents status
🔧 bash: find /workspace/ffaerber/agents/.gitea -type f | head -50 && echo "---" && find /workspace/ffaerber/agents/.agents-workflow -type f | head -50
🔧 read: .gitea/workflows/agent.yml
🔧 read: .gitea/workflows/scripts/publish.sh
🔧 read: .gitea/workflows/scripts/build-activity-log.sh
🔧 read: .gitea/workflows/scripts/run-agent.sh
🔧 read: .gitea/workflows/scripts/route.sh
🔧 todowrite: 3 todos
💬 Now I understand the structure. The issue is that publish.sh posts multiple comments per run:

  • For dev agents (pr mode): one "PR ready"/"updated" comment + a separate activity-log comment (lines 162-175)
  • For pm with subtasks: one reply comment + one sub-issues-created comment (lines 42 & 78)

Let me consolidate these into a single comment per run.
🔧 edit: .gitea/workflows/scripts/publish.sh
💬 Now let me edit publish.sh to consolidate into a single comment per run. The dev-agent path posts: (1) the PR ready/updated comment, and (2) a separate activity log comment. I'll merge them into one.
🔧 todowrite: 2 todos
🔧 read: .gitea/workflows/scripts/publish.sh
💬 Now the pm/comment-mode path. It posts a reply (line 42), then potentially a sub-issues-created comment (line 78). I'll defer the first post until after subtask processing so we can include everything in one.
🔧 edit: .gitea/workflows/scripts/publish.sh
💬 Now I'll consolidate the comment-mode path. The reply post at line 42 should be deferred so that if subtasks are created, everything goes in one comment. The delegation comment (lines 83-97) is a separate trigger — it's an instruction to another agent, not part of the reply, so it stays separate (and it's a different workflow trigger, not really "noise"). The maintainer's issue says "one comment per run" — the delegation trigger is a separate intentional action. Let me focus on merging the reply + subtasks-created.
🔧 bash: bash -n /workspace/ffaerber/agents/.gitea/workflows/scripts/publish.sh && echo "syntax OK"
💬 Now let me also check the "no changes on branch" path for dev agents (line ~133) — that posts a single reply, which is fine. Let me verify the full file and run a syntax check.
🔧 read: .gitea/workflows/scripts/publish.sh
🔧 read: .gitea/workflows/scripts/publish.sh
💬 Now let me also check the dev-agent "no changes on branch" path (line ~133):
🔧 read: .gitea/workflows/scripts/publish.sh
💬 The "no changes on branch" path (line 134-137) and the fallback (line 154) both post a reply but skip the activity log since it's computed later. Let me move the activity-log computation earlier so it's available for all dev-agent paths.
🔧 edit: .gitea/workflows/scripts/publish.sh
💬 I'll move the activity-log computation up to right after owner= so it's available for the "no changes" and fallback paths too, ensuring every dev-agent path includes it in a single comment.
🔧 edit: .gitea/workflows/scripts/publish.sh
🔧 edit: .gitea/workflows/scripts/publish.sh
💬 Now remove the duplicate activity-log computation at the bottom:
🔧 bash: bash -n /workspace/ffaerber/agents/.gitea/workflows/scripts/publish.sh && echo "syntax OK"
🔧 read: .gitea/workflows/scripts/publish.sh
🔧 bash: cd /workspace/ffaerber/agents && git diff --stat && echo "---" && git diff
💬 All good. Now let me verify the whole flow once more, then commit and push.
🔧 todowrite: 1 todos
💬 Diff looks clean. Now commit and push.
🔧 bash: `cd /workspace/ffaerber/agents && git add -A && git commit -m "feat(publish): one comment per agent run (issue #38)

Merge the activity-log comment into the main reply comment and merge the
sub-issues-created comment into the pm reply, so ea…🔧 **todowrite**:{"todos":"[{"content":Consolidate dev-agent (pr mode) PR comment + activity log into one comment","priority":"high","status":"completed"},{"content\…💬 Pushed toai/issue-38`. The PR is created automatically per the repo conventions.

Implemented one-comment-per-run in publish.sh:

  • Dev agents (pr mode): merged the separate activity-log comment into the single PR reply comment (appended under a --- divider). All three dev-agent exit paths (normal PR, no-changes, PR-open-failed) now append it.
  • Comment-only roles (pm): merged the sub-issues-created comment into the main reply comment (appended under a --- divider) instead of posting two separate comments.

The auto-delegation trigger (a separate @target please proceed… comment that fires a new workflow run) is intentionally left separate — it's an intentional cross-agent trigger, not reply noise.

BEGIN_PR_DESCRIPTION

Summary

Consolidated publish.sh so each agent run posts exactly one comment instead of multiple. The activity log (tool calls & reasoning) and the sub-issues-created list are now appended to the single reply comment rather than posted as separate comments, fixing the noise of multiple comments per run (issue #38).

Changes

  • Dev agents: activity log inlined into the PR reply comment (all three exit paths: normal PR, no-changes, PR-open-failed)
  • Comment-only roles (pm): sub-issues-created list inlined into the reply comment instead of a second post
  • Removed the duplicate separate activity-log comment post
    END_PR_DESCRIPTION
🤖 **@senior** — activity log (61 entries): <details> <summary>tool calls & reasoning</summary> 🔧 **bash**: `cat /workspace/ffaerber/agents/AGENTS.md` 🔧 **bash**: `ls -la /workspace/ffaerber/agents/ && git -C /workspace/ffaerber/agents log --oneline -10` 🔧 **bash**: `git -C /workspace/ffaerber/agents branch --show-current && git -C /workspace/ffaerber/agents status` 🔧 **bash**: `find /workspace/ffaerber/agents/.gitea -type f | head -50 && echo "---" && find /workspace/ffaerber/agents/.agents-workflow -type f | head -50` 🔧 **read**: `.gitea/workflows/agent.yml` 🔧 **read**: `.gitea/workflows/scripts/publish.sh` 🔧 **read**: `.gitea/workflows/scripts/build-activity-log.sh` 🔧 **read**: `.gitea/workflows/scripts/run-agent.sh` 🔧 **read**: `.gitea/workflows/scripts/route.sh` 🔧 **todowrite**: `3 todos` 💬 Now I understand the structure. The issue is that `publish.sh` posts **multiple comments per run**: - For dev agents (pr mode): one "PR ready"/"updated" comment + a separate activity-log comment (lines 162-175) - For pm with subtasks: one reply comment + one sub-issues-created comment (lines 42 & 78) Let me consolidate these into a single comment per run. 🔧 **edit**: `.gitea/workflows/scripts/publish.sh` 💬 Now let me edit `publish.sh` to consolidate into a single comment per run. The dev-agent path posts: (1) the PR ready/updated comment, and (2) a separate activity log comment. I'll merge them into one. 🔧 **todowrite**: `2 todos` 🔧 **read**: `.gitea/workflows/scripts/publish.sh` 💬 Now the pm/comment-mode path. It posts a reply (line 42), then potentially a sub-issues-created comment (line 78). I'll defer the first post until after subtask processing so we can include everything in one. 🔧 **edit**: `.gitea/workflows/scripts/publish.sh` 💬 Now I'll consolidate the comment-mode path. The reply post at line 42 should be deferred so that if subtasks are created, everything goes in one comment. The delegation comment (lines 83-97) is a separate trigger — it's an instruction to another agent, not part of the reply, so it stays separate (and it's a different workflow trigger, not really "noise"). The maintainer's issue says "one comment per run" — the delegation trigger is a separate intentional action. Let me focus on merging the reply + subtasks-created. 🔧 **bash**: `bash -n /workspace/ffaerber/agents/.gitea/workflows/scripts/publish.sh && echo "syntax OK"` 💬 Now let me also check the "no changes on branch" path for dev agents (line ~133) — that posts a single reply, which is fine. Let me verify the full file and run a syntax check. 🔧 **read**: `.gitea/workflows/scripts/publish.sh` 🔧 **read**: `.gitea/workflows/scripts/publish.sh` 💬 Now let me also check the dev-agent "no changes on branch" path (line ~133): 🔧 **read**: `.gitea/workflows/scripts/publish.sh` 💬 The "no changes on branch" path (line 134-137) and the fallback (line 154) both post a reply but skip the activity log since it's computed later. Let me move the activity-log computation earlier so it's available for all dev-agent paths. 🔧 **edit**: `.gitea/workflows/scripts/publish.sh` 💬 I'll move the activity-log computation up to right after `owner=` so it's available for the "no changes" and fallback paths too, ensuring every dev-agent path includes it in a single comment. 🔧 **edit**: `.gitea/workflows/scripts/publish.sh` 🔧 **edit**: `.gitea/workflows/scripts/publish.sh` 💬 Now remove the duplicate activity-log computation at the bottom: 🔧 **bash**: `bash -n /workspace/ffaerber/agents/.gitea/workflows/scripts/publish.sh && echo "syntax OK"` 🔧 **read**: `.gitea/workflows/scripts/publish.sh` 🔧 **bash**: `cd /workspace/ffaerber/agents && git diff --stat && echo "---" && git diff` 💬 All good. Now let me verify the whole flow once more, then commit and push. 🔧 **todowrite**: `1 todos` 💬 Diff looks clean. Now commit and push. 🔧 **bash**: `cd /workspace/ffaerber/agents && git add -A && git commit -m "feat(publish): one comment per agent run (issue #38) Merge the activity-log comment into the main reply comment and merge the sub-issues-created comment into the pm reply, so ea…` 🔧 **todowrite**: `{"todos":"[{\"content\":Consolidate dev-agent (pr mode) PR comment + activity log into one comment\",\"priority\":\"high\",\"status\":\"completed\"},{\"content\…` 💬 Pushed to `ai/issue-38`. The PR is created automatically per the repo conventions. Implemented one-comment-per-run in `publish.sh`: - **Dev agents (pr mode):** merged the separate activity-log comment into the single PR reply comment (appended under a `---` divider). All three dev-agent exit paths (normal PR, no-changes, PR-open-failed) now append it. - **Comment-only roles (pm):** merged the sub-issues-created comment into the main reply comment (appended under a `---` divider) instead of posting two separate comments. The auto-delegation trigger (a separate `@target please proceed…` comment that fires a new workflow run) is intentionally left separate — it's an intentional cross-agent trigger, not reply noise. BEGIN_PR_DESCRIPTION ## Summary Consolidated `publish.sh` so each agent run posts exactly one comment instead of multiple. The activity log (tool calls & reasoning) and the sub-issues-created list are now appended to the single reply comment rather than posted as separate comments, fixing the noise of multiple comments per run (issue #38). ## Changes - Dev agents: activity log inlined into the PR reply comment (all three exit paths: normal PR, no-changes, PR-open-failed) - Comment-only roles (pm): sub-issues-created list inlined into the reply comment instead of a second post - Removed the duplicate separate activity-log comment post END_PR_DESCRIPTION </details>
ffaerber merged commit 4ed96dcdf2 into main 2026-07-04 10:55:39 +02:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: gitea/agents#39