Implement the log delivery target #70
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Part of the road to 1.0 (see #33).
Decision (@sneak, 2026-08-07): the
databaseandlogtarget types are REQUIRED for 1.0 and must be implemented — not hidden. Offering the UI options is correct; they must do real work by 1.0.deliverLog()(internal/delivery/engine.go) currently only emits a single log line.Definition of done:
logtarget writes a structured log entry for each delivered event (at minimum: event id, webhook/entrypoint, target name, and outcome) and marks the delivery deliveredIf the intended
log-target semantics differ from the above, that is a quick call to confirm — otherwise the structured-line behaviour is the default.(Supersedes the earlier "hide the no-op options" framing, which is rejected per the decision above.)
Do not ship selectable no-op database/log delivery target typesto Implement the log delivery targetImplementation instructions
Confine to
internal/delivery/engine.go(thedeliverLogpath) and a delivery-package test only. Do not touch other packages. Thedatabasearchiving target is tracked separately in #43 — do NOT implement archiving here.logdelivery target. Inspect the currentdeliverLog()inengine.go. Make it write a structured slog entry for each delivered event containing at least: the event id, webhook id, entrypoint id (if available on the task), the target name, and the delivery outcome. Then mark the delivery delivered using the same success bookkeeping the other target types use — mirror howdeliverHTTP/deliverSlackrecord a successful delivery (status and anyDeliveryResult) so the log target is a first-class target rather than a silent no-op.Definition of done:
logtarget emits a structured log line with the fields above and records the delivery as delivered (with aDeliveryResultif that is how the other targets record success)logtarget delivery is marked delivered and produces the expected result/statusGates and process:
make fmt; validate withdocker build .(must exit 0)mainnamedissue-70-log-target; commit subject ends with(closes #70)main) and comment on it with the diff summary and thedocker build .resultFolded into #77 (Refactor delivery targets to a
Targetinterface). Thelogtarget is being reimplemented there aslogTarget, including the full inbound body + headers logging @sneak asked for. Closing as superseded; #77 delivers it.