PluginProbe
ووسلام – همگام سازی ووکامرس و باسلام / 1.10.29
ووسلام – همگام سازی ووکامرس و باسلام v1.10.29
1.10.29 1.10.28 1.1.26 1.10.27 1.10.24 1.10.25 1.10.23 1.10.22 1.10.21 1.10.19 1.10.20 1.10.18 1.10.17 1.10.15 1.10.14 1.10.13 1.10.12 1.10.10 1.10.9 1.10.8 1.10.7 1.10.6 1.10.5 1.10.4 1.10.3 All 62 releases
sync-basalam / docs / async-worker-validation.md

async-worker-validation.md in ووسلام – همگام سازی ووکامرس و باسلام 1.10.29, at docs/async-worker-validation.md

108 lines 6.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 # Async worker health validation — 2026-10-10
2
3 Base: `master` at `5d3ab55` (lease guard MR !45 already merged).
4
5 ## Automated checks
6
7 - Queue and health PHPUnit tests: **46 tests, 171 assertions, all passed**.
8 - Standalone orphaned-lease regressions: **12 cases passed**.
9 - Local WordPress + MySQL worker integration: **8 scenarios, 29 assertions passed**.
10 Includes actual HTTP AJAX nonce rejection/acceptance, real queue persistence,
11 a separate PHP worker terminated with SIGKILL, a competing runner blocked by
12 the real advisory lock, stale recovery, permission checks, notice markup,
13 separate API rejection, and warning clearance after protected execution.
14 LiteSpeed flags are simulated on this local Apache stack.
15 - WooCommerce operations integration: **30 scenarios, 212 assertions passed**.
16 WooCommerce hooks, mappings and operations are real; Basalam HTTP responses
17 use deterministic fixtures. No production products or orders are created.
18 - PHP lint for all changed PHP files and `git diff --check` passed.
19
20 The **full suite is not green**: 214 tests, 479 assertions, four failures.
21 A clean archive of the base `master` produced the identical four failures
22 (204 tests, 462 assertions). Three expect the old “�
23 شاهده” order-item link
24 label instead of the product name; the fourth concerns a stale variation
25 mapping expectation. They are unchanged by this queue-health patch:
26
27 - `OrderManagerAddBasalamItemTest::testMappedItemGetsBasalamNameMeta`
28 - `OrderManagerAddBasalamItemTest::testUnmappedItemFallsBackToPlaceholderAndKeepsBasalamName`
29 - `OrderManagerBasalamItemNameTest::testStoresClickableLinkMetaWhenBasalamProductIdIsGiven`
30 - `StaleVariationRecoveryTest::testCustomModeStaleVariationFallsBackToOneCompleteProductPatch`
31
32 PHPUnit 9.6.29 was obtained from the official PHPUnit distribution because
33 this checkout's Composer development package directories are incomplete.
34
35 ## Live Mottasell check
36
37 The four runtime files were installed at 11:32:46 UTC after recording source
38 backups and comparing the installed baseline. Uploaded bytes were read back
39 and compared with the tested source. The previously scoped `.htaccess` rule
40 remained present; this patch did not rewrite it.
41
42 At 11:35:13 UTC, actual async executions reported effective `noabort=true`,
43 with no protection/interruption alert and the health option `autoload=off`.
44 All 56 jobs observed initially (IDs 18967–19022) had disappeared through normal
45 success cleanup; there were no new failures with a null error after job 18838.
46 After installation, the live product log also recorded product 10247 updating
47 successfully with HTTP 200 at 11:38:22 UTC.
48
49 New product and bulk work continued to arrive. This check establishes successful
50 real execution and movement of the observed queue, not that all future bulk
51 cycles have drained. No new live order was fabricated to test order ingestion.
52 Intentional process termination and absent-protection tests ran only locally.
53
54 Admin-warning screenshots are a local fixture, not an actual production outage.
55 The live success screenshot and full local outputs are retained with the
56 sanitized support evidence for ticket 9632.
57
58 ## Actual webserver matrix — 2026-10-10
59
60 The added `tests/integration/webservers/run.py` exercises the installed plugin's
61 actual AJAX handler and background workers on four Docker webserver stacks.
62 WordPress 7.0.2, WooCommerce 10.9.4 and a separate MariaDB 11.4 database were used
63 on arm64. Runtime code remained at `f31c096`; this follow-up adds only local test
64 infrastructure and documentation. The images are pinned to the tested digests.
65
66 **40 scenarios, 153 assertions passed**, including fixture/environment checks.
67
68 | Actual server | PHP runtime | Scenarios | Result |
69 | --- | --- | ---: | --- |
70 | Apache 2.4.68 | PHP 8.2.34, `apache2handler` | 9 | Passed |
71 | Nginx 1.29.8 | PHP 8.2.34, `fpm-fcgi` | 10 | Passed |
72 | Caddy 2.11.7 | PHP 8.2.34, `fpm-fcgi` | 10 | Passed |
73 | OpenLiteSpeed 1.9.3 | PHP 8.3.33, `litespeed` | 11 | Passed |
74
75 Each server passed valid/invalid HTTP nonce checks, normal queue cleanup, fixture
76 API failure separation, real nonblocking loopback dispatch after client
77 disconnection, four simultaneous HTTP workers without duplicate execution,
78 slow-worker false-alert exclusion, actual PHP worker SIGKILL, independent admin
79 detection, anonymous notice exclusion, restart persistence, stale recovery,
80 orphaned dispatch lease recovery, and actual PHP fatal-error recovery.
81
82 Nginx and Caddy also passed a real PHP-FPM four-second request termination limit,
83 subsequent interruption alert and recovery after restoring the limit. Apache,
84 Nginx and Caddy did not display LiteSpeed-specific protection warnings or hosting
85 guidance. OpenLiteSpeed observed real `noabort=1` from the scoped rule, displayed
86 the warning with the rule absent even after a quick successful job, then cleared
87 it after the restored rule was observed by an actual background job.
88
89 The stale timestamp is aged by the fixture to test the existing 120-second
90 threshold without waiting two minutes for each case. Queue persistence and
91 MySQL locks are real. Fixture jobs test the worker lifecycle; external Basalam
92 API calls and customer order creation are excluded. The local OpenLiteSpeed run
93 does not replace the earlier production LiteSpeed-host verification.
94
95 Reproducible setup, exact scope and report formats are documented in
96 [](../tests/integration/webservers/README.md`tests/integration/webservers/README.md`](../tests/integration/webservers/README.md](../tests/integration/webservers/README.md).
97 All disposable matrix containers, its database volume and its network were
98 removed after the passing run. The existing local development stacks were left
99 running. Queue/health PHPUnit tests (46 tests, 171 assertions) and 12 lease
100 regressions were also rerun and passed. The four baseline full-suite failures
101 listed above remain outside this queue/health change.
102
103 OpenLiteSpeed's complete 11-scenario run was then repeated three times
104 (33 repeated scenarios, 125 additional assertions), all passed. Recovery history
105 recorded attempts `[0, 1]` and exactly one returned execution in each run. The
106 recovery assertion uses the actual queue attempt sequence to catch repeated
107 execution within one attempt while permitting normal queue retries.
108