docs(prd-6): mark M5 complete — assignee trigger validated

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Vlad MocanuandClaude Opus 4.6 committed 2026-02-26 10:49:39 +02:00
1 parent 99624efacc
commit 8754cc0181
1 file changed
+12 -5
+12 -5
View File
@@ -79,12 +79,17 @@ Systematically exercise each untested scenario on the live Forgejo instance (git
3. `baa007a`: Forgejo sends `label_updated` instead of `labeled` as `eventAction` for issue label events. Added `FORGEJO_EVENT_ACTION_MAP` in `context.ts` to normalize at parse time (same pattern as event name normalization). 3. `baa007a`: Forgejo sends `label_updated` instead of `labeled` as `eventAction` for issue label events. Added `FORGEJO_EVENT_ACTION_MAP` in `context.ts` to normalize at parse time (same pattern as event name normalization).
- **Key learning**: Forgejo's `issues` event action names differ from GitHub — `label_updated` not `labeled`. Normalize in `context.ts` at parse time so all downstream code works unchanged. Creating an issue with a label fires both `opened` and `label_updated` as separate events — do NOT check labels on `opened` to avoid duplicate runs. - **Key learning**: Forgejo's `issues` event action names differ from GitHub — `label_updated` not `labeled`. Normalize in `context.ts` at parse time so all downstream code works unchanged. Creating an issue with a label fires both `opened` and `label_updated` as separate events — do NOT check labels on `opened` to avoid duplicate runs.
- [ ] **M5: Test assignee trigger** - [x] **M5: Test assignee trigger**
- Assign a user to an issue to trigger the action - Created test issue #20, assigned `claude` user via API ✓
- Verify: trigger detection, context fetching, Claude response - Verify: trigger detection, context fetching, Claude response ✓
- Document any issues and fix them - Document any issues and fix them ✓ (1 bug found and fixed, see below)
- **Validation**: Claude responds when assigned to an issue - **Validation**: Claude responds when assigned to an issue ✓ (run 52842, 2 turns, $0.09)
- **Bug found & fixed**:
1. `99624ef`: Forgejo's `issues/assigned` webhook payload lacks the top-level `assignee` object — `payload.assignee` is `undefined`. The assignee is only available at `payload.issue.assignee`. Added fallback in `trigger.ts` to check `issue.assignee.login` when `payload.assignee.login` is missing.
- **Also discovered**: Forgejo sends `assigned` as the event action (matching GitHub) — no normalization needed, unlike M4's `label_updated`.
- **Also discovered**: Forgejo's API `PATCH /issues/{index}` with `{"assignees": ["user"]}` (plural array) returns 404. Must use deprecated singular `{"assignee": "user"}` field instead.
- **Key learning**: On Forgejo, the `issues/assigned` webhook payload structure differs from GitHub — the assigned user is nested under `issue.assignee`, not at the top-level `assignee` field. Same pattern as M2's missing top-level `comment` object.
- [ ] **M6: Test tag mode with code changes (branch creation)** - [ ] **M6: Test tag mode with code changes (branch creation)**
@@ -119,6 +124,8 @@ Systematically exercise each untested scenario on the live Forgejo instance (git
| Workflow if: expression parser rejects # comments | RESOLVED: moved comments outside if: block, use >- scalar | | Workflow if: expression parser rejects # comments | RESOLVED: moved comments outside if: block, use >- scalar |
| Forgejo event action names differ from GitHub | RESOLVED: FORGEJO_EVENT_ACTION_MAP normalizes at parse time | | Forgejo event action names differ from GitHub | RESOLVED: FORGEJO_EVENT_ACTION_MAP normalizes at parse time |
| Creating issue with label fires duplicate runs | RESOLVED: label check only on labeled event, not on opened | | Creating issue with label fires duplicate runs | RESOLVED: label check only on labeled event, not on opened |
| Forgejo assigned payload lacks top-level assignee | RESOLVED: fallback to issue.assignee.login in trigger.ts |
| Forgejo API assignees array field returns 404 | RESOLVED: use deprecated singular assignee field instead |
## Success Criteria ## Success Criteria