multica/server/cmd/server
LinYushen d41b986cb0
feat(server): distinguish agent vs human CLI actions (#181)
* feat(server): distinguish agent vs human CLI actions via X-Agent-ID/X-Task-ID headers

Extract resolveActor helper in handler to centralize agent identity resolution
from X-Agent-ID header with X-Task-ID cross-validation. Fix DeleteComment,
DeleteIssue, and UpdateComment handlers that previously hardcoded "member" as
actor type. Forward MULTICA_TASK_ID as X-Task-ID header from CLI client.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix(server): add debug logging and test coverage for resolveActor

Add slog.Debug on agent/task validation failures for easier debugging.
Add TestResolveActor with 5 cases covering member fallback, valid agent,
non-existent agent, valid task, and mismatched task.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-30 13:12:59 +08:00
..
activity_listeners.go feat(realtime): WS invalidation + refetch pattern, inbox bugfixes, UI polish 2026-03-29 13:49:40 +08:00
activity_listeners_test.go feat(realtime): WS invalidation + refetch pattern, inbox bugfixes, UI polish 2026-03-29 13:49:40 +08:00
integration_test.go feat(auth): email verification login and personal access tokens 2026-03-26 14:32:30 +08:00
listeners.go feat(realtime): route personal events to target user only 2026-03-29 17:42:50 +08:00
main.go fix(runtime): add server-side sweeper to detect stale runtimes 2026-03-29 14:22:12 +08:00
notification_listeners.go feat(inbox): add priority/due_date notifications, structured details, and hover card 2026-03-29 00:22:17 +08:00
notification_listeners_test.go feat(inbox): scope all inbox queries by workspace_id 2026-03-29 17:42:45 +08:00
router.go feat(server): distinguish agent vs human CLI actions (#181) 2026-03-30 13:12:59 +08:00
runtime_sweeper.go fix(daemon): prevent stuck tasks from blocking queue and add concurrent execution 2026-03-30 03:08:52 +08:00
subscriber_listeners.go feat(notifications): replace hardcoded inbox notifications with subscriber-driven model 2026-03-28 19:33:20 +08:00
subscriber_listeners_test.go feat(notifications): replace hardcoded inbox notifications with subscriber-driven model 2026-03-28 19:33:20 +08:00