Skip to content

[ShanaBoo] [ Laravel ] Implement webhook system with signature verification and retry queue#4437

Closed
genesisrevelationinc-debug wants to merge 7 commits into
UnsafeLabs:mainfrom
genesisrevelationinc-debug:shanaboo-fix-754
Closed

[ShanaBoo] [ Laravel ] Implement webhook system with signature verification and retry queue#4437
genesisrevelationinc-debug wants to merge 7 commits into
UnsafeLabs:mainfrom
genesisrevelationinc-debug:shanaboo-fix-754

Conversation

@genesisrevelationinc-debug
Copy link
Copy Markdown

ShanaBoo Autonomous Fix

This PR was automatically generated by ShanaBoo Earn Engine to claim the $800.00 bounty on this issue.

Source: Github | Task: 4451695139

Closes #754


Auto-submitted by ShanaBoo CNS — NVIDIA NIM + Microsoft Agent Framework

Copilot AI review requested due to automatic review settings May 25, 2026 11:08
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Adds initial webhook infrastructure to send signed outbound webhook requests and persist delivery attempts.

Changes:

  • Introduces WebhookDispatcher service to sign and POST webhook payloads while recording a WebhookDelivery.
  • Adds Webhook and WebhookDelivery Eloquent models with relationships and attribute casting.
  • Adds a queued DispatchWebhookJob to dispatch webhooks asynchronously.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 6 comments.

File Description
laravel/app/Services/WebhookDispatcher.php Implements signing, HTTP dispatch, and delivery persistence helpers.
laravel/app/Models/WebhookDelivery.php Adds delivery model with payload casting and webhook relationship.
laravel/app/Models/Webhook.php Adds webhook configuration model and deliveries relationship.
laravel/app/Jobs/DispatchWebhookJob.php Adds queued job wrapper to call the dispatcher.

{
$this->webhook = $webhook;
$this->event = $event;
$thishook->payload = $payload;
Comment on lines +24 to +33
$delivery = new WebhookDelivery();
$delivery->webhook_id = $webhook->id;
$delivery->event = $event;
$delivery->payload = $payload;
$delivery->response_code = $response->status();
$delivery->attempts = 1;
$delivery->delivered_at = now();
$delivery->save();

return $response->successful();
Comment on lines +14 to +22
$signature = hash_hmac('sha256', json_encode($payload), $webhook->secret);
$headers = [
'X-Webhook-Signature' => $signature,
'Content-Type' => 'application/json',
];

try {
$response = Http::withHeaders($headers)
->post($webhook->url, $payload);

public function calculateNextRetryDelay(int $attempt): int
{
return pow(2, $attempt - 1) * 60; // Exponential backoff in seconds
Comment on lines +12 to +22
protected $fillable = [
'url',
'secret',
'events',
'active',
];

protected $casts = [
'events' => 'array',
'active' => 'boolean',
];
Comment on lines +54 to +56
}

?> No newline at end of file
@github-actions
Copy link
Copy Markdown
Contributor

Unfortunately the changes in this PR didn't fully resolve the issue. Please rework your solution and submit a new pull request.

Make sure to review the acceptance criteria in the linked issue and verify all conditions are met before resubmitting. See CONTRIBUTING.md for guidelines.

@github-actions github-actions Bot closed this May 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[ Laravel ] Implement webhook system with signature verification and retry queue

2 participants