Documentation
¶
Overview ¶
Command webhook-sink is a local alert target that writes down every delivery it accepts, so a UAT rig can grade that a notification was delivered rather than that the daemon said it sent one.
It exists for the #1116 T2 rig, which points permissions.approval_notify at it (#647). The daemon's "approval notification sent" log line is the sender's own claim; this file is the recipient's record, and it is the only one of the two a rig can hold the daemon to. A real Slack channel would prove the same thing to a human and nothing to a script.
webhook-sink --url-file F --out F.jsonl [--addr 127.0.0.1:0] [--bearer-env NAME]
It listens on --addr (default: a free loopback port, so a rig never picks one and never collides), then writes the full hook URL to --url-file. That write is atomic, so a rig polling for the file never reads half a URL. Each accepted POST appends one JSON line to --out: the receive time, the path, the body (as JSON when it parses, else a string) and the request headers minus Authorization.
With --bearer-env, a request must carry "Authorization: Bearer <value of that env var>" or it is refused with 401 and NOT recorded. Without it, any local process could count as a delivery, and the grade would measure the machine rather than the daemon.
SIGINT/SIGTERM shut it down cleanly.