Outbound User-Agent is the hardcoded webhooker/1.0, not the stamped build version #313

Closed
opened 2026-09-21 09:20:20 +02:00 by clawbot · 2 comments
Collaborator

internal/delivery/target_http.go and internal/delivery/target_slack.go both set User-Agent: webhooker/1.0. The binary carries its real version since #253 (script/version, rendered in the UI footer), so a target operator reading their own access log sees a constant that will be wrong on the first release after 1.0 and is already wrong for a dev build.

Definition of done

  • Both targets send webhooker/<version> where <version> is the same value the footer renders; the string is built in one place, not two.
  • User-Agent stays reserved in isReservedTargetHeader and stays overwritten after configured headers are applied.
  • A test asserts the outbound header against the version value.

Model: fable-5-1

`internal/delivery/target_http.go` and `internal/delivery/target_slack.go` both set `User-Agent: webhooker/1.0`. The binary carries its real version since https://git.eeqj.de/sneak/webhooker/issues/253 (`script/version`, rendered in the UI footer), so a target operator reading their own access log sees a constant that will be wrong on the first release after 1.0 and is already wrong for a `dev` build. ## Definition of done - Both targets send `webhooker/<version>` where `<version>` is the same value the footer renders; the string is built in one place, not two. - `User-Agent` stays reserved in `isReservedTargetHeader` and stays overwritten after configured headers are applied. - A test asserts the outbound header against the version value. Model: fable-5-1
clawbot added this to the 1.0.0 milestone 2026-09-21 09:20:20 +02:00
Author
Collaborator

Plan. The issue body is the brief, and the image now stamps its real version (#366). One function builds webhooker/ plus the version the footer shows, and both the http and slack targets call it. User-Agent stays reserved and is still set after configured headers. A test checks the outbound header against the version value.

Model: opus-5-5

Plan. The issue body is the brief, and the image now stamps its real version (https://git.eeqj.de/sneak/webhooker/issues/366). One function builds `webhooker/` plus the version the footer shows, and both the `http` and `slack` targets call it. `User-Agent` stays reserved and is still set after configured headers. A test checks the outbound header against the version value. Model: opus-5-5
Author
Collaborator

#423: the http and slack targets now send webhooker/ followed by the version in Globals, the value the footer shows. One method on the delivery engine builds it for both. User-Agent stays reserved and is still set after the configured headers. A test builds the engine with a known version and checks the header each target sends.

Judgement call: the forwarded-headers test no longer checks User-Agent, because the engines the other tests build have no version. The new test covers the header.

Model: opus-5-5

https://git.eeqj.de/sneak/webhooker/pulls/423: the `http` and `slack` targets now send `webhooker/` followed by the version in `Globals`, the value the footer shows. One method on the delivery engine builds it for both. `User-Agent` stays reserved and is still set after the configured headers. A test builds the engine with a known version and checks the header each target sends. Judgement call: the forwarded-headers test no longer checks `User-Agent`, because the engines the other tests build have no version. The new test covers the header. Model: opus-5-5
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sneak/webhooker#313