feat: implement webhookd core - #6
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this PR does
Implements the webhookd core: a single-binary Go program that listens for webhook HTTP requests, verifies their signatures via a pluggable provider interface, and streams one JSONL line per verified event to stdout. Includes the provider interface and registry, the HTTP server and request handler, the normalized
Eventoutput struct with JSONL and pretty writers, themockreference provider, config resolution (flag → env → default), the cobra CLI, and the build/release tooling (Makefile, Dockerfile, goreleaser config, golangci config). No real provider (github,stripe,slack,shopify) is included — those are separate PRs against this frozen core.Related issue
Closes #
Type
mockprovider ships with the core; no real provider is added)How I tested it
Build and test:
Manual smoke test (the five-minute demo from README.md):
stdout: exactly one JSONL line, in the shape specified by
docs/webhookd-core.md§"Normalized Output Shape".stderr: exactly one line (the startup banner), matching
docs/webhookd-core.md§"Diagnostic formats".What is not verified in CI yet:
golangci-lint run ./...— the linter is not installed in this environment. ThelintandcheckMakefile targets will fail on a machine without it.make check— it chainsfmt vet lint testand will fail on thelintstep for the same reason.docker build— Docker is not installed in this environment.goreleaser release --snapshot— goreleaser is not installed;goreleaser checkwas run and passed after a migration off deprecated keys.Provider PRs only
Skip this section — this is not a real-provider PR. The
mockprovider does not need adocs/providers/mock.mdbecause it is a reference implementation, not a production integration. Leaving this section unchecked.General checklist
make checkpasses locally with no errors→ cannot be checked.
golangci-lintandgoimportsare notinstalled in this environment.
make test,make build, andmake vetall pass.make checkfails only on thelintstep.feat:,fix:,docs:,test:,refactor:,chore:,ci:)