fix(forgejo): handle issue-body mentions and all bot aliases #21

Merged
codetether-bot merged 1 commit from fix/issue-body-mentions-and-aliases into main 2026-07-29 19:31:28 +00:00
Collaborator

Issue #4820 was filed with @codetether handle this issue in the body and the bot never responded.

Three defects:

  1. Issue-body mentions were dropped. Filing an issue delivers issues/opened, but _context returned None for anything except issue_comment. Now handled.
  2. Aliases matched by substring. @codetether-bot matched the shorter codetether slug, leaving -bot in the text intent parsing saw. Mentions are now matched on word boundaries, and @codetether, @codetether-bot, and @codetether-agent are all recognized (extendable via CODETETHER_BOT_ALIASES). @codetethering and codetether@example.com correctly do not match.
  3. session_id was silently discarded. TaskReleaseRequest did not declare the field workers send, so Pydantic dropped it and no task ever recorded a session — which is why the Forgejo "Session transcript" panel could never resolve a transcript. It is now declared and persisted.

The self-authored guard covers every alias, but only inspects the author of the current event: the bot owns some repositories, so a human comment on a bot-opened issue is still real input.

Also enabled the issues event on system hook 8 and repo hook 2 (verified issues_on = true).

Validation: 84 tests pass.

Issue #4820 was filed with `@codetether handle this issue` in the **body** and the bot never responded. Three defects: 1. **Issue-body mentions were dropped.** Filing an issue delivers `issues`/`opened`, but `_context` returned `None` for anything except `issue_comment`. Now handled. 2. **Aliases matched by substring.** `@codetether-bot` matched the shorter `codetether` slug, leaving `-bot` in the text intent parsing saw. Mentions are now matched on word boundaries, and `@codetether`, `@codetether-bot`, and `@codetether-agent` are all recognized (extendable via `CODETETHER_BOT_ALIASES`). `@codetethering` and `codetether@example.com` correctly do not match. 3. **`session_id` was silently discarded.** `TaskReleaseRequest` did not declare the field workers send, so Pydantic dropped it and no task ever recorded a session — which is why the Forgejo "Session transcript" panel could never resolve a transcript. It is now declared and persisted. The self-authored guard covers every alias, but only inspects the author of the current event: the bot owns some repositories, so a human comment on a bot-opened issue is still real input. Also enabled the `issues` event on system hook 8 and repo hook 2 (verified `issues_on = true`). Validation: 84 tests pass.
fix(forgejo): handle issue-body mentions and all bot aliases
Some checks failed
Validate CodeTether Pull Request / validate (pull_request) Failing after 4m12s
15762f2afd
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
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
riley/codetether!21
No description provided.