-
Notifications
You must be signed in to change notification settings - Fork 0
fix: back off after transient HTTP delivery responses #5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
906c49e
8e41ac5
7f28062
1e397b3
e15eac5
bb6f258
ffd5f32
c2ebc32
dfe0478
1fbb59e
66e2219
e69ae4d
3732481
41e877e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,7 +2,7 @@ | |
| /** | ||
| * Plugin Name: Codegenie Pulse Connector | ||
| * Description: Verbind WordPress veilig met Codegenie Pulse voor foutmonitoring, websiteverificatie en deployment tracking. | ||
| * Version: 1.2.1 | ||
| * Version: 1.2.2 | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
The runtime now declares version AGENTS.md reference: AGENTS.md:L5-L5 Useful? React with 👍 / 👎. |
||
| * Requires at least: 6.2 | ||
| * Requires PHP: 7.4 | ||
| * Author: Codegenie | ||
|
|
@@ -16,7 +16,7 @@ | |
| exit; | ||
| } | ||
|
|
||
| define( 'CODEGENIE_PULSE_CONNECTOR_VERSION', '1.2.1' ); | ||
| define( 'CODEGENIE_PULSE_CONNECTOR_VERSION', '1.2.2' ); | ||
| define( 'CODEGENIE_PULSE_CONNECTOR_FILE', __FILE__ ); | ||
| define( 'CODEGENIE_PULSE_CONNECTOR_DIR', plugin_dir_path( __FILE__ ) ); | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,53 @@ | ||
| # Codegenie Pulse Connector 1.2.2 | ||
|
|
||
| ## Summary | ||
|
|
||
| Codegenie Pulse Connector 1.2.2 is a focused delivery-reliability maintenance release. It treats HTTP 408 Request Timeout and HTTP 425 Too Early as temporary responses and applies the connector's existing bounded one-minute local backoff before another automatic delivery attempt. | ||
|
|
||
| ## Changes | ||
|
|
||
| - Added local backoff after HTTP 408 responses. | ||
| - Added local backoff after HTTP 425 responses. | ||
| - Added specific privacy-safe administrator messages for both temporary response classes. | ||
| - Added regression coverage proving that the next automatic event is suppressed during the backoff window. | ||
|
|
||
| ## Compatibility | ||
|
|
||
| - WordPress 6.2 or newer. | ||
| - Tested by the repository matrix with WordPress 6.2.0 and 7.0.2. | ||
| - PHP 7.4 or newer, including the repository's PHP 7.4, 8.3 and 8.5 quality matrix. | ||
| - Requires PHP OpenSSL support for AES-256-GCM. | ||
| - Plugin directory, installation slug and text domain: `codegenie-pulse-connector`. | ||
| - Connector ID: `codegenie-pulse-connector-wordpress`; protocol version 1. | ||
|
|
||
| ## Upgrade behaviour | ||
|
|
||
| There is no database-schema migration and there are no option-name changes. Existing encrypted DSN, verification, plan capability and capture-mode settings remain unchanged. The release only extends the existing local delivery backoff classification. | ||
|
|
||
| ## Security and privacy | ||
|
|
||
| - No additional data is collected, persisted or transmitted. | ||
| - No payload format, endpoint or authentication contract changes. | ||
| - Backoff state remains local, short-lived and separated by event kind. | ||
| - Result messages remain bounded and do not expose remote response bodies, DSNs, tokens or event content. | ||
|
|
||
| ## Known limitations | ||
|
|
||
| - The plugin has no queue and does not replay an event that was rejected or lost. | ||
| - Backoff protects the local site and remote endpoint from repeated delivery attempts, but it does not guarantee eventual delivery. | ||
| - WordPress.org publication still requires the approved human-created brand assets and synthetic screenshots documented by the repository asset manifest. | ||
|
|
||
| ## Artifacts | ||
|
|
||
| The tag-triggered release preparation workflow builds deterministic installation and reviewable source ZIP files, verifies both archives, records SHA-256 sidecars and proves reproducibility before uploading the prepared artifacts. | ||
|
|
||
| Expected filenames: | ||
|
|
||
| - `codegenie-pulse-connector-1.2.2.zip` | ||
| - `codegenie-pulse-connector-wordpress-1.2.2-source.zip` | ||
|
|
||
| ## Rollback and support | ||
|
|
||
| For rollback, deactivate 1.2.2 and reinstall the reviewed 1.2.1 package without uninstalling first. Uninstall deliberately removes settings and secrets and is therefore not a rollback mechanism. | ||
|
|
||
| Use the repository's normal support channel for non-sensitive issues. Report vulnerabilities through GitHub private vulnerability reporting as described in `SECURITY.md`; never post DSNs, tokens, personal data or private logs publicly. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -116,7 +116,7 @@ private function send( $endpoint, $payload, $kind, $bypass_backoff ) { | |
| return $this->record_success( $kind, $status ); | ||
| } | ||
|
|
||
| if ( 429 === $status ) { | ||
| if ( in_array( $status, array( 408, 425, 429 ), true ) ) { | ||
| $this->start_backoff( $kind, MINUTE_IN_SECONDS ); | ||
| } elseif ( in_array( $status, array( 401, 403, 404, 410 ), true ) ) { | ||
| $this->start_backoff( $kind, 15 * MINUTE_IN_SECONDS ); | ||
|
|
@@ -236,6 +236,8 @@ private function http_error_message( $status ) { | |
| return __( 'Het account of plan laat deze koppeling niet toe.', 'codegenie-pulse-connector' ); | ||
| case 404: | ||
| return __( 'Het ingestie-endpoint of de token werd niet gevonden.', 'codegenie-pulse-connector' ); | ||
| case 408: | ||
| return __( 'De aanvraag is tijdelijk verlopen. De connector probeert later opnieuw.', 'codegenie-pulse-connector' ); | ||
|
Comment on lines
+239
to
+240
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
After a 408 response, the rejected event is returned to the caller and discarded; Useful? React with 👍 / 👎. |
||
| case 410: | ||
| return __( 'De gekoppelde website of foutbron is gearchiveerd.', 'codegenie-pulse-connector' ); | ||
| case 411: | ||
|
|
@@ -244,6 +246,8 @@ private function http_error_message( $status ) { | |
| return __( 'De gebeurtenis is groter dan de toegestane platformlimiet.', 'codegenie-pulse-connector' ); | ||
| case 422: | ||
| return __( 'Het platform heeft de gebeurtenis inhoudelijk geweigerd.', 'codegenie-pulse-connector' ); | ||
| case 425: | ||
| return __( 'Het platform heeft de aanvraag tijdelijk uitgesteld. De connector probeert later opnieuw.', 'codegenie-pulse-connector' ); | ||
| case 429: | ||
| return __( 'De ingestie- of maandlimiet is bereikt. De connector probeert later opnieuw.', 'codegenie-pulse-connector' ); | ||
| default: | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -7,7 +7,7 @@ | |
|
|
||
| $root = dirname( __DIR__ ); | ||
| $allow_dirty = in_array( '--allow-dirty', $argv, true ); | ||
| $version = '1.2.1'; | ||
| $version = '1.2.2'; | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Building this version always fails because AGENTS.md reference: AGENTS.md:L10-L10 Useful? React with 👍 / 👎. |
||
| $slug = 'codegenie-pulse-connector'; | ||
| $source_slug = 'codegenie-pulse-connector-wordpress-' . $version . '-source'; | ||
| $dist = $root . '/dist'; | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| <?php | ||
|
|
||
| final class ClientTransientBackoffTest extends Codegenie_Pulse_Test_Case { | ||
| public function test_transient_http_responses_start_bounded_backoff() { | ||
| foreach ( array( 408, 425 ) as $status ) { | ||
| codegenie_test_reset(); | ||
| $options = $this->configuredOptions(); | ||
| $client = new Codegenie_Pulse_Client( $options ); | ||
| $GLOBALS['codegenie_test']['remote_result'] = array( | ||
| 'response' => array( 'code' => $status ), | ||
| 'body' => '{}', | ||
| ); | ||
|
|
||
| $result = $client->send_error( array( 'message' => 'synthetic' ) ); | ||
| $key = Codegenie_Pulse_Options::BACKOFF_KEY . '_error'; | ||
|
|
||
| $this->assertSame( 'http_' . $status, $result['code'] ); | ||
| $this->assertArrayHasKey( $key, $GLOBALS['codegenie_test']['transients'] ); | ||
| $this->assertSame( MINUTE_IN_SECONDS, $GLOBALS['codegenie_test']['transients'][ $key ]['expiration'] ); | ||
| $this->assertSame( 'backoff', $client->send_error( array( 'message' => 'followup' ) )['code'] ); | ||
| $this->assertCount( 1, $GLOBALS['codegenie_test']['remote_calls'] ); | ||
| } | ||
| } | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On any push of this commit to
main, this job creates and pushesv1.2.2and then executesgh release createwithout--draft;gh release create --helpstates that this form publishes the release after uploading its assets. This turns the generic QA/build workflow into an automatic publishing path instead of leaving tagging and publication as separately authorized maintainer actions.AGENTS.md reference: AGENTS.md:L10-L10
Useful? React with 👍 / 👎.