Forgejo: trigger on comments on agent-opened issues/PRs #84

Merged
lucas merged 1 commit from agent/issue-82-agent-artifact-trigger into main 2026-10-26 15:41:19 +01:00
Collaborator

Implements the plan in #82.

  • detectAddressed takes a required opening (the description as entry id 0). The quoted-reply and follows-agent rules now run over [opening, ...thread], so a first comment that replies to an agent-written description (the PR #79 case) is detected as follows-agent.
  • New soft reason agent-artifact: if no hard rule matched and the agent wrote the opening post, the comment still triggers. The seed then adds a line telling the agent to decide from context and to end the turn without posting if the comment isn't for it. Edits never use the new rules.
  • The dispatcher's detect() builds opening from payload.issue. job.thread still holds only the real comments.
  • The implementer policy gets the "not addressed to you → end without posting" rule.

I skipped the optional issueBody helper in the dispatcher tests, because none of the new tests use it.

Checks: bun test src/forgejo src/bridge passed (717 tests) and bun run typecheck passed, both run in apps/server.

Closes: #82

Implements the plan in #82. - `detectAddressed` takes a required `opening` (the description as entry id 0). The quoted-reply and follows-agent rules now run over `[opening, ...thread]`, so a first comment that replies to an agent-written description (the PR #79 case) is detected as `follows-agent`. - New soft reason `agent-artifact`: if no hard rule matched and the agent wrote the opening post, the comment still triggers. The seed then adds a line telling the agent to decide from context and to end the turn without posting if the comment isn't for it. Edits never use the new rules. - The dispatcher's `detect()` builds `opening` from `payload.issue`. `job.thread` still holds only the real comments. - The implementer policy gets the "not addressed to you → end without posting" rule. I skipped the optional `issueBody` helper in the dispatcher tests, because none of the new tests use it. Checks: `bun test src/forgejo src/bridge` passed (717 tests) and `bun run typecheck` passed, both run in `apps/server`. Closes: #82
Treat the issue/PR description as conversation entry 0 so replies to
and quotes of an agent-written description match follows-agent and
quoted-reply. Add a soft "agent-artifact" trigger for any other new
comment on an artifact the agent opened; its seed tells the agent to
decide from context and end without posting if it isn't addressed.

Implementer sessions now get the "end the turn if not addressed" rule.

Co-Authored-By: Claude Opus 5.5 via omp-deck
lucas approved these changes 2026-10-26 15:41:14 +01:00
lucas merged commit f1feacc107 into main 2026-10-26 15:41:19 +01:00
lucas deleted branch agent/issue-82-agent-artifact-trigger 2026-10-26 15:41:19 +01:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
lucas/omp-deck!84
No description provided.