refactor(stripe): consume dunite-stripe-core (DEV-514) #443

Merged
longjacksonle merged 1 commit from feat/DEV-514-consume-stripe-core into main 2026-08-03 18:47:20 +02:00

What

Adopt the shared dunite-stripe-core crate (DEV-514, under the DEV-495 epic) for Stripe webhook signature verification, replacing bunyip's local copy. Third consumer after mokosh; the goal is to stop maintaining the same verifier in three repos.

Changes

  • crates/bunyip-domain/src/services/stripe.rs: verify_webhook_signature now delegates to dunite_stripe_core::verify_webhook_signature. The crate carries the constant-time comparison bunyip introduced for BUNYIP-107, so behaviour is identical (t=/v1= parse, 300s tolerance, any-v1 match). HMAC imports are now test-only.
  • crates/bunyip-domain/Cargo.toml: add dunite-stripe-core pinned to the branch rev that introduces it. dunite-core/dunite-download stay at c5730bc because dunite main advanced dunite-oidc in between (unrelated to bunyip-oidc's pin). Cargo resolves the two dunite revs without issue.

Testing

The six existing verify_webhook_signature_* tests pass (valid, invalid, wrong-but-valid-hex, missing-timestamp, no-v1, old-timestamp). cargo clippy -p bunyip-domain --all-targets and cargo fmt -p bunyip-domain --check clean.

Merge order

Depends on dunite PR #27. Once it lands, collapse the three dunite pins (core/download/stripe-core) to the single merged rev.

🤖 Generated with Claude Code

https://claude.ai/code/session_01QLd9c7niucrqx68v4AxVss

## What Adopt the shared `dunite-stripe-core` crate (DEV-514, under the DEV-495 epic) for Stripe webhook signature verification, replacing bunyip's local copy. Third consumer after mokosh; the goal is to stop maintaining the same verifier in three repos. ## Changes - `crates/bunyip-domain/src/services/stripe.rs`: `verify_webhook_signature` now delegates to `dunite_stripe_core::verify_webhook_signature`. The crate carries the constant-time comparison bunyip introduced for BUNYIP-107, so behaviour is identical (`t=/v1=` parse, 300s tolerance, any-`v1` match). HMAC imports are now test-only. - `crates/bunyip-domain/Cargo.toml`: add `dunite-stripe-core` pinned to the branch rev that introduces it. `dunite-core`/`dunite-download` stay at `c5730bc` because dunite `main` advanced `dunite-oidc` in between (unrelated to bunyip-oidc's pin). Cargo resolves the two dunite revs without issue. ## Testing The six existing `verify_webhook_signature_*` tests pass (valid, invalid, wrong-but-valid-hex, missing-timestamp, no-v1, old-timestamp). `cargo clippy -p bunyip-domain --all-targets` and `cargo fmt -p bunyip-domain --check` clean. ## Merge order Depends on dunite PR #27. Once it lands, collapse the three dunite pins (`core`/`download`/`stripe-core`) to the single merged rev. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01QLd9c7niucrqx68v4AxVss
refactor(stripe): consume dunite-stripe-core for webhook verification (DEV-514)
All checks were successful
E2E PR gate / Install + reachability (no deployment secrets) (pull_request) Successful in 22s
Check / fmt + clippy + build + tests (pull_request) Successful in 13m42s
Create release / Create release from merged PR (pull_request) Has been skipped
61e6b7bf1a
Replace bunyip's local Stripe webhook signature verifier with the shared dunite-stripe-core crate, so the same check is not maintained across a8n-tools, bunyip, and mokosh. The crate carries the constant-time comparison bunyip introduced for BUNYIP-107; behaviour is unchanged (t=/v1= parse, 300s tolerance, any-v1 match) and the six existing verifier tests pass. HMAC imports are now test-only. dunite-stripe-core is pinned to the branch rev that introduces it; dunite-core/download stay at c5730bc because dunite main advanced dunite-oidc in between (unrelated to bunyip-oidc's pin), so the three pins collapse to one merged rev once dunite PR #27 lands. Cargo resolves the two dunite revs without issue.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QLd9c7niucrqx68v4AxVss
longjacksonle deleted branch feat/DEV-514-consume-stripe-core 2026-08-03 18:47:20 +02:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
psa-systems/bunyip!443
No description provided.