feat(webhooks): docs + benchmark + finish package wiring (#190)#194
Merged
Conversation
Wrap the webhook epic with the consumer-facing surfaces, and finish the runtime wiring the prior sub-issues left incomplete. Wiring gaps fixed (surfaced while documenting the package): - Added WebhooksConfiguration mirroring IdempotencyConfiguration — binds the in-memory dedupe + delivery-store adapters, EnvSecretResolver, and a shared SignerRegistry::default(). Hosts swap to the Redis adapters by re-binding. - Ported WebhookReplayCommand + WebhookShowFailedCommand from Symfony Console to the Altair #[Command]/#[Argument]/#[Option] convention (the Symfony-style classes were undiscoverable by AttributeCommandDiscoverer — dead code) and registered src/Altair/Webhooks/Cli in bin/altair. `webhook:replay` / `webhook:show-failed` now appear in `bin/altair list`. Docs: - docs/packages/webhooks.md — full reference mirroring idempotency.md. - src/Altair/Webhooks/README.md — slim package README pointing at the doc. - docs/README.md — indexed Webhooks (and the previously-missing Idempotency) under the HTTP stack section. Benchmark: - benchmarks/tokens-to-ship/task-webhooks.md — inbound + outbound variant. - fixtures/posts-webhook-in.openapi.yaml + posts-webhook-out.openapi.yaml — both round-trip clean and scaffold a working project (verified). Tests: WebhooksConfigurationTest + rewritten CLI command tests. PHPStan L8 / CS / Rector clean cache-free; .agent webhooks manifest regenerated. Closes #190
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.
Part of #184 (webhook epic). Closes #190. Follows #189 (merged in #192).
The issue was scoped as "docs + benchmark," but writing the docs surfaced two real wiring gaps the merged sub-issues (#185–#188) left behind. Per the agreed approach, this PR fixes them so the documented surface is real.
Wiring gaps fixed
WebhooksConfiguration— added one mirroringIdempotencyConfiguration: binds the in-memory dedupe + delivery-store adapters,EnvSecretResolver, and a sharedSignerRegistry::default(). Hosts swap to Redis by re-binding the interfaces.WebhookReplayCommand/WebhookShowFailedCommand(WebhookDispatcher + Messenger handler: outbound POST with retry / dead-letter / replay #187) were written in Symfony Console style (#[AsCommand], extending SymfonyCommand), which the AltairAttributeCommandDiscoverernever finds. Ported both to the Altair#[Command]/#[Argument]/#[Option]convention and registeredsrc/Altair/Webhooks/Cliinbin/altair. They now appear inbin/altair list(autowire-fail under barebin/altairexactly likedb:*, resolving once the host appliesWebhooksConfiguration).Docs
docs/packages/webhooks.md— full reference mirroringidempotency.md: intro, install, inbound + outbound quick starts, signing primitives, storage adapters, both behaviour matrices, auto-wiring, round-trip, limits.src/Altair/Webhooks/README.md— slim README pointing at the doc.docs/README.md— indexed Webhooks (and the previously-missing Idempotency) under the HTTP stack section.Benchmark
benchmarks/tokens-to-ship/task-webhooks.md— inbound + outbound variant, reported as two separate rows.fixtures/posts-webhook-in.openapi.yaml+posts-webhook-out.openapi.yaml— both round-trip clean throughopenapi:roundtripand scaffold a working project throughopenapi:import --scaffold(verified: recovered spec carries thewebhook:block; generated Action exposeswebhook()).Test plan
WebhooksConfigurationTest+ rewritten CLI command tests (direct__invoke+ output capture)