feat(seo): integrate analytics worker and real HTTP PostgreSQL acceptance
This commit is contained in:
1 parent
5750e1589e
commit
312fcc2acc
19 files changed
+1120
No files matched your search
@@ -0,0 +1,8 @@
|
||||
npm notice run backend@0.0.1 test
|
||||
npm notice run jest --runInBand seo-tracking
|
||||
|
||||
Test Suites: 4 passed, 4 total
|
||||
Tests: 16 passed, 16 total
|
||||
Snapshots: 0 total
|
||||
Time: 10.064 s
|
||||
Ran all test suites matching seo-tracking.
|
||||
@@ -0,0 +1,165 @@
|
||||
npm notice run backend@0.0.1 test
|
||||
npm notice run jest --runInBand
|
||||
FAIL src/wiki/wiki.service.spec.ts
|
||||
● WikiService › findAll › should paginate and filter terms with fallback to default sortBy
|
||||
|
||||
expect(jest.fn()).toHaveBeenCalledWith(...expected)
|
||||
|
||||
- Expected
|
||||
+ Received
|
||||
|
||||
@@ -1,21 +1,39 @@
|
||||
Object {
|
||||
"orderBy": Object {
|
||||
"term": "desc",
|
||||
},
|
||||
- "skip": 0,
|
||||
- "take": 10,
|
||||
+ "skip": undefined,
|
||||
+ "take": 100,
|
||||
"where": Object {
|
||||
"OR": Array [
|
||||
Object {
|
||||
"term": Object {
|
||||
"contains": "مفصل",
|
||||
"mode": "insensitive",
|
||||
},
|
||||
},
|
||||
Object {
|
||||
+ "key": Object {
|
||||
+ "contains": "مفصل",
|
||||
+ "mode": "insensitive",
|
||||
+ },
|
||||
+ },
|
||||
+ Object {
|
||||
"definition": Object {
|
||||
+ "contains": "مفصل",
|
||||
+ "mode": "insensitive",
|
||||
+ },
|
||||
+ },
|
||||
+ Object {
|
||||
+ "term": Object {
|
||||
+ "contains": "مفصل",
|
||||
+ "mode": "insensitive",
|
||||
+ },
|
||||
+ },
|
||||
+ Object {
|
||||
+ "key": Object {
|
||||
"contains": "مفصل",
|
||||
"mode": "insensitive",
|
||||
},
|
||||
},
|
||||
],,
|
||||
|
||||
Number of calls: 1
|
||||
|
||||
56 | });
|
||||
57 |
|
||||
> 58 | expect(mockPrisma.scientificTerm.findMany).toHaveBeenCalledWith({
|
||||
| ^
|
||||
59 | where: {
|
||||
60 | OR: [
|
||||
61 | { term: { contains: "مفصل", mode: "insensitive" } },
|
||||
|
||||
at Object.<anonymous> (wiki/wiki.service.spec.ts:58:50)
|
||||
|
||||
[Nest] 3581768 - 10/28/2026, 7:18:58 AM ERROR [SslService] Failed to parse SSL certificate
|
||||
[Nest] 3581768 - 10/28/2026, 7:18:58 AM ERROR [SslService] Error: error:0480006C:PEM routines::no start line
|
||||
at new X509Certificate (node:internal/crypto/x509:121:21)
|
||||
at SslService.getStatus (/opt/data/content-maintenance/engine/worktree-concurrency-tdd/backend/src/admin/ssl.service.ts:104:20)
|
||||
at Object.<anonymous> (/opt/data/content-maintenance/engine/worktree-concurrency-tdd/backend/src/admin/ssl.service.spec.ts:179:30)
|
||||
at Promise.finally.completed (/opt/data/content-maintenance/engine/worktree-concurrency-tdd/backend/node_modules/jest-circus/build/jestAdapterInit.js:1561:28)
|
||||
at new Promise (<anonymous>)
|
||||
at callAsyncCircusFn (/opt/data/content-maintenance/engine/worktree-concurrency-tdd/backend/node_modules/jest-circus/build/jestAdapterInit.js:1501:10)
|
||||
at _callCircusTest (/opt/data/content-maintenance/engine/worktree-concurrency-tdd/backend/node_modules/jest-circus/build/jestAdapterInit.js:1011:40)
|
||||
at _runTest (/opt/data/content-maintenance/engine/worktree-concurrency-tdd/backend/node_modules/jest-circus/build/jestAdapterInit.js:951:3)
|
||||
at /opt/data/content-maintenance/engine/worktree-concurrency-tdd/backend/node_modules/jest-circus/build/jestAdapterInit.js:853:7
|
||||
at _runTestsForDescribeBlock (/opt/data/content-maintenance/engine/worktree-concurrency-tdd/backend/node_modules/jest-circus/build/jestAdapterInit.js:866:11)
|
||||
at _runTestsForDescribeBlock (/opt/data/content-maintenance/engine/worktree-concurrency-tdd/backend/node_modules/jest-circus/build/jestAdapterInit.js:861:11)
|
||||
at _runTestsForDescribeBlock (/opt/data/content-maintenance/engine/worktree-concurrency-tdd/backend/node_modules/jest-circus/build/jestAdapterInit.js:861:11)
|
||||
at run (/opt/data/content-maintenance/engine/worktree-concurrency-tdd/backend/node_modules/jest-circus/build/jestAdapterInit.js:765:3)
|
||||
at runAndTransformResultsToJestFormat (/opt/data/content-maintenance/engine/worktree-concurrency-tdd/backend/node_modules/jest-circus/build/jestAdapterInit.js:1993:21)
|
||||
at jestAdapter (/opt/data/content-maintenance/engine/worktree-concurrency-tdd/backend/node_modules/jest-circus/build/runner.js:111:19)
|
||||
at runTestInternal (/opt/data/content-maintenance/engine/worktree-concurrency-tdd/backend/node_modules/jest-runner/build/index.js:276:16)
|
||||
at runTest (/opt/data/content-maintenance/engine/worktree-concurrency-tdd/backend/node_modules/jest-runner/build/index.js:344:7) {
|
||||
library: 'PEM routines',
|
||||
reason: 'no start line',
|
||||
code: 'ERR_OSSL_PEM_NO_START_LINE'
|
||||
}
|
||||
[Nest] 3581768 - 10/28/2026, 7:19:05 AM ERROR [ZibalEBankService] [Zibal EBank API] Error requesting /ebank/v1/account/list/: transport failed
|
||||
[Nest] 3581768 - 10/28/2026, 7:19:05 AM ERROR [ZibalEBankService] [Zibal EBank API] Error requesting /ebank/v1/account/list/: transport failed
|
||||
[Nest] 3581768 - 10/28/2026, 7:19:20 AM ERROR [ZibalEBankService] [Zibal EBank API] Error requesting /ebank/v1/account/list/: aborted
|
||||
[Nest] 3581768 - 10/28/2026, 7:19:05 AM ERROR [ZibalEBankService] [Zibal EBank API] Error requesting /ebank/v1/account/list/: Zibal EBank HTTP 503
|
||||
[Nest] 3581768 - 10/28/2026, 7:19:17 AM ERROR [PaymentService] Security Alert: Amount mismatch on trackId=tr-1! Zibal reported 1000000 Rials, but expected 5000000 Rials in DB.
|
||||
[Nest] 3581768 - 10/28/2026, 7:19:27 AM WARN [BlogsService] Cache revalidation failed for updated blog [post]: cache down
|
||||
|
||||
Summary of all failing tests
|
||||
FAIL wiki/wiki.service.spec.ts
|
||||
● WikiService › findAll › should paginate and filter terms with fallback to default sortBy
|
||||
|
||||
expect(jest.fn()).toHaveBeenCalledWith(...expected)
|
||||
|
||||
- Expected
|
||||
+ Received
|
||||
|
||||
@@ -1,21 +1,39 @@
|
||||
Object {
|
||||
"orderBy": Object {
|
||||
"term": "desc",
|
||||
},
|
||||
- "skip": 0,
|
||||
- "take": 10,
|
||||
+ "skip": undefined,
|
||||
+ "take": 100,
|
||||
"where": Object {
|
||||
"OR": Array [
|
||||
Object {
|
||||
"term": Object {
|
||||
"contains": "مفصل",
|
||||
"mode": "insensitive",
|
||||
},
|
||||
},
|
||||
Object {
|
||||
+ "key": Object {
|
||||
+ "contains": "مفصل",
|
||||
+ "mode": "insensitive",
|
||||
+ },
|
||||
+ },
|
||||
+ Object {
|
||||
"definition": Object {
|
||||
+ "contains": "مفصل",
|
||||
+ "mode": "insensitive",
|
||||
+ },
|
||||
+ },
|
||||
+ Object {
|
||||
+ "term": Object {
|
||||
+ "contains": "مفصل",
|
||||
+ "mode": "insensitive",
|
||||
+ },
|
||||
+ },
|
||||
+ Object {
|
||||
+ "key": Object {
|
||||
"contains": "مفصل",
|
||||
"mode": "insensitive",
|
||||
},
|
||||
},
|
||||
],,
|
||||
|
||||
Number of calls: 1
|
||||
|
||||
56 | });
|
||||
57 |
|
||||
> 58 | expect(mockPrisma.scientificTerm.findMany).toHaveBeenCalledWith({
|
||||
| ^
|
||||
59 | where: {
|
||||
60 | OR: [
|
||||
61 | { term: { contains: "مفصل", mode: "insensitive" } },
|
||||
|
||||
at Object.<anonymous> (wiki/wiki.service.spec.ts:58:50)
|
||||
|
||||
|
||||
Test Suites: 1 failed, 4 skipped, 94 passed, 95 of 99 total
|
||||
Tests: 1 failed, 8 skipped, 815 passed, 824 total
|
||||
Snapshots: 0 total
|
||||
Time: 44.533 s, estimated 47 s
|
||||
Ran all test suites.
|
||||
@@ -0,0 +1,254 @@
|
||||
{
|
||||
"observedAt": "2026-10-28T07:18:43.957972+00:00",
|
||||
"backend": "disposable local Nest module + real PostgreSQL",
|
||||
"auth": "test-only JWT strategy with real JwtAuthGuard/RolesGuard; NOT production identity/API-key",
|
||||
"checks": {
|
||||
"missing_invalid_nonadmin_denied": true,
|
||||
"feedback_stale_action_and_correct_link": true,
|
||||
"worker_snapshot_history_network_retry_conflict": true
|
||||
},
|
||||
"google": {
|
||||
"findingId": "c89ce29f-e9f7-40ab-a7bb-03a2286219aa",
|
||||
"articleUrl": "https://canina.ir/blog/dog-black-seed-nigella-sativa",
|
||||
"periodStart": "2026-10-12",
|
||||
"periodEnd": "2026-10-25",
|
||||
"feedbackRevision": 1,
|
||||
"sources": {
|
||||
"gsc": {
|
||||
"status": "available",
|
||||
"metrics": {
|
||||
"clicks": 5,
|
||||
"impressions": 32,
|
||||
"position": 3.4375
|
||||
},
|
||||
"rows": [
|
||||
{
|
||||
"keys": [
|
||||
"https://canina.ir/blog/dog-black-seed-nigella-sativa"
|
||||
],
|
||||
"clicks": 5,
|
||||
"impressions": 32,
|
||||
"ctr": 0.15625,
|
||||
"position": 3.4375
|
||||
}
|
||||
],
|
||||
"periodStart": "2026-10-12",
|
||||
"periodEnd": "2026-10-25",
|
||||
"observedAt": "2026-10-28T07:18:42.716059+00:00",
|
||||
"metadata": {},
|
||||
"coverage": "GSC top rows; anonymized queries omitted",
|
||||
"source": "GSC",
|
||||
"httpStatus": 200
|
||||
},
|
||||
"gscQueries": {
|
||||
"status": "no_data",
|
||||
"metrics": null,
|
||||
"rows": [],
|
||||
"periodStart": "2026-10-12",
|
||||
"periodEnd": "2026-10-25",
|
||||
"observedAt": "2026-10-28T07:18:42.979366+00:00",
|
||||
"metadata": {},
|
||||
"coverage": "GSC top rows; anonymized queries omitted",
|
||||
"source": "GSC",
|
||||
"httpStatus": 200
|
||||
},
|
||||
"ga4": {
|
||||
"status": "available",
|
||||
"metrics": {
|
||||
"activeUsers": 2,
|
||||
"userEngagementDuration": 33.0,
|
||||
"avgEngagementSec": 16.5,
|
||||
"bounceRate": 0.5,
|
||||
"scrollDepthRate": null
|
||||
},
|
||||
"rows": [
|
||||
{
|
||||
"dimensionValues": [
|
||||
{
|
||||
"value": "https://canina.ir/blog/dog-black-seed-nigella-sativa"
|
||||
}
|
||||
],
|
||||
"metricValues": [
|
||||
{
|
||||
"value": "2"
|
||||
},
|
||||
{
|
||||
"value": "33"
|
||||
},
|
||||
{
|
||||
"value": "0.5"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"periodStart": "2026-10-12",
|
||||
"periodEnd": "2026-10-25",
|
||||
"observedAt": "2026-10-28T07:18:43.791790+00:00",
|
||||
"metadata": {
|
||||
"currencyCode": "USD",
|
||||
"timeZone": "America/Los_Angeles"
|
||||
},
|
||||
"coverage": "GA4 reporting rows; inspect metadata for thresholding",
|
||||
"source": "GA4",
|
||||
"httpStatus": 200
|
||||
},
|
||||
"clarity": {
|
||||
"status": "unavailable",
|
||||
"metrics": null,
|
||||
"error": "reporting_credentials_not_configured",
|
||||
"observedAt": "2026-10-28T07:18:43.791896+00:00"
|
||||
},
|
||||
"commerce": {
|
||||
"status": "unavailable",
|
||||
"metrics": null,
|
||||
"error": "article_to_order_linkage_not_verified",
|
||||
"observedAt": "2026-10-28T07:18:43.791906+00:00"
|
||||
}
|
||||
},
|
||||
"decision": {
|
||||
"action": "INSUFFICIENT_EVIDENCE",
|
||||
"reason": "No approved comparative decision policy; unavailable signals cannot justify scaling or pruning. Correlation is not keyword-caused sales.",
|
||||
"mandatoryDirective": "Measure only; do not publish",
|
||||
"feedbackRevision": 1
|
||||
},
|
||||
"observedAt": "2026-10-28T07:18:43.791921+00:00",
|
||||
"periodAlignment": "same date labels; GSC Pacific and GA4 property timezone may differ; not session-level alignment"
|
||||
},
|
||||
"persistedSnapshot": {
|
||||
"id": "26dac670-0b45-4450-bbec-638446732554",
|
||||
"findingId": "c89ce29f-e9f7-40ab-a7bb-03a2286219aa",
|
||||
"snapshotDate": "2026-10-28T07:18:43.874Z",
|
||||
"periodStart": "2026-10-12T00:00:00.000Z",
|
||||
"periodEnd": "2026-10-26T00:00:00.000Z",
|
||||
"sourceMetadata": {
|
||||
"ga4": {
|
||||
"source": "ga4",
|
||||
"status": "available",
|
||||
"fetchedAt": "2026-10-28T07:18:43.791790+00:00"
|
||||
},
|
||||
"gsc": {
|
||||
"source": "gsc",
|
||||
"status": "available",
|
||||
"fetchedAt": "2026-10-28T07:18:42.716059+00:00"
|
||||
},
|
||||
"worker": {
|
||||
"sources": {
|
||||
"ga4": {
|
||||
"rows": [
|
||||
{
|
||||
"metricValues": [
|
||||
{
|
||||
"value": "2"
|
||||
},
|
||||
{
|
||||
"value": "33"
|
||||
},
|
||||
{
|
||||
"value": "0.5"
|
||||
}
|
||||
],
|
||||
"dimensionValues": [
|
||||
{
|
||||
"value": "https://canina.ir/blog/dog-black-seed-nigella-sativa"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"source": "GA4",
|
||||
"status": "available",
|
||||
"metrics": {
|
||||
"bounceRate": 0.5,
|
||||
"activeUsers": 2,
|
||||
"scrollDepthRate": null,
|
||||
"avgEngagementSec": 16.5,
|
||||
"userEngagementDuration": 33
|
||||
},
|
||||
"coverage": "GA4 reporting rows; inspect metadata for thresholding",
|
||||
"metadata": {
|
||||
"timeZone": "America/Los_Angeles",
|
||||
"currencyCode": "USD"
|
||||
},
|
||||
"periodEnd": "2026-10-25",
|
||||
"httpStatus": 200,
|
||||
"observedAt": "2026-10-28T07:18:43.791790+00:00",
|
||||
"periodStart": "2026-10-12"
|
||||
},
|
||||
"gsc": {
|
||||
"rows": [
|
||||
{
|
||||
"ctr": 0.15625,
|
||||
"keys": [
|
||||
"https://canina.ir/blog/dog-black-seed-nigella-sativa"
|
||||
],
|
||||
"clicks": 5,
|
||||
"position": 3.4375,
|
||||
"impressions": 32
|
||||
}
|
||||
],
|
||||
"source": "GSC",
|
||||
"status": "available",
|
||||
"metrics": {
|
||||
"clicks": 5,
|
||||
"position": 3.4375,
|
||||
"impressions": 32
|
||||
},
|
||||
"coverage": "GSC top rows; anonymized queries omitted",
|
||||
"metadata": {},
|
||||
"periodEnd": "2026-10-25",
|
||||
"httpStatus": 200,
|
||||
"observedAt": "2026-10-28T07:18:42.716059+00:00",
|
||||
"periodStart": "2026-10-12"
|
||||
},
|
||||
"clarity": {
|
||||
"error": "reporting_credentials_not_configured",
|
||||
"status": "unavailable",
|
||||
"metrics": null,
|
||||
"observedAt": "2026-10-28T07:18:43.791896+00:00"
|
||||
},
|
||||
"commerce": {
|
||||
"error": "article_to_order_linkage_not_verified",
|
||||
"status": "unavailable",
|
||||
"metrics": null,
|
||||
"observedAt": "2026-10-28T07:18:43.791906+00:00"
|
||||
},
|
||||
"gscQueries": {
|
||||
"rows": [],
|
||||
"source": "GSC",
|
||||
"status": "no_data",
|
||||
"metrics": null,
|
||||
"coverage": "GSC top rows; anonymized queries omitted",
|
||||
"metadata": {},
|
||||
"periodEnd": "2026-10-25",
|
||||
"httpStatus": 200,
|
||||
"observedAt": "2026-10-28T07:18:42.979366+00:00",
|
||||
"periodStart": "2026-10-12"
|
||||
}
|
||||
},
|
||||
"feedbackVersion": 1,
|
||||
"periodAlignment": "same date labels; GSC Pacific and GA4 property timezone may differ; not session-level alignment",
|
||||
"mandatoryDirective": "Measure only; do not publish"
|
||||
},
|
||||
"commerce": {
|
||||
"error": "article_to_order_linkage_not_verified",
|
||||
"source": "commerce",
|
||||
"status": "unavailable",
|
||||
"fetchedAt": "2026-10-28T07:18:43.791906+00:00"
|
||||
}
|
||||
},
|
||||
"ingestionKey": "bb6b6afac66b9fc1664dd7c8e9143e80d1d2d04b4cb064aeed7068648f03e625",
|
||||
"gscImpressions": 32,
|
||||
"gscClicks": 5,
|
||||
"gscPosition": 3.4375,
|
||||
"ga4ActiveUsers": 2,
|
||||
"ga4AvgEngagementSec": 16.5,
|
||||
"ga4BounceRate": 0.5,
|
||||
"ga4ScrollDepthRate": null,
|
||||
"attributedOrdersCount": null,
|
||||
"attributedSalesValue": null,
|
||||
"actionRecommendation": null,
|
||||
"analysisNotes": null,
|
||||
"createdAt": "2026-10-28T07:18:43.874Z"
|
||||
},
|
||||
"productionWrites": false,
|
||||
"scheduled": false
|
||||
}
|
||||
Reference in new issue
Block a user