Declarative action chains: endpoint action config is hardcoded in main.py #6

Closed
opened 2026-05-22 22:03:53 +00:00 by Mark · 2 comments
Owner

The design spec (section 6) defines endpoints as having a declarative action chain per event type:

events:
  issues.opened:
    actions:
      - matrix_post
      - dispatch: forgejo-event-logger.sh

Currently, main.py hardcodes the action chain:

  1. Matrix poster is appended unconditionally for every endpoint
  2. Worker dispatch is only wired for source == forgejo
  3. Generic endpoints (Vikunja, etc.) only get Matrix posting
  4. Endpoint config cannot declare which actions should fire

What needs to change:

  • EndpointConfig.events should accept an actions list per event mapping
  • The daemon's endpoint loop should parse actions (matrix_post, dispatch: script, log, etc.) from config instead of hardcoding callbacks
  • Forgejo and Vikunja endpoints should use the same code path
  • Each action runs independently - one failure doesn't block the chain

This is the gap between the current hardcoded implementation and the spec-defined unified endpoint pattern.

The design spec (section 6) defines endpoints as having a declarative action chain per event type: ```yaml events: issues.opened: actions: - matrix_post - dispatch: forgejo-event-logger.sh ``` Currently, main.py hardcodes the action chain: 1. Matrix poster is appended unconditionally for every endpoint 2. Worker dispatch is only wired for source == `forgejo` 3. Generic endpoints (Vikunja, etc.) only get Matrix posting 4. Endpoint config cannot declare which actions should fire What needs to change: - `EndpointConfig.events` should accept an `actions` list per event mapping - The daemon's endpoint loop should parse actions (matrix_post, dispatch: script, log, etc.) from config instead of hardcoding callbacks - Forgejo and Vikunja endpoints should use the same code path - Each action runs independently - one failure doesn't block the chain This is the gap between the current hardcoded implementation and the spec-defined unified endpoint pattern.
Author
Owner

test comment via POST — ignore

test comment via POST — ignore
Author
Owner

Fixed in commit. Closing.

Fixed in commit. Closing.
Mark closed this issue 2026-05-23 07:05:14 +00:00
Sign in to join this conversation.
No description provided.